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

; 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.R2Image = type { i32, i32, i32, i32, ptr }
%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 }
%class.R2Point = type { [2 x double] }

@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11RGBDSurface17ReadColorChannelsEv(ptr noundef nonnull align 8 dereferenceable(144) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %class.R2Image, align 8
  %5 = alloca [4096 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %11 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 4
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 5
  %14 = load i32, ptr %13, align 4, !tbaa !18
  call void @_ZN7R2ImageC1Eiii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %12, i32 noundef %14, i32 noundef 3)
  %15 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 7
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %88

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4096, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %19 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %27

22:                                               ; preds = %18
  %23 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !20
  %25 = invoke noundef ptr @_ZNK17RGBDConfiguration16TextureDirectoryEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
          to label %26 unwind label %38

26:                                               ; preds = %22
  br label %28

27:                                               ; preds = %18
  br label %28

28:                                               ; preds = %27, %26
  %29 = phi ptr [ %25, %26 ], [ null, %27 ]
  store ptr %29, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %42

32:                                               ; preds = %28
  %33 = getelementptr inbounds [4096 x i8], ptr %5, i64 0, i64 0
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 7
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %37 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %33, ptr noundef @.str.6, ptr noundef %34, ptr noundef %36) #5
  br label %47

38:                                               ; preds = %74, %71, %65, %59, %53, %47, %22
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %5) #5
  br label %100

42:                                               ; preds = %28
  %43 = getelementptr inbounds [4096 x i8], ptr %5, i64 0, i64 0
  %44 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %43, ptr noundef @.str.7, ptr noundef %45) #5
  br label %47

47:                                               ; preds = %42, %32
  %48 = getelementptr inbounds [4096 x i8], ptr %5, i64 0, i64 0
  %49 = invoke noundef i32 @_Z12RNFileExistsPKc(ptr noundef %48)
          to label %50 unwind label %38

50:                                               ; preds = %47
  %51 = icmp ne i32 %49, 0
  br i1 %51, label %53, label %52

52:                                               ; preds = %50
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %85

53:                                               ; preds = %50
  %54 = getelementptr inbounds [4096 x i8], ptr %5, i64 0, i64 0
  %55 = invoke noundef i32 @_ZN7R2Image4ReadEPKc(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %54)
          to label %56 unwind label %38

56:                                               ; preds = %53
  %57 = icmp ne i32 %55, 0
  br i1 %57, label %59, label %58

58:                                               ; preds = %56
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %85

59:                                               ; preds = %56
  %60 = invoke noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %61 unwind label %38

61:                                               ; preds = %59
  %62 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 4
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = icmp ne i32 %60, %63
  br i1 %64, label %71, label %65

65:                                               ; preds = %61
  %66 = invoke noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %67 unwind label %38

67:                                               ; preds = %65
  %68 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 5
  %69 = load i32, ptr %68, align 4, !tbaa !18
  %70 = icmp ne i32 %66, %69
  br i1 %70, label %71, label %84

71:                                               ; preds = %67, %61
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = invoke noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %74 unwind label %38

74:                                               ; preds = %71
  %75 = invoke noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %76 unwind label %38

76:                                               ; preds = %74
  %77 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 4
  %78 = load i32, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 5
  %80 = load i32, ptr %79, align 4, !tbaa !18
  %81 = getelementptr inbounds %class.RGBDSurface, ptr %10, i32 0, i32 7
  %82 = load ptr, ptr %81, align 8, !tbaa !19
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.8, i32 noundef %73, i32 noundef %75, i32 noundef %78, i32 noundef %80, ptr noundef %82) #5
  br label %84

84:                                               ; preds = %76, %67
  store i32 0, ptr %9, align 4
  br label %85

85:                                               ; preds = %84, %58, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %5) #5
  %86 = load i32, ptr %9, align 4
  switch i32 %86, label %98 [
    i32 0, label %87
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %1
  %89 = load ptr, ptr %10, align 8, !tbaa !21
  %90 = getelementptr inbounds ptr, ptr %89, i64 22
  %91 = load ptr, ptr %90, align 8
  %92 = invoke noundef i32 %91(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %93 unwind label %94

93:                                               ; preds = %88
  store i32 %92, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %98

94:                                               ; preds = %88
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %100

98:                                               ; preds = %93, %85
  call void @_ZN7R2ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  %99 = load i32, ptr %2, align 4
  ret i32 %99

100:                                              ; preds = %94, %38
  call void @_ZN7R2ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %7, align 8
  %103 = load i32, ptr %8, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

declare void @_ZN7R2ImageC1Eiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration16TextureDirectoryEv(ptr noundef nonnull align 8 dereferenceable(128)) #2 align 2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

declare noundef i32 @_Z12RNFileExistsPKc(ptr noundef) #4

declare noundef i32 @_ZN7R2Image4ReadEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4

; Function Attrs: nounwind
declare void @_ZN7R2ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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, !11, i64 40}
!10 = !{!"_ZTS11RGBDSurface", !6, i64 8, !11, i64 16, !12, i64 24, !11, i64 40, !11, i64 44, !11, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !11, i64 112, !6, i64 120, !6, i64 128, !6, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS7RNArrayIP6R2GridE", !13, i64 0}
!13 = !{!"_ZTS8RNVArray", !6, i64 0, !11, i64 8, !11, i64 12}
!14 = !{!"_ZTS5R2Box", !15, i64 0, !17, i64 8, !17, i64 24}
!15 = !{!"_ZTS7R2Solid", !16, i64 0}
!16 = !{!"_ZTS7R2Shape"}
!17 = !{!"_ZTS7R2Point", !7, i64 0}
!18 = !{!10, !11, i64 44}
!19 = !{!10, !6, i64 56}
!20 = !{!10, !6, i64 8}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, 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.R2Image = type { i32, i32, i32, i32, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11RGBDSurface17ReadColorChannelsEv(ptr noundef nonnull align 8 dereferenceable(144) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.R2Image, align 8
  %3 = alloca [4096 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 44
  %7 = load i32, ptr %6, align 4, !tbaa !17
  call void @_ZN7R2ImageC1Eiii(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %5, i32 noundef %7, i32 noundef 3)
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = load ptr, ptr %8, align 8, !tbaa !18
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %42, label %10

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %3) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !19
  %.not11 = icmp eq ptr %12, null
  br i1 %.not11, label %.thread, label %13

13:                                               ; preds = %10
  %14 = call noundef ptr @_ZNK17RGBDConfiguration16TextureDirectoryEv(ptr noundef nonnull align 8 dereferenceable(128) %12)
  %.not12 = icmp eq ptr %14, null
  %.pre = load ptr, ptr %8, align 8, !tbaa !18
  br i1 %.not12, label %.thread, label %15

15:                                               ; preds = %13
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %14, ptr noundef %.pre) #6
  br label %21

17:                                               ; preds = %24, %21
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %3) #6
  br label %50

.thread:                                          ; preds = %10, %13
  %19 = phi ptr [ %9, %10 ], [ %.pre, %13 ]
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %19) #6
  br label %21

21:                                               ; preds = %.thread, %15
  %22 = invoke noundef i32 @_Z12RNFileExistsPKc(ptr noundef nonnull %3)
          to label %23 unwind label %17

23:                                               ; preds = %21
  %.not13 = icmp eq i32 %22, 0
  br i1 %.not13, label %.critedge, label %24

24:                                               ; preds = %23
  %25 = invoke noundef i32 @_ZN7R2Image4ReadEPKc(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull %3)
          to label %26 unwind label %17

26:                                               ; preds = %24
  %.not14 = icmp eq i32 %25, 0
  br i1 %.not14, label %.critedge, label %27

27:                                               ; preds = %26
  %28 = call noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %29 = load i32, ptr %4, align 8, !tbaa !5
  %.not15 = icmp eq i32 %28, %29
  br i1 %.not15, label %30, label %33

30:                                               ; preds = %27
  %31 = call noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %32 = load i32, ptr %6, align 4, !tbaa !17
  %.not16 = icmp eq i32 %31, %32
  br i1 %.not16, label %41, label %33

33:                                               ; preds = %30, %27
  %34 = load ptr, ptr @stderr, align 8, !tbaa !20
  %35 = call noundef i32 @_ZNK7R2Image5WidthEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %36 = call noundef i32 @_ZNK7R2Image6HeightEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %37 = load i32, ptr %4, align 8, !tbaa !5
  %38 = load i32, ptr %6, align 4, !tbaa !17
  %39 = load ptr, ptr %8, align 8, !tbaa !18
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.8, i32 noundef %35, i32 noundef %36, i32 noundef %37, i32 noundef %38, ptr noundef %39) #7
  br label %41

41:                                               ; preds = %30, %33
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %3) #6
  br label %42

42:                                               ; preds = %41, %1
  %43 = load ptr, ptr %0, align 8, !tbaa !21
  %44 = getelementptr inbounds i8, ptr %43, i64 176
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef i32 %45(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %49 unwind label %47

47:                                               ; preds = %42
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %50

.critedge:                                        ; preds = %26, %23
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %3) #6
  br label %49

49:                                               ; preds = %42, %.critedge
  %.1 = phi i32 [ 0, %.critedge ], [ %46, %42 ]
  call void @_ZN7R2ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  ret i32 %.1

50:                                               ; preds = %47, %17
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %18, %17 ]
  call void @_ZN7R2ImageD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn
}

declare void @_ZN7R2ImageC1Eiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration16TextureDirectoryEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare noundef i32 @_Z12RNFileExistsPKc(ptr noundef) local_unnamed_addr #4

declare noundef i32 @_ZN7R2Image4ReadEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 "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, !10, i64 40}
!6 = !{!"_ZTS11RGBDSurface", !7, i64 8, !10, i64 16, !11, i64 24, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !7, i64 64, !13, i64 72, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS7RNArrayIP6R2GridE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !7, i64 0, !10, i64 8, !10, i64 12}
!13 = !{!"_ZTS5R2Box", !14, i64 0, !16, i64 8, !16, i64 24}
!14 = !{!"_ZTS7R2Solid", !15, i64 0}
!15 = !{!"_ZTS7R2Shape"}
!16 = !{!"_ZTS7R2Point", !8, i64 0}
!17 = !{!6, !10, i64 44}
!18 = !{!6, !7, i64 56}
!19 = !{!6, !7, i64 8}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass