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

; 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.R3Matrix = type { [3 x [3 x double]] }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RGBDConfiguration = type { ptr, %class.RNArray, %class.RNArray.0, ptr, ptr, ptr, ptr, %class.R3Box }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.0 = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.RGBDSurface = type { ptr, ptr, i32, %class.RNArray.1, i32, i32, i32, ptr, ptr, %class.R2Box, i32, ptr, ptr, ptr }
%class.RNArray.1 = type { %class.RNVArray }
%class.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }
%class.R2Point = type { [2 x double] }

@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [65 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration7SurfaceEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #0 align 2

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

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

declare void @_ZN8R3MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

declare i32 @fclose(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK17RGBDConfiguration9WriteFileEPKci(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4096 x i8], align 16
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.R3Matrix, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %class.R3Point, align 8
  %15 = alloca %class.R3Vector, align 8
  %16 = alloca %class.R3Vector, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca %class.R4Matrix, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4096, ptr %8) #6
  %28 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %38

31:                                               ; preds = %3
  %32 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %33 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %32, ptr noundef @.str.46, ptr noundef %34) #6
  %36 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %37 = call i32 @system(ptr noundef %36)
  br label %38

38:                                               ; preds = %31, %3
  %39 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %49

42:                                               ; preds = %38
  %43 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %44 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %43, ptr noundef @.str.46, ptr noundef %45) #6
  %47 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %48 = call i32 @system(ptr noundef %47)
  br label %49

49:                                               ; preds = %42, %38
  %50 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 5
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %60

53:                                               ; preds = %49
  %54 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %55 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 5
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  %57 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %54, ptr noundef @.str.46, ptr noundef %56) #6
  %58 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %59 = call i32 @system(ptr noundef %58)
  br label %60

60:                                               ; preds = %53, %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = call noalias ptr @fopen(ptr noundef %61, ptr noundef @.str.47)
  store ptr %62, ptr %9, align 8, !tbaa !5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %69, label %65

65:                                               ; preds = %60
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.16, ptr noundef %67) #6
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %346

69:                                               ; preds = %60
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.48, i32 noundef %71) #6
  %73 = call noundef ptr @_ZNK17RGBDConfiguration13DatasetFormatEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %79

75:                                               ; preds = %69
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = call noundef ptr @_ZNK17RGBDConfiguration13DatasetFormatEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.49, ptr noundef %77) #6
  br label %79

79:                                               ; preds = %75, %69
  %80 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %88

83:                                               ; preds = %79
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 3
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str.50, ptr noundef %86) #6
  br label %88

88:                                               ; preds = %83, %79
  %89 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %97

92:                                               ; preds = %88
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str.51, ptr noundef %95) #6
  br label %97

97:                                               ; preds = %92, %88
  %98 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 5
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %106

101:                                              ; preds = %97
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.RGBDConfiguration, ptr %27, i32 0, i32 5
  %104 = load ptr, ptr %103, align 8, !tbaa !21
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.52, ptr noundef %104) #6
  br label %106

106:                                              ; preds = %101, %97
  %107 = call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %141

109:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #6
  %110 = call noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 0)
  %111 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9RGBDImage10IntrinsicsEv(ptr noundef nonnull align 8 dereferenceable(488) %110)
  call void @_ZN8R3MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72) %11, ptr noundef nonnull align 8 dereferenceable(72) %111)
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 0)
  %114 = getelementptr inbounds double, ptr %113, i64 0
  %115 = load double, ptr %114, align 8, !tbaa !22
  %116 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 0)
  %117 = getelementptr inbounds double, ptr %116, i64 1
  %118 = load double, ptr %117, align 8, !tbaa !22
  %119 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 0)
  %120 = getelementptr inbounds double, ptr %119, i64 2
  %121 = load double, ptr %120, align 8, !tbaa !22
  %122 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 1)
  %123 = getelementptr inbounds double, ptr %122, i64 0
  %124 = load double, ptr %123, align 8, !tbaa !22
  %125 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 1)
  %126 = getelementptr inbounds double, ptr %125, i64 1
  %127 = load double, ptr %126, align 8, !tbaa !22
  %128 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 1)
  %129 = getelementptr inbounds double, ptr %128, i64 2
  %130 = load double, ptr %129, align 8, !tbaa !22
  %131 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 2)
  %132 = getelementptr inbounds double, ptr %131, i64 0
  %133 = load double, ptr %132, align 8, !tbaa !22
  %134 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 2)
  %135 = getelementptr inbounds double, ptr %134, i64 1
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %11, i32 noundef 2)
  %138 = getelementptr inbounds double, ptr %137, i64 2
  %139 = load double, ptr %138, align 8, !tbaa !22
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.53, double noundef %115, double noundef %118, double noundef %121, double noundef %124, double noundef %127, double noundef %130, double noundef %133, double noundef %136, double noundef %139) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #6
  br label %141

141:                                              ; preds = %109, %106
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.54) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %241, %141
  %145 = load i32, ptr %12, align 4, !tbaa !9
  %146 = call noundef i32 @_ZNK17RGBDConfiguration9NSurfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %244

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %150 = load i32, ptr %12, align 4, !tbaa !9
  %151 = call noundef ptr @_ZNK17RGBDConfiguration7SurfaceEi(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef %150)
  store ptr %151, ptr %13, align 8, !tbaa !5
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  %153 = load ptr, ptr %152, align 8, !tbaa !24
  %154 = getelementptr inbounds ptr, ptr %153, i64 18
  %155 = load ptr, ptr %154, align 8
  %156 = call noundef i32 %155(ptr noundef nonnull align 8 dereferenceable(144) %152)
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.RGBDSurface, ptr %157, i32 0, i32 11
  %159 = load ptr, ptr %158, align 8, !tbaa !26
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %209

161:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = getelementptr inbounds %class.RGBDSurface, ptr %162, i32 0, i32 11
  %164 = load ptr, ptr %163, align 8, !tbaa !26
  %165 = load ptr, ptr %164, align 8, !tbaa !24
  %166 = getelementptr inbounds ptr, ptr %165, i64 13
  %167 = load ptr, ptr %166, align 8
  call void %167(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %14, ptr noundef nonnull align 8 dereferenceable(120) %164)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  %168 = load ptr, ptr %13, align 8, !tbaa !5
  %169 = getelementptr inbounds %class.RGBDSurface, ptr %168, i32 0, i32 11
  %170 = load ptr, ptr %169, align 8, !tbaa !26
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle6NormalEv(ptr noundef nonnull align 8 dereferenceable(120) %170)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %171)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.RGBDSurface, ptr %172, i32 0, i32 11
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle4AxisEi(ptr noundef nonnull align 8 dereferenceable(120) %174, i32 noundef 1)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %175)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = getelementptr inbounds %class.RGBDSurface, ptr %176, i32 0, i32 11
  %178 = load ptr, ptr %177, align 8, !tbaa !26
  %179 = call noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %178, i32 noundef 0)
  store double %179, ptr %17, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = getelementptr inbounds %class.RGBDSurface, ptr %180, i32 0, i32 11
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = call noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %182, i32 noundef 1)
  store double %183, ptr %18, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %184)
  %186 = icmp ne ptr %185, null
  br i1 %186, label %187, label %190

187:                                              ; preds = %161
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  %189 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %188)
  br label %191

190:                                              ; preds = %161
  br label %191

191:                                              ; preds = %190, %187
  %192 = phi ptr [ %189, %187 ], [ @.str.14, %190 ]
  store ptr %192, ptr %19, align 8, !tbaa !5
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = load ptr, ptr %19, align 8, !tbaa !5
  %195 = load ptr, ptr %13, align 8, !tbaa !5
  %196 = call noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144) %195)
  %197 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %198 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %199 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %200 = call noundef double @_ZNK8R3Vector1XEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %201 = call noundef double @_ZNK8R3Vector1YEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %202 = call noundef double @_ZNK8R3Vector1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %203 = call noundef double @_ZNK8R3Vector1XEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %204 = call noundef double @_ZNK8R3Vector1YEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %205 = call noundef double @_ZNK8R3Vector1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %206 = load double, ptr %17, align 8, !tbaa !22
  %207 = load double, ptr %18, align 8, !tbaa !22
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.55, ptr noundef %194, double noundef %196, double noundef %197, double noundef %198, double noundef %199, double noundef %200, double noundef %201, double noundef %202, double noundef %203, double noundef %204, double noundef %205, double noundef %206, double noundef %207) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %240

209:                                              ; preds = %149
  %210 = load ptr, ptr %13, align 8, !tbaa !5
  %211 = getelementptr inbounds %class.RGBDSurface, ptr %210, i32 0, i32 12
  %212 = load ptr, ptr %211, align 8, !tbaa !33
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %239

214:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %215)
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %221

218:                                              ; preds = %214
  %219 = load ptr, ptr %13, align 8, !tbaa !5
  %220 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %219)
  br label %222

221:                                              ; preds = %214
  br label %222

222:                                              ; preds = %221, %218
  %223 = phi ptr [ %220, %218 ], [ @.str.14, %221 ]
  store ptr %223, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %224 = load ptr, ptr %13, align 8, !tbaa !5
  %225 = call noundef ptr @_ZNK11RGBDSurface12MeshFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %224)
  %226 = icmp ne ptr %225, null
  br i1 %226, label %227, label %230

227:                                              ; preds = %222
  %228 = load ptr, ptr %13, align 8, !tbaa !5
  %229 = call noundef ptr @_ZNK11RGBDSurface12MeshFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %228)
  br label %231

230:                                              ; preds = %222
  br label %231

231:                                              ; preds = %230, %227
  %232 = phi ptr [ %229, %227 ], [ @.str.14, %230 ]
  store ptr %232, ptr %21, align 8, !tbaa !5
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = load ptr, ptr %20, align 8, !tbaa !5
  %235 = load ptr, ptr %21, align 8, !tbaa !5
  %236 = load ptr, ptr %13, align 8, !tbaa !5
  %237 = call noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144) %236)
  %238 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef @.str.56, ptr noundef %234, ptr noundef %235, double noundef %237) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %239

239:                                              ; preds = %231, %209
  br label %240

240:                                              ; preds = %239, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %12, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %12, align 4, !tbaa !9
  br label %144, !llvm.loop !34

244:                                              ; preds = %148
  %245 = load ptr, ptr %9, align 8, !tbaa !5
  %246 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %245, ptr noundef @.str.54) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %340, %244
  %248 = load i32, ptr %22, align 4, !tbaa !9
  %249 = call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %27)
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %343

252:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %253 = load i32, ptr %22, align 4, !tbaa !9
  %254 = call noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef %253)
  store ptr %254, ptr %23, align 8, !tbaa !5
  %255 = load i32, ptr %7, align 4, !tbaa !9
  %256 = icmp sgt i32 %255, 1
  br i1 %256, label %257, label %263

257:                                              ; preds = %252
  %258 = load i32, ptr %22, align 4, !tbaa !9
  %259 = load i32, ptr %7, align 4, !tbaa !9
  %260 = srem i32 %258, %259
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %263

262:                                              ; preds = %257
  store i32 7, ptr %10, align 4
  br label %337

263:                                              ; preds = %257, %252
  call void @llvm.lifetime.start.p0(i64 128, ptr %24) #6
  %264 = load ptr, ptr %23, align 8, !tbaa !5
  %265 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %264)
  %266 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK8R3Affine6MatrixEv(ptr noundef nonnull align 8 dereferenceable(272) %265)
  call void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %24, ptr noundef nonnull align 8 dereferenceable(128) %266)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %267 = load ptr, ptr %23, align 8, !tbaa !5
  %268 = call noundef ptr @_ZNK9RGBDImage13DepthFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %267)
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %273

270:                                              ; preds = %263
  %271 = load ptr, ptr %23, align 8, !tbaa !5
  %272 = call noundef ptr @_ZNK9RGBDImage13DepthFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %271)
  br label %274

273:                                              ; preds = %263
  br label %274

274:                                              ; preds = %273, %270
  %275 = phi ptr [ %272, %270 ], [ @.str.14, %273 ]
  store ptr %275, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %276 = load ptr, ptr %23, align 8, !tbaa !5
  %277 = call noundef ptr @_ZNK9RGBDImage13ColorFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %276)
  %278 = icmp ne ptr %277, null
  br i1 %278, label %279, label %282

279:                                              ; preds = %274
  %280 = load ptr, ptr %23, align 8, !tbaa !5
  %281 = call noundef ptr @_ZNK9RGBDImage13ColorFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %280)
  br label %283

282:                                              ; preds = %274
  br label %283

283:                                              ; preds = %282, %279
  %284 = phi ptr [ %281, %279 ], [ @.str.14, %282 ]
  store ptr %284, ptr %26, align 8, !tbaa !5
  %285 = load ptr, ptr %9, align 8, !tbaa !5
  %286 = load ptr, ptr %25, align 8, !tbaa !5
  %287 = load ptr, ptr %26, align 8, !tbaa !5
  %288 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 0)
  %289 = getelementptr inbounds double, ptr %288, i64 0
  %290 = load double, ptr %289, align 8, !tbaa !22
  %291 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 0)
  %292 = getelementptr inbounds double, ptr %291, i64 1
  %293 = load double, ptr %292, align 8, !tbaa !22
  %294 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 0)
  %295 = getelementptr inbounds double, ptr %294, i64 2
  %296 = load double, ptr %295, align 8, !tbaa !22
  %297 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 0)
  %298 = getelementptr inbounds double, ptr %297, i64 3
  %299 = load double, ptr %298, align 8, !tbaa !22
  %300 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 1)
  %301 = getelementptr inbounds double, ptr %300, i64 0
  %302 = load double, ptr %301, align 8, !tbaa !22
  %303 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 1)
  %304 = getelementptr inbounds double, ptr %303, i64 1
  %305 = load double, ptr %304, align 8, !tbaa !22
  %306 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 1)
  %307 = getelementptr inbounds double, ptr %306, i64 2
  %308 = load double, ptr %307, align 8, !tbaa !22
  %309 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 1)
  %310 = getelementptr inbounds double, ptr %309, i64 3
  %311 = load double, ptr %310, align 8, !tbaa !22
  %312 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 2)
  %313 = getelementptr inbounds double, ptr %312, i64 0
  %314 = load double, ptr %313, align 8, !tbaa !22
  %315 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 2)
  %316 = getelementptr inbounds double, ptr %315, i64 1
  %317 = load double, ptr %316, align 8, !tbaa !22
  %318 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 2)
  %319 = getelementptr inbounds double, ptr %318, i64 2
  %320 = load double, ptr %319, align 8, !tbaa !22
  %321 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 2)
  %322 = getelementptr inbounds double, ptr %321, i64 3
  %323 = load double, ptr %322, align 8, !tbaa !22
  %324 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 3)
  %325 = getelementptr inbounds double, ptr %324, i64 0
  %326 = load double, ptr %325, align 8, !tbaa !22
  %327 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 3)
  %328 = getelementptr inbounds double, ptr %327, i64 1
  %329 = load double, ptr %328, align 8, !tbaa !22
  %330 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 3)
  %331 = getelementptr inbounds double, ptr %330, i64 2
  %332 = load double, ptr %331, align 8, !tbaa !22
  %333 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef 3)
  %334 = getelementptr inbounds double, ptr %333, i64 3
  %335 = load double, ptr %334, align 8, !tbaa !22
  %336 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %285, ptr noundef @.str.57, ptr noundef %286, ptr noundef %287, double noundef %290, double noundef %293, double noundef %296, double noundef %299, double noundef %302, double noundef %305, double noundef %308, double noundef %311, double noundef %314, double noundef %317, double noundef %320, double noundef %323, double noundef %326, double noundef %329, double noundef %332, double noundef %335) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %24) #6
  store i32 0, ptr %10, align 4
  br label %337

337:                                              ; preds = %283, %262
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  %338 = load i32, ptr %10, align 4
  switch i32 %338, label %348 [
    i32 0, label %339
    i32 7, label %340
  ]

339:                                              ; preds = %337
  br label %340

340:                                              ; preds = %339, %337
  %341 = load i32, ptr %22, align 4, !tbaa !9
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %22, align 4, !tbaa !9
  br label %247, !llvm.loop !36

343:                                              ; preds = %251
  %344 = load ptr, ptr %9, align 8, !tbaa !5
  %345 = call i32 @fclose(ptr noundef %344)
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %346

346:                                              ; preds = %343, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #6
  %347 = load i32, ptr %4, align 4
  ret i32 %347

348:                                              ; preds = %337
  unreachable
}

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

declare i32 @system(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9RGBDImage10IntrinsicsEv(ptr noundef nonnull align 8 dereferenceable(488)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle6NormalEv(ptr noundef nonnull align 8 dereferenceable(120)) #0 align 2

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle4AxisEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144)) #0 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488)) #5 align 2

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

declare void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTS17RGBDConfiguration", !13, i64 8, !15, i64 24, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !16, i64 72}
!13 = !{!"_ZTS7RNArrayIP9RGBDImageE", !14, i64 0}
!14 = !{!"_ZTS8RNVArray", !6, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !14, i64 0}
!16 = !{!"_ZTS5R3Box", !17, i64 0, !19, i64 8, !19, i64 32}
!17 = !{!"_ZTS7R3Solid", !18, i64 0}
!18 = !{!"_ZTS7R3Shape"}
!19 = !{!"_ZTS7R3Point", !7, i64 0}
!20 = !{!12, !6, i64 48}
!21 = !{!12, !6, i64 56}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !8, i64 0}
!26 = !{!27, !6, i64 120}
!27 = !{!"_ZTS11RGBDSurface", !6, i64 8, !10, i64 16, !28, i64 24, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !6, i64 64, !29, i64 72, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136}
!28 = !{!"_ZTS7RNArrayIP6R2GridE", !14, i64 0}
!29 = !{!"_ZTS5R2Box", !30, i64 0, !32, i64 8, !32, i64 24}
!30 = !{!"_ZTS7R2Solid", !31, i64 0}
!31 = !{!"_ZTS7R2Shape"}
!32 = !{!"_ZTS7R2Point", !7, i64 0}
!33 = !{!27, !6, i64 128}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}


; 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.R3Matrix = type { [3 x [3 x double]] }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R4Matrix = type { [4 x [4 x double]] }

@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [65 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK17RGBDConfiguration7SurfaceEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #0 align 2

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

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

declare void @_ZN8R3MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZNK17RGBDConfiguration9WriteFileEPKci(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca [4096 x i8], align 16
  %5 = alloca %class.R3Matrix, align 8
  %6 = alloca %class.R3Point, align 8
  %7 = alloca %class.R3Vector, align 8
  %8 = alloca %class.R3Vector, align 8
  %9 = alloca %class.R4Matrix, align 8
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %15, label %12

12:                                               ; preds = %3
  %13 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.46, ptr noundef nonnull %11) #7
  %14 = call i32 @system(ptr noundef nonnull %4)
  br label %15

15:                                               ; preds = %12, %3
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %.not63 = icmp eq ptr %17, null
  br i1 %.not63, label %21, label %18

18:                                               ; preds = %15
  %19 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.46, ptr noundef nonnull %17) #7
  %20 = call i32 @system(ptr noundef nonnull %4)
  br label %21

21:                                               ; preds = %18, %15
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %.not64 = icmp eq ptr %23, null
  br i1 %.not64, label %27, label %24

24:                                               ; preds = %21
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.46, ptr noundef nonnull %23) #7
  %26 = call i32 @system(ptr noundef nonnull %4)
  br label %27

27:                                               ; preds = %24, %21
  %28 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.47)
  %.not65 = icmp eq ptr %28, null
  br i1 %.not65, label %29, label %32

29:                                               ; preds = %27
  %30 = load ptr, ptr @stderr, align 8, !tbaa !20
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.16, ptr noundef %1) #8
  br label %212

32:                                               ; preds = %27
  %33 = tail call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.48, i32 noundef %33) #7
  %35 = tail call noundef ptr @_ZNK17RGBDConfiguration13DatasetFormatEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %.not66 = icmp eq ptr %35, null
  br i1 %.not66, label %39, label %36

36:                                               ; preds = %32
  %37 = tail call noundef ptr @_ZNK17RGBDConfiguration13DatasetFormatEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.49, ptr noundef %37) #7
  br label %39

39:                                               ; preds = %36, %32
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %.not67 = icmp eq ptr %40, null
  br i1 %.not67, label %43, label %41

41:                                               ; preds = %39
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.50, ptr noundef nonnull %40) #7
  br label %43

43:                                               ; preds = %41, %39
  %44 = load ptr, ptr %16, align 8, !tbaa !18
  %.not68 = icmp eq ptr %44, null
  br i1 %.not68, label %47, label %45

45:                                               ; preds = %43
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.51, ptr noundef nonnull %44) #7
  br label %47

47:                                               ; preds = %45, %43
  %48 = load ptr, ptr %22, align 8, !tbaa !19
  %.not69 = icmp eq ptr %48, null
  br i1 %.not69, label %51, label %49

49:                                               ; preds = %47
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.52, ptr noundef nonnull %48) #7
  br label %51

51:                                               ; preds = %49, %47
  %52 = tail call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %54, label %82

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #7
  %55 = tail call noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 0)
  %56 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9RGBDImage10IntrinsicsEv(ptr noundef nonnull align 8 dereferenceable(488) %55)
  call void @_ZN8R3MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(72) %56)
  %57 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
  %58 = load double, ptr %57, align 8, !tbaa !21
  %59 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load double, ptr %60, align 8, !tbaa !21
  %62 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 0)
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %64 = load double, ptr %63, align 8, !tbaa !21
  %65 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 1)
  %66 = load double, ptr %65, align 8, !tbaa !21
  %67 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 1)
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load double, ptr %68, align 8, !tbaa !21
  %70 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 1)
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load double, ptr %71, align 8, !tbaa !21
  %73 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 2)
  %74 = load double, ptr %73, align 8, !tbaa !21
  %75 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 2)
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load double, ptr %76, align 8, !tbaa !21
  %78 = call noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72) %5, i32 noundef 2)
  %79 = getelementptr inbounds i8, ptr %78, i64 16
  %80 = load double, ptr %79, align 8, !tbaa !21
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.53, double noundef %58, double noundef %61, double noundef %64, double noundef %66, double noundef %69, double noundef %72, double noundef %74, double noundef %77, double noundef %80) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #7
  br label %82

82:                                               ; preds = %54, %51
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.54) #7
  %84 = call noundef i32 @_ZNK17RGBDConfiguration9NSurfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %141, %82
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.54) #7
  %87 = call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph82, label %._crit_edge83

.lr.ph82:                                         ; preds = %._crit_edge
  %89 = icmp sgt i32 %2, 1
  br label %146

.lr.ph:                                           ; preds = %82, %141
  %.05378 = phi i32 [ %142, %141 ], [ 0, %82 ]
  %90 = call noundef ptr @_ZNK17RGBDConfiguration7SurfaceEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.05378)
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  %92 = getelementptr inbounds i8, ptr %91, i64 144
  %93 = load ptr, ptr %92, align 8
  %94 = call noundef i32 %93(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %95 = getelementptr inbounds i8, ptr %90, i64 120
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  %.not73 = icmp eq ptr %96, null
  br i1 %.not73, label %125, label %97

97:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  %98 = load ptr, ptr %96, align 8, !tbaa !23
  %99 = getelementptr inbounds i8, ptr %98, i64 104
  %100 = load ptr, ptr %99, align 8
  call void %100(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %6, ptr noundef nonnull align 8 dereferenceable(120) %96)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %101 = load ptr, ptr %95, align 8, !tbaa !25
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle6NormalEv(ptr noundef nonnull align 8 dereferenceable(120) %101)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %102)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  %103 = load ptr, ptr %95, align 8, !tbaa !25
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle4AxisEi(ptr noundef nonnull align 8 dereferenceable(120) %103, i32 noundef 1)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %104)
  %105 = load ptr, ptr %95, align 8, !tbaa !25
  %106 = call noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %105, i32 noundef 0)
  %107 = load ptr, ptr %95, align 8, !tbaa !25
  %108 = call noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120) %107, i32 noundef 1)
  %109 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %.not77 = icmp eq ptr %109, null
  br i1 %.not77, label %112, label %110

110:                                              ; preds = %97
  %111 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  br label %112

112:                                              ; preds = %97, %110
  %113 = phi ptr [ %111, %110 ], [ @.str.14, %97 ]
  %114 = call noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %115 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %116 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %117 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %118 = call noundef double @_ZNK8R3Vector1XEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %119 = call noundef double @_ZNK8R3Vector1YEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %120 = call noundef double @_ZNK8R3Vector1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %121 = call noundef double @_ZNK8R3Vector1XEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %122 = call noundef double @_ZNK8R3Vector1YEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %123 = call noundef double @_ZNK8R3Vector1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.55, ptr noundef %113, double noundef %114, double noundef %115, double noundef %116, double noundef %117, double noundef %118, double noundef %119, double noundef %120, double noundef %121, double noundef %122, double noundef %123, double noundef %106, double noundef %108) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  br label %141

125:                                              ; preds = %.lr.ph
  %126 = getelementptr inbounds i8, ptr %90, i64 128
  %127 = load ptr, ptr %126, align 8, !tbaa !32
  %.not74 = icmp eq ptr %127, null
  br i1 %.not74, label %141, label %128

128:                                              ; preds = %125
  %129 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %.not75 = icmp eq ptr %129, null
  br i1 %.not75, label %132, label %130

130:                                              ; preds = %128
  %131 = call noundef ptr @_ZNK11RGBDSurface15TextureFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  br label %132

132:                                              ; preds = %128, %130
  %133 = phi ptr [ %131, %130 ], [ @.str.14, %128 ]
  %134 = call noundef ptr @_ZNK11RGBDSurface12MeshFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %.not76 = icmp eq ptr %134, null
  br i1 %.not76, label %137, label %135

135:                                              ; preds = %132
  %136 = call noundef ptr @_ZNK11RGBDSurface12MeshFilenameEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  br label %137

137:                                              ; preds = %132, %135
  %138 = phi ptr [ %136, %135 ], [ @.str.14, %132 ]
  %139 = call noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144) %90)
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.56, ptr noundef %133, ptr noundef %138, double noundef %139) #7
  br label %141

141:                                              ; preds = %125, %137, %112
  %142 = add nuw nsw i32 %.05378, 1
  %143 = call noundef i32 @_ZNK17RGBDConfiguration9NSurfacesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %.lr.ph, label %._crit_edge, !llvm.loop !33

._crit_edge83:                                    ; preds = %208, %._crit_edge
  %145 = call i32 @fclose(ptr noundef nonnull %28)
  br label %212

146:                                              ; preds = %.lr.ph82, %208
  %.05479 = phi i32 [ 0, %.lr.ph82 ], [ %209, %208 ]
  %147 = call noundef ptr @_ZNK17RGBDConfiguration5ImageEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.05479)
  br i1 %89, label %148, label %150

148:                                              ; preds = %146
  %149 = urem i32 %.05479, %2
  %.not70 = icmp eq i32 %149, 0
  br i1 %.not70, label %150, label %208

150:                                              ; preds = %148, %146
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #7
  %151 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %147)
  %152 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK8R3Affine6MatrixEv(ptr noundef nonnull align 8 dereferenceable(272) %151)
  call void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull align 8 dereferenceable(128) %152)
  %153 = call noundef ptr @_ZNK9RGBDImage13DepthFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %147)
  %.not71 = icmp eq ptr %153, null
  br i1 %.not71, label %156, label %154

154:                                              ; preds = %150
  %155 = call noundef ptr @_ZNK9RGBDImage13DepthFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %147)
  br label %156

156:                                              ; preds = %150, %154
  %157 = phi ptr [ %155, %154 ], [ @.str.14, %150 ]
  %158 = call noundef ptr @_ZNK9RGBDImage13ColorFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %147)
  %.not72 = icmp eq ptr %158, null
  br i1 %.not72, label %161, label %159

159:                                              ; preds = %156
  %160 = call noundef ptr @_ZNK9RGBDImage13ColorFilenameEv(ptr noundef nonnull align 8 dereferenceable(488) %147)
  br label %161

161:                                              ; preds = %156, %159
  %162 = phi ptr [ %160, %159 ], [ @.str.14, %156 ]
  %163 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 0)
  %164 = load double, ptr %163, align 8, !tbaa !21
  %165 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 0)
  %166 = getelementptr inbounds i8, ptr %165, i64 8
  %167 = load double, ptr %166, align 8, !tbaa !21
  %168 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 0)
  %169 = getelementptr inbounds i8, ptr %168, i64 16
  %170 = load double, ptr %169, align 8, !tbaa !21
  %171 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 0)
  %172 = getelementptr inbounds i8, ptr %171, i64 24
  %173 = load double, ptr %172, align 8, !tbaa !21
  %174 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 1)
  %175 = load double, ptr %174, align 8, !tbaa !21
  %176 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 1)
  %177 = getelementptr inbounds i8, ptr %176, i64 8
  %178 = load double, ptr %177, align 8, !tbaa !21
  %179 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 1)
  %180 = getelementptr inbounds i8, ptr %179, i64 16
  %181 = load double, ptr %180, align 8, !tbaa !21
  %182 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 1)
  %183 = getelementptr inbounds i8, ptr %182, i64 24
  %184 = load double, ptr %183, align 8, !tbaa !21
  %185 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 2)
  %186 = load double, ptr %185, align 8, !tbaa !21
  %187 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 2)
  %188 = getelementptr inbounds i8, ptr %187, i64 8
  %189 = load double, ptr %188, align 8, !tbaa !21
  %190 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 2)
  %191 = getelementptr inbounds i8, ptr %190, i64 16
  %192 = load double, ptr %191, align 8, !tbaa !21
  %193 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 2)
  %194 = getelementptr inbounds i8, ptr %193, i64 24
  %195 = load double, ptr %194, align 8, !tbaa !21
  %196 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 3)
  %197 = load double, ptr %196, align 8, !tbaa !21
  %198 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 3)
  %199 = getelementptr inbounds i8, ptr %198, i64 8
  %200 = load double, ptr %199, align 8, !tbaa !21
  %201 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 3)
  %202 = getelementptr inbounds i8, ptr %201, i64 16
  %203 = load double, ptr %202, align 8, !tbaa !21
  %204 = call noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 3)
  %205 = getelementptr inbounds i8, ptr %204, i64 24
  %206 = load double, ptr %205, align 8, !tbaa !21
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %28, ptr noundef nonnull @.str.57, ptr noundef %157, ptr noundef %162, double noundef %164, double noundef %167, double noundef %170, double noundef %173, double noundef %175, double noundef %178, double noundef %181, double noundef %184, double noundef %186, double noundef %189, double noundef %192, double noundef %195, double noundef %197, double noundef %200, double noundef %203, double noundef %206) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #7
  br label %208

208:                                              ; preds = %148, %161
  %209 = add nuw nsw i32 %.05479, 1
  %210 = call noundef i32 @_ZNK17RGBDConfiguration7NImagesEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %146, label %._crit_edge83, !llvm.loop !35

212:                                              ; preds = %._crit_edge83, %29
  %.0 = phi i32 [ 1, %._crit_edge83 ], [ 0, %29 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #7
  ret i32 %.0
}

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

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZNK9RGBDImage10IntrinsicsEv(ptr noundef nonnull align 8 dereferenceable(488)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN8R3MatrixixEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle6NormalEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0 align 2

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK11R3Rectangle4AxisEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK11R3Rectangle6RadiusEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK11RGBDSurface17WorldTexelSpacingEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488)) local_unnamed_addr #6 align 2

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

declare void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN8R4MatrixixEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 = { nofree "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !9, i64 40}
!6 = !{!"_ZTS17RGBDConfiguration", !7, i64 8, !13, i64 24, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !14, i64 72}
!7 = !{!"_ZTS7RNArrayIP9RGBDImageE", !8, i64 0}
!8 = !{!"_ZTS8RNVArray", !9, i64 0, !12, i64 8, !12, i64 12}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !8, i64 0}
!14 = !{!"_ZTS5R3Box", !15, i64 0, !17, i64 8, !17, i64 32}
!15 = !{!"_ZTS7R3Solid", !16, i64 0}
!16 = !{!"_ZTS7R3Shape"}
!17 = !{!"_ZTS7R3Point", !10, i64 0}
!18 = !{!6, !9, i64 48}
!19 = !{!6, !9, i64 56}
!20 = !{!9, !9, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !10, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !11, i64 0}
!25 = !{!26, !9, i64 120}
!26 = !{!"_ZTS11RGBDSurface", !9, i64 8, !12, i64 16, !27, i64 24, !12, i64 40, !12, i64 44, !12, i64 48, !9, i64 56, !9, i64 64, !28, i64 72, !12, i64 112, !9, i64 120, !9, i64 128, !9, i64 136}
!27 = !{!"_ZTS7RNArrayIP6R2GridE", !8, i64 0}
!28 = !{!"_ZTS5R2Box", !29, i64 0, !31, i64 8, !31, i64 24}
!29 = !{!"_ZTS7R2Solid", !30, i64 0}
!30 = !{!"_ZTS7R2Shape"}
!31 = !{!"_ZTS7R2Point", !10, i64 0}
!32 = !{!26, !9, i64 128}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


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