; LLVM IR from niessner/Matterport :: code/gaps/pkgs/RGBD/RGBDSurface.ll (ZN11RGBDSurfaceC2EPKcP11R3Rectangled)

; 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.R2Point = type { [2 x double] }
%class.RGBDSurface = type { ptr, ptr, i32, %class.RNArray, i32, i32, i32, ptr, ptr, %class.R2Box, i32, ptr, ptr, ptr }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }

@_ZTV11RGBDSurface = external dso_local unnamed_addr constant { [33 x ptr] }, align 8
@R2null_point = external global %class.R2Point, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RGBDSurfaceC2EPKcP11R3Rectangled(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr noundef %2, double noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %class.R2Point, align 8
  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 double %3, ptr %8, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8
  store ptr getelementptr inbounds inrange(-16, 248) ({ [33 x ptr] }, ptr @_ZTV11RGBDSurface, i32 0, i32 0, i32 2), ptr %14, align 8, !tbaa !11
  %15 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 1
  store ptr null, ptr %15, align 8, !tbaa !13
  %16 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 2
  store i32 -1, ptr %16, align 8, !tbaa !22
  %17 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 3
  call void @_ZN7RNArrayIP6R2GridEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17)
  %18 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 4
  store i32 0, ptr %18, align 8, !tbaa !23
  %19 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 5
  store i32 0, ptr %19, align 4, !tbaa !24
  %20 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 6
  store i32 -1, ptr %20, align 8, !tbaa !25
  %21 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 7
  store ptr null, ptr %21, align 8, !tbaa !26
  %22 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 8
  store ptr null, ptr %22, align 8, !tbaa !27
  %23 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 9
  invoke void @_ZN5R2BoxC1Edddd(ptr noundef nonnull align 8 dereferenceable(40) %23, double noundef 0x47EFFFFFE0000000, double noundef 0x47EFFFFFE0000000, double noundef 0xC7EFFFFFE0000000, double noundef 0xC7EFFFFFE0000000)
          to label %24 unwind label %33

24:                                               ; preds = %4
  %25 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 10
  store i32 0, ptr %25, align 8, !tbaa !28
  %26 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 11
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %27, ptr %26, align 8, !tbaa !29
  %28 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 12
  store ptr null, ptr %28, align 8, !tbaa !30
  %29 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 13
  store ptr null, ptr %29, align 8, !tbaa !31
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %37, label %32

32:                                               ; preds = %24
  br label %96

33:                                               ; preds = %4
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %9, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %10, align 4
  br label %104

37:                                               ; preds = %24
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %14, align 8, !tbaa !11
  %40 = getelementptr inbounds ptr, ptr %39, i64 23
  %41 = load ptr, ptr %40, align 8
  invoke void %41(ptr noundef nonnull align 8 dereferenceable(144) %14, ptr noundef %38)
          to label %42 unwind label %54

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = invoke noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %43, i32 noundef 0)
          to label %45 unwind label %58

45:                                               ; preds = %42
  %46 = fmul double 2.000000e+00, %44
  store double %46, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = invoke noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %47, i32 noundef 1)
          to label %49 unwind label %62

49:                                               ; preds = %45
  %50 = fmul double 2.000000e+00, %48
  store double %50, ptr %12, align 8, !tbaa !9
  %51 = load double, ptr %8, align 8, !tbaa !9
  %52 = fcmp ole double %51, 0.000000e+00
  br i1 %52, label %53, label %66

53:                                               ; preds = %49
  store double 1.000000e-02, ptr %8, align 8, !tbaa !9
  br label %66

54:                                               ; preds = %37
  %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
  br label %103

58:                                               ; preds = %42
  %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 %102

62:                                               ; preds = %45
  %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
  br label %101

66:                                               ; preds = %53, %49
  %67 = load double, ptr %11, align 8, !tbaa !9
  %68 = load double, ptr %8, align 8, !tbaa !9
  %69 = fdiv double %67, %68
  %70 = fadd double %69, 5.000000e-01
  %71 = fptosi double %70 to i32
  %72 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 4
  store i32 %71, ptr %72, align 8, !tbaa !23
  %73 = load double, ptr %12, align 8, !tbaa !9
  %74 = load double, ptr %8, align 8, !tbaa !9
  %75 = fdiv double %73, %74
  %76 = fadd double %75, 5.000000e-01
  %77 = fptosi double %76 to i32
  %78 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 5
  store i32 %77, ptr %78, align 4, !tbaa !24
  %79 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 4
  %80 = load i32, ptr %79, align 8, !tbaa !23
  %81 = icmp sle i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %66
  %83 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 4
  store i32 1, ptr %83, align 8, !tbaa !23
  br label %84

84:                                               ; preds = %82, %66
  %85 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 5
  %86 = load i32, ptr %85, align 4, !tbaa !24
  %87 = icmp sle i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %84
  %89 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 5
  store i32 1, ptr %89, align 4, !tbaa !24
  br label %90

90:                                               ; preds = %88, %84
  %91 = getelementptr inbounds %class.RGBDSurface, ptr %14, i32 0, i32 9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %92 = load double, ptr %11, align 8, !tbaa !9
  %93 = load double, ptr %12, align 8, !tbaa !9
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %13, double noundef %92, double noundef %93)
          to label %94 unwind label %97

94:                                               ; preds = %90
  invoke void @_ZN5R2Box5ResetERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(40) %91, ptr noundef nonnull align 8 dereferenceable(16) @R2null_point, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %95 unwind label %97

95:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %96

96:                                               ; preds = %95, %32
  ret void

97:                                               ; preds = %94, %90
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %101

101:                                              ; preds = %97, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %102

102:                                              ; preds = %101, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %103

103:                                              ; preds = %102, %54
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #5
  br label %104

104:                                              ; preds = %103, %33
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %9, align 8
  %107 = load i32, ptr %10, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109
}

; 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 uwtable
declare dso_local noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) #4 align 2

declare void @_ZN5R2Box5ResetERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

; 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 @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS11RGBDSurface", !6, i64 8, !15, i64 16, !16, i64 24, !15, i64 40, !15, i64 44, !15, i64 48, !6, i64 56, !6, i64 64, !18, i64 72, !15, i64 112, !6, i64 120, !6, i64 128, !6, i64 136}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS7RNArrayIP6R2GridE", !17, i64 0}
!17 = !{!"_ZTS8RNVArray", !6, i64 0, !15, i64 8, !15, i64 12}
!18 = !{!"_ZTS5R2Box", !19, i64 0, !21, i64 8, !21, i64 24}
!19 = !{!"_ZTS7R2Solid", !20, i64 0}
!20 = !{!"_ZTS7R2Shape"}
!21 = !{!"_ZTS7R2Point", !7, i64 0}
!22 = !{!14, !15, i64 16}
!23 = !{!14, !15, i64 40}
!24 = !{!14, !15, i64 44}
!25 = !{!14, !15, i64 48}
!26 = !{!14, !6, i64 56}
!27 = !{!14, !6, i64 64}
!28 = !{!14, !15, i64 112}
!29 = !{!14, !6, i64 120}
!30 = !{!14, !6, i64 128}
!31 = !{!14, !6, i64 136}


; 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.R2Point = type { [2 x double] }

@_ZTV11RGBDSurface = external dso_local unnamed_addr constant { [33 x ptr] }, align 8
@R2null_point = external global %class.R2Point, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RGBDSurfaceC2EPKcP11R3Rectangled(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr noundef %2, double noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.R2Point, align 8
  store ptr getelementptr inbounds inrange(-16, 248) (i8, ptr @_ZTV11RGBDSurface, i64 16), ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %6, align 8, !tbaa !8
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 -1, ptr %7, align 8, !tbaa !19
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN7RNArrayIP6R2GridEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 0, ptr %9, align 8, !tbaa !20
  %10 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 0, ptr %10, align 4, !tbaa !21
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 -1, ptr %11, align 8, !tbaa !22
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false)
  invoke void @_ZN5R2BoxC1Edddd(ptr noundef nonnull align 8 dereferenceable(40) %13, double noundef 0x47EFFFFFE0000000, double noundef 0x47EFFFFFE0000000, double noundef 0xC7EFFFFFE0000000, double noundef 0xC7EFFFFFE0000000)
          to label %14 unwind label %18

14:                                               ; preds = %4
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 0, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %2, ptr %16, align 8, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 128
  %.not = icmp eq ptr %2, null
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  br i1 %.not, label %55, label %20

18:                                               ; preds = %4
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %59

20:                                               ; preds = %14
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 184
  %23 = load ptr, ptr %22, align 8
  invoke void %23(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1)
          to label %24 unwind label %41

24:                                               ; preds = %20
  %25 = invoke noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %2, i32 noundef 0)
          to label %26 unwind label %43

26:                                               ; preds = %24
  %27 = fmul double %25, 2.000000e+00
  %28 = invoke noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %2, i32 noundef 1)
          to label %29 unwind label %45

29:                                               ; preds = %26
  %30 = fmul double %28, 2.000000e+00
  %31 = fcmp ugt double %3, 0.000000e+00
  %.0 = select i1 %31, double %3, double 1.000000e-02
  %32 = insertelement <2 x double> poison, double %27, i64 0
  %33 = insertelement <2 x double> %32, double %30, i64 1
  %34 = insertelement <2 x double> poison, double %.0, i64 0
  %35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
  %36 = fdiv <2 x double> %33, %35
  %37 = fadd <2 x double> %36, <double 5.000000e-01, double 5.000000e-01>
  %38 = fptosi <2 x double> %37 to <2 x i32>
  store <2 x i32> %38, ptr %9, align 8, !tbaa !25
  %39 = extractelement <2 x i32> %38, i64 0
  %40 = icmp slt i32 %39, 1
  br i1 %40, label %47, label %48

41:                                               ; preds = %20
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %58

43:                                               ; preds = %24
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %58

45:                                               ; preds = %26
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %58

47:                                               ; preds = %29
  store i32 1, ptr %9, align 8, !tbaa !20
  br label %48

48:                                               ; preds = %47, %29
  %49 = extractelement <2 x i32> %38, i64 1
  %50 = icmp slt i32 %49, 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 1, ptr %10, align 4, !tbaa !21
  br label %52

52:                                               ; preds = %51, %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %27, double noundef %30)
          to label %53 unwind label %56

53:                                               ; preds = %52
  invoke void @_ZN5R2Box5ResetERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(16) @R2null_point, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %54 unwind label %56

54:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %55

55:                                               ; preds = %14, %54
  ret void

56:                                               ; preds = %53, %52
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %58

58:                                               ; preds = %43, %56, %45, %41
  %.pn.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %44, %43 ], [ %57, %56 ], [ %46, %45 ]
  call void @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %59

59:                                               ; preds = %58, %18
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %58 ], [ %19, %18 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; 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 uwtable
declare dso_local noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) local_unnamed_addr #4 align 2

declare void @_ZN5R2Box5ResetERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

; 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 @_ZN7R2SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTS11RGBDSurface", !10, i64 8, !12, i64 16, !13, i64 24, !12, i64 40, !12, i64 44, !12, i64 48, !10, i64 56, !10, i64 64, !15, i64 72, !12, i64 112, !10, i64 120, !10, i64 128, !10, i64 136}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!"_ZTS7RNArrayIP6R2GridE", !14, i64 0}
!14 = !{!"_ZTS8RNVArray", !10, i64 0, !12, i64 8, !12, i64 12}
!15 = !{!"_ZTS5R2Box", !16, i64 0, !18, i64 8, !18, i64 24}
!16 = !{!"_ZTS7R2Solid", !17, i64 0}
!17 = !{!"_ZTS7R2Shape"}
!18 = !{!"_ZTS7R2Point", !11, i64 0}
!19 = !{!9, !12, i64 16}
!20 = !{!9, !12, i64 40}
!21 = !{!9, !12, i64 44}
!22 = !{!9, !12, i64 48}
!23 = !{!9, !12, i64 112}
!24 = !{!9, !10, i64 120}
!25 = !{!12, !12, i64 0}


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