; LLVM IR from niessner/Matterport :: code/gaps/pkgs/RGBD (RGBDUtil)

; 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.R2Grid = type { %class.R2Affine, %class.R2Affine, double, ptr, [2 x i32], i32, i32 }
%class.R2Affine = type <{ %class.R2Transformation, %class.R3Matrix, i32, [4 x i8] }>
%class.R2Transformation = type { ptr }
%class.R3Matrix = type { [3 x [3 x double]] }
%class.R2Point = type { [2 x double] }
%class.RGBDCamera = type <{ i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, %class.R4Matrix, ptr, ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%class.R4Matrix = type { [4 x [4 x double]] }

@RN_EPSILON = external global double, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [225 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1

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

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

declare void @_ZN6R2GridC1Eii(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) #1

declare void @_ZN6R2Grid5ClearEd(ptr noundef nonnull align 8 dereferenceable(208), double noundef) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef, double noundef) #4 align 2

declare void @_ZN6R2GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z9RNIsEqualddd(double noundef, double noundef, double noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z31RGBDCreateUndistortedColorImageRK6R2GridRS_RK10RGBDCameraS5_(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(208) %1, ptr noundef nonnull align 8 dereferenceable(348) %2, ptr noundef nonnull align 8 dereferenceable(348) %3) #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.R2Grid, align 8
  %14 = alloca %class.R2Grid, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %class.R2Point, align 8
  %20 = alloca %class.R2Point, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca %class.R2Point, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.RGBDCamera, ptr %32, i32 0, i32 8
  %34 = load double, ptr %33, align 8, !tbaa !9
  %35 = fcmp oeq double %34, 0.000000e+00
  br i1 %35, label %36, label %61

36:                                               ; preds = %4
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.RGBDCamera, ptr %37, i32 0, i32 9
  %39 = load double, ptr %38, align 8, !tbaa !14
  %40 = fcmp oeq double %39, 0.000000e+00
  br i1 %40, label %41, label %61

41:                                               ; preds = %36
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %class.RGBDCamera, ptr %42, i32 0, i32 10
  %44 = load double, ptr %43, align 8, !tbaa !15
  %45 = fcmp oeq double %44, 0.000000e+00
  br i1 %45, label %46, label %61

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.RGBDCamera, ptr %47, i32 0, i32 11
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = fcmp oeq double %49, 0.000000e+00
  br i1 %50, label %51, label %61

51:                                               ; preds = %46
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.RGBDCamera, ptr %52, i32 0, i32 12
  %54 = load double, ptr %53, align 8, !tbaa !17
  %55 = fcmp oeq double %54, 0.000000e+00
  br i1 %55, label %56, label %61

56:                                               ; preds = %51
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.RGBDCamera, ptr %57, i32 0, i32 13
  %59 = load double, ptr %58, align 8, !tbaa !18
  %60 = fcmp oeq double %59, 0.000000e+00
  br i1 %60, label %62, label %61

61:                                               ; preds = %56, %51, %46, %41, %36, %4
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 401, ptr noundef @.str.2)
  br label %62

62:                                               ; preds = %61, %56
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.RGBDCamera, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !19
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %72, label %67

67:                                               ; preds = %62
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.RGBDCamera, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !20
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %67, %62
  store i32 0, ptr %5, align 4
  br label %501

73:                                               ; preds = %67
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %class.RGBDCamera, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !19
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %83, label %78

78:                                               ; preds = %73
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.RGBDCamera, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !20
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %78, %73
  store i32 0, ptr %5, align 4
  br label %501

84:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.RGBDCamera, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !19
  %88 = sitofp i32 %87 to double
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.RGBDCamera, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !19
  %92 = sitofp i32 %91 to double
  %93 = fdiv double %88, %92
  store double %93, ptr %10, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.RGBDCamera, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !20
  %97 = sitofp i32 %96 to double
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %class.RGBDCamera, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !20
  %101 = sitofp i32 %100 to double
  %102 = fdiv double %97, %101
  store double %102, ptr %11, align 8, !tbaa !21
  %103 = load double, ptr %10, align 8, !tbaa !21
  %104 = load double, ptr @RN_EPSILON, align 8, !tbaa !21
  %105 = call noundef i32 @_Z9RNIsEqualddd(double noundef %103, double noundef 1.000000e+00, double noundef %104)
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %180

107:                                              ; preds = %84
  %108 = load double, ptr %11, align 8, !tbaa !21
  %109 = load double, ptr @RN_EPSILON, align 8, !tbaa !21
  %110 = call noundef i32 @_Z9RNIsEqualddd(double noundef %108, double noundef 1.000000e+00, double noundef %109)
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %180

112:                                              ; preds = %107
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %class.RGBDCamera, ptr %113, i32 0, i32 6
  %115 = load double, ptr %114, align 8, !tbaa !22
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %class.RGBDCamera, ptr %116, i32 0, i32 6
  %118 = load double, ptr %117, align 8, !tbaa !22
  %119 = fcmp oeq double %115, %118
  br i1 %119, label %120, label %180

120:                                              ; preds = %112
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %class.RGBDCamera, ptr %121, i32 0, i32 7
  %123 = load double, ptr %122, align 8, !tbaa !23
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %class.RGBDCamera, ptr %124, i32 0, i32 7
  %126 = load double, ptr %125, align 8, !tbaa !23
  %127 = fcmp oeq double %123, %126
  br i1 %127, label %128, label %180

128:                                              ; preds = %120
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %class.RGBDCamera, ptr %129, i32 0, i32 8
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %class.RGBDCamera, ptr %132, i32 0, i32 8
  %134 = load double, ptr %133, align 8, !tbaa !9
  %135 = fcmp oeq double %131, %134
  br i1 %135, label %136, label %180

136:                                              ; preds = %128
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %class.RGBDCamera, ptr %137, i32 0, i32 9
  %139 = load double, ptr %138, align 8, !tbaa !14
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds %class.RGBDCamera, ptr %140, i32 0, i32 9
  %142 = load double, ptr %141, align 8, !tbaa !14
  %143 = fcmp oeq double %139, %142
  br i1 %143, label %144, label %180

144:                                              ; preds = %136
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.RGBDCamera, ptr %145, i32 0, i32 10
  %147 = load double, ptr %146, align 8, !tbaa !15
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %class.RGBDCamera, ptr %148, i32 0, i32 10
  %150 = load double, ptr %149, align 8, !tbaa !15
  %151 = fcmp oeq double %147, %150
  br i1 %151, label %152, label %180

152:                                              ; preds = %144
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds %class.RGBDCamera, ptr %153, i32 0, i32 11
  %155 = load double, ptr %154, align 8, !tbaa !16
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.RGBDCamera, ptr %156, i32 0, i32 11
  %158 = load double, ptr %157, align 8, !tbaa !16
  %159 = fcmp oeq double %155, %158
  br i1 %159, label %160, label %180

160:                                              ; preds = %152
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  %162 = getelementptr inbounds %class.RGBDCamera, ptr %161, i32 0, i32 12
  %163 = load double, ptr %162, align 8, !tbaa !17
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = getelementptr inbounds %class.RGBDCamera, ptr %164, i32 0, i32 12
  %166 = load double, ptr %165, align 8, !tbaa !17
  %167 = fcmp oeq double %163, %166
  br i1 %167, label %168, label %180

168:                                              ; preds = %160
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %class.RGBDCamera, ptr %169, i32 0, i32 13
  %171 = load double, ptr %170, align 8, !tbaa !18
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.RGBDCamera, ptr %172, i32 0, i32 13
  %174 = load double, ptr %173, align 8, !tbaa !18
  %175 = fcmp oeq double %171, %174
  br i1 %175, label %176, label %180

176:                                              ; preds = %168
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208) %178, ptr noundef nonnull align 8 dereferenceable(208) %177)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %500

180:                                              ; preds = %168, %160, %152, %144, %136, %128, %120, %112, %107, %84
  call void @llvm.lifetime.start.p0(i64 208, ptr %13) #7
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6R2GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %13, ptr noundef nonnull align 8 dereferenceable(208) %181)
  call void @llvm.lifetime.start.p0(i64 208, ptr %14) #7
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = getelementptr inbounds %class.RGBDCamera, ptr %182, i32 0, i32 0
  %184 = load i32, ptr %183, align 8, !tbaa !19
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %class.RGBDCamera, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !20
  invoke void @_ZN6R2GridC1Eii(ptr noundef nonnull align 8 dereferenceable(208) %14, i32 noundef %184, i32 noundef %187)
          to label %188 unwind label %201

188:                                              ; preds = %180
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208) %189, ptr noundef nonnull align 8 dereferenceable(208) %14)
          to label %191 unwind label %205

191:                                              ; preds = %188
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %14) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %14) #7
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN6R2Grid5ClearEd(ptr noundef nonnull align 8 dereferenceable(208) %192, double noundef -3.210000e+02)
          to label %193 unwind label %210

193:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !24
  br label %194

194:                                              ; preds = %494, %193
  %195 = load i32, ptr %17, align 4, !tbaa !24
  %196 = load ptr, ptr %7, align 8, !tbaa !5
  %197 = invoke noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %196)
          to label %198 unwind label %214

198:                                              ; preds = %194
  %199 = icmp slt i32 %195, %197
  br i1 %199, label %218, label %200

200:                                              ; preds = %198
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %498

201:                                              ; preds = %180
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %15, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %16, align 4
  br label %209

205:                                              ; preds = %188
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %15, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %16, align 4
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %14) #7
  br label %209

209:                                              ; preds = %205, %201
  call void @llvm.lifetime.end.p0(i64 208, ptr %14) #7
  br label %499

210:                                              ; preds = %191
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %15, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %16, align 4
  br label %499

214:                                              ; preds = %194
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %15, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %16, align 4
  br label %497

218:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !24
  br label %219

219:                                              ; preds = %480, %218
  %220 = load i32, ptr %18, align 4, !tbaa !24
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = invoke noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %221)
          to label %223 unwind label %226

223:                                              ; preds = %219
  %224 = icmp slt i32 %220, %222
  br i1 %224, label %230, label %225

225:                                              ; preds = %223
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %493

226:                                              ; preds = %219
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %15, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %16, align 4
  br label %492

230:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %231 = load i32, ptr %18, align 4, !tbaa !24
  %232 = sitofp i32 %231 to double
  %233 = fadd double %232, 5.000000e-01
  %234 = load i32, ptr %17, align 4, !tbaa !24
  %235 = sitofp i32 %234 to double
  %236 = fadd double %235, 5.000000e-01
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %19, double noundef %233, double noundef %236)
          to label %237 unwind label %407

237:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  invoke void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %238 unwind label %411

238:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %239 = load double, ptr %10, align 8, !tbaa !21
  %240 = invoke noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %241 unwind label %415

241:                                              ; preds = %238
  %242 = load ptr, ptr %9, align 8, !tbaa !5
  %243 = getelementptr inbounds %class.RGBDCamera, ptr %242, i32 0, i32 6
  %244 = load double, ptr %243, align 8, !tbaa !22
  %245 = fsub double %240, %244
  %246 = load ptr, ptr %8, align 8, !tbaa !5
  %247 = getelementptr inbounds %class.RGBDCamera, ptr %246, i32 0, i32 6
  %248 = load double, ptr %247, align 8, !tbaa !22
  %249 = call double @llvm.fmuladd.f64(double %239, double %245, double %248)
  store double %249, ptr %21, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %250 = load double, ptr %11, align 8, !tbaa !21
  %251 = invoke noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %252 unwind label %419

252:                                              ; preds = %241
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = getelementptr inbounds %class.RGBDCamera, ptr %253, i32 0, i32 7
  %255 = load double, ptr %254, align 8, !tbaa !23
  %256 = fsub double %251, %255
  %257 = load ptr, ptr %8, align 8, !tbaa !5
  %258 = getelementptr inbounds %class.RGBDCamera, ptr %257, i32 0, i32 7
  %259 = load double, ptr %258, align 8, !tbaa !23
  %260 = call double @llvm.fmuladd.f64(double %250, double %256, double %259)
  store double %260, ptr %22, align 8, !tbaa !21
  %261 = load double, ptr %21, align 8, !tbaa !21
  %262 = load double, ptr %22, align 8, !tbaa !21
  invoke void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16) %20, double noundef %261, double noundef %262)
          to label %263 unwind label %419

263:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  invoke void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %264 unwind label %423

264:                                              ; preds = %263
  %265 = load ptr, ptr %8, align 8, !tbaa !5
  %266 = getelementptr inbounds %class.RGBDCamera, ptr %265, i32 0, i32 8
  %267 = load double, ptr %266, align 8, !tbaa !9
  %268 = fcmp une double %267, 0.000000e+00
  br i1 %268, label %294, label %269

269:                                              ; preds = %264
  %270 = load ptr, ptr %8, align 8, !tbaa !5
  %271 = getelementptr inbounds %class.RGBDCamera, ptr %270, i32 0, i32 9
  %272 = load double, ptr %271, align 8, !tbaa !14
  %273 = fcmp une double %272, 0.000000e+00
  br i1 %273, label %294, label %274

274:                                              ; preds = %269
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  %276 = getelementptr inbounds %class.RGBDCamera, ptr %275, i32 0, i32 10
  %277 = load double, ptr %276, align 8, !tbaa !15
  %278 = fcmp une double %277, 0.000000e+00
  br i1 %278, label %294, label %279

279:                                              ; preds = %274
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds %class.RGBDCamera, ptr %280, i32 0, i32 11
  %282 = load double, ptr %281, align 8, !tbaa !16
  %283 = fcmp une double %282, 0.000000e+00
  br i1 %283, label %294, label %284

284:                                              ; preds = %279
  %285 = load ptr, ptr %8, align 8, !tbaa !5
  %286 = getelementptr inbounds %class.RGBDCamera, ptr %285, i32 0, i32 12
  %287 = load double, ptr %286, align 8, !tbaa !17
  %288 = fcmp une double %287, 0.000000e+00
  br i1 %288, label %294, label %289

289:                                              ; preds = %284
  %290 = load ptr, ptr %8, align 8, !tbaa !5
  %291 = getelementptr inbounds %class.RGBDCamera, ptr %290, i32 0, i32 9
  %292 = load double, ptr %291, align 8, !tbaa !14
  %293 = fcmp une double %292, 0.000000e+00
  br i1 %293, label %294, label %441

294:                                              ; preds = %289, %284, %279, %274, %269, %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %295 = invoke noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %296 unwind label %427

296:                                              ; preds = %294
  %297 = load ptr, ptr %8, align 8, !tbaa !5
  %298 = getelementptr inbounds %class.RGBDCamera, ptr %297, i32 0, i32 6
  %299 = load double, ptr %298, align 8, !tbaa !22
  %300 = fsub double %295, %299
  %301 = load ptr, ptr %8, align 8, !tbaa !5
  %302 = getelementptr inbounds %class.RGBDCamera, ptr %301, i32 0, i32 4
  %303 = load double, ptr %302, align 8, !tbaa !25
  %304 = fdiv double %300, %303
  store double %304, ptr %24, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %305 = invoke noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %306 unwind label %431

306:                                              ; preds = %296
  %307 = load ptr, ptr %8, align 8, !tbaa !5
  %308 = getelementptr inbounds %class.RGBDCamera, ptr %307, i32 0, i32 7
  %309 = load double, ptr %308, align 8, !tbaa !23
  %310 = fsub double %305, %309
  %311 = load ptr, ptr %8, align 8, !tbaa !5
  %312 = getelementptr inbounds %class.RGBDCamera, ptr %311, i32 0, i32 5
  %313 = load double, ptr %312, align 8, !tbaa !26
  %314 = fdiv double %310, %313
  store double %314, ptr %25, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %315 = load double, ptr %24, align 8, !tbaa !21
  %316 = load double, ptr %24, align 8, !tbaa !21
  %317 = load double, ptr %25, align 8, !tbaa !21
  %318 = load double, ptr %25, align 8, !tbaa !21
  %319 = fmul double %317, %318
  %320 = call double @llvm.fmuladd.f64(double %315, double %316, double %319)
  store double %320, ptr %26, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %321 = load double, ptr %26, align 8, !tbaa !21
  %322 = load double, ptr %26, align 8, !tbaa !21
  %323 = fmul double %321, %322
  store double %323, ptr %27, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %324 = load double, ptr %26, align 8, !tbaa !21
  %325 = load ptr, ptr %8, align 8, !tbaa !5
  %326 = getelementptr inbounds %class.RGBDCamera, ptr %325, i32 0, i32 8
  %327 = load double, ptr %326, align 8, !tbaa !9
  %328 = call double @llvm.fmuladd.f64(double %324, double %327, double 1.000000e+00)
  %329 = load double, ptr %27, align 8, !tbaa !21
  %330 = load ptr, ptr %8, align 8, !tbaa !5
  %331 = getelementptr inbounds %class.RGBDCamera, ptr %330, i32 0, i32 9
  %332 = load double, ptr %331, align 8, !tbaa !14
  %333 = call double @llvm.fmuladd.f64(double %329, double %332, double %328)
  %334 = load double, ptr %27, align 8, !tbaa !21
  %335 = load double, ptr %26, align 8, !tbaa !21
  %336 = fmul double %334, %335
  %337 = load ptr, ptr %8, align 8, !tbaa !5
  %338 = getelementptr inbounds %class.RGBDCamera, ptr %337, i32 0, i32 10
  %339 = load double, ptr %338, align 8, !tbaa !15
  %340 = call double @llvm.fmuladd.f64(double %336, double %339, double %333)
  %341 = load double, ptr %27, align 8, !tbaa !21
  %342 = load double, ptr %27, align 8, !tbaa !21
  %343 = fmul double %341, %342
  %344 = load ptr, ptr %8, align 8, !tbaa !5
  %345 = getelementptr inbounds %class.RGBDCamera, ptr %344, i32 0, i32 11
  %346 = load double, ptr %345, align 8, !tbaa !16
  %347 = call double @llvm.fmuladd.f64(double %343, double %346, double %340)
  store double %347, ptr %28, align 8, !tbaa !21
  %348 = load double, ptr %28, align 8, !tbaa !21
  %349 = load double, ptr %24, align 8, !tbaa !21
  %350 = load ptr, ptr %8, align 8, !tbaa !5
  %351 = getelementptr inbounds %class.RGBDCamera, ptr %350, i32 0, i32 13
  %352 = load double, ptr %351, align 8, !tbaa !18
  %353 = load double, ptr %26, align 8, !tbaa !21
  %354 = load double, ptr %24, align 8, !tbaa !21
  %355 = fmul double 2.000000e+00, %354
  %356 = load double, ptr %24, align 8, !tbaa !21
  %357 = call double @llvm.fmuladd.f64(double %355, double %356, double %353)
  %358 = fmul double %352, %357
  %359 = call double @llvm.fmuladd.f64(double %348, double %349, double %358)
  %360 = load ptr, ptr %8, align 8, !tbaa !5
  %361 = getelementptr inbounds %class.RGBDCamera, ptr %360, i32 0, i32 12
  %362 = load double, ptr %361, align 8, !tbaa !17
  %363 = fmul double 2.000000e+00, %362
  %364 = load double, ptr %24, align 8, !tbaa !21
  %365 = fmul double %363, %364
  %366 = load double, ptr %25, align 8, !tbaa !21
  %367 = call double @llvm.fmuladd.f64(double %365, double %366, double %359)
  store double %367, ptr %24, align 8, !tbaa !21
  %368 = load double, ptr %28, align 8, !tbaa !21
  %369 = load double, ptr %25, align 8, !tbaa !21
  %370 = load ptr, ptr %8, align 8, !tbaa !5
  %371 = getelementptr inbounds %class.RGBDCamera, ptr %370, i32 0, i32 12
  %372 = load double, ptr %371, align 8, !tbaa !17
  %373 = load double, ptr %26, align 8, !tbaa !21
  %374 = load double, ptr %25, align 8, !tbaa !21
  %375 = fmul double 2.000000e+00, %374
  %376 = load double, ptr %25, align 8, !tbaa !21
  %377 = call double @llvm.fmuladd.f64(double %375, double %376, double %373)
  %378 = fmul double %372, %377
  %379 = call double @llvm.fmuladd.f64(double %368, double %369, double %378)
  %380 = load ptr, ptr %8, align 8, !tbaa !5
  %381 = getelementptr inbounds %class.RGBDCamera, ptr %380, i32 0, i32 13
  %382 = load double, ptr %381, align 8, !tbaa !18
  %383 = fmul double 2.000000e+00, %382
  %384 = load double, ptr %24, align 8, !tbaa !21
  %385 = fmul double %383, %384
  %386 = load double, ptr %25, align 8, !tbaa !21
  %387 = call double @llvm.fmuladd.f64(double %385, double %386, double %379)
  store double %387, ptr %25, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %388 = load double, ptr %24, align 8, !tbaa !21
  %389 = load ptr, ptr %8, align 8, !tbaa !5
  %390 = getelementptr inbounds %class.RGBDCamera, ptr %389, i32 0, i32 4
  %391 = load double, ptr %390, align 8, !tbaa !25
  %392 = load ptr, ptr %8, align 8, !tbaa !5
  %393 = getelementptr inbounds %class.RGBDCamera, ptr %392, i32 0, i32 6
  %394 = load double, ptr %393, align 8, !tbaa !22
  %395 = call double @llvm.fmuladd.f64(double %388, double %391, double %394)
  store double %395, ptr %29, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %396 = load double, ptr %25, align 8, !tbaa !21
  %397 = load ptr, ptr %8, align 8, !tbaa !5
  %398 = getelementptr inbounds %class.RGBDCamera, ptr %397, i32 0, i32 5
  %399 = load double, ptr %398, align 8, !tbaa !26
  %400 = load ptr, ptr %8, align 8, !tbaa !5
  %401 = getelementptr inbounds %class.RGBDCamera, ptr %400, i32 0, i32 7
  %402 = load double, ptr %401, align 8, !tbaa !23
  %403 = call double @llvm.fmuladd.f64(double %396, double %399, double %402)
  store double %403, ptr %30, align 8, !tbaa !21
  %404 = load double, ptr %29, align 8, !tbaa !21
  %405 = load double, ptr %30, align 8, !tbaa !21
  invoke void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16) %23, double noundef %404, double noundef %405)
          to label %406 unwind label %435

406:                                              ; preds = %306
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %441

407:                                              ; preds = %230
  %408 = landingpad { ptr, i32 }
          cleanup
  %409 = extractvalue { ptr, i32 } %408, 0
  store ptr %409, ptr %15, align 8
  %410 = extractvalue { ptr, i32 } %408, 1
  store i32 %410, ptr %16, align 4
  br label %491

411:                                              ; preds = %237
  %412 = landingpad { ptr, i32 }
          cleanup
  %413 = extractvalue { ptr, i32 } %412, 0
  store ptr %413, ptr %15, align 8
  %414 = extractvalue { ptr, i32 } %412, 1
  store i32 %414, ptr %16, align 4
  br label %490

415:                                              ; preds = %238
  %416 = landingpad { ptr, i32 }
          cleanup
  %417 = extractvalue { ptr, i32 } %416, 0
  store ptr %417, ptr %15, align 8
  %418 = extractvalue { ptr, i32 } %416, 1
  store i32 %418, ptr %16, align 4
  br label %489

419:                                              ; preds = %252, %241
  %420 = landingpad { ptr, i32 }
          cleanup
  %421 = extractvalue { ptr, i32 } %420, 0
  store ptr %421, ptr %15, align 8
  %422 = extractvalue { ptr, i32 } %420, 1
  store i32 %422, ptr %16, align 4
  br label %488

423:                                              ; preds = %462, %460, %455, %448, %446, %441, %263
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %15, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %16, align 4
  br label %487

427:                                              ; preds = %294
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %15, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %16, align 4
  br label %440

431:                                              ; preds = %296
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %15, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %16, align 4
  br label %439

435:                                              ; preds = %306
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %15, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %439

439:                                              ; preds = %435, %431
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %440

440:                                              ; preds = %439, %427
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %487

441:                                              ; preds = %406, %289
  %442 = invoke noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %443 unwind label %423

443:                                              ; preds = %441
  %444 = fcmp olt double %442, 0.000000e+00
  br i1 %444, label %445, label %446

445:                                              ; preds = %443
  store i32 7, ptr %12, align 4
  br label %477

446:                                              ; preds = %443
  %447 = invoke noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %448 unwind label %423

448:                                              ; preds = %446
  %449 = invoke noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %13)
          to label %450 unwind label %423

450:                                              ; preds = %448
  %451 = sub nsw i32 %449, 1
  %452 = sitofp i32 %451 to double
  %453 = fcmp ogt double %447, %452
  br i1 %453, label %454, label %455

454:                                              ; preds = %450
  store i32 7, ptr %12, align 4
  br label %477

455:                                              ; preds = %450
  %456 = invoke noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %457 unwind label %423

457:                                              ; preds = %455
  %458 = fcmp olt double %456, 0.000000e+00
  br i1 %458, label %459, label %460

459:                                              ; preds = %457
  store i32 7, ptr %12, align 4
  br label %477

460:                                              ; preds = %457
  %461 = invoke noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %462 unwind label %423

462:                                              ; preds = %460
  %463 = invoke noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %13)
          to label %464 unwind label %423

464:                                              ; preds = %462
  %465 = sub nsw i32 %463, 1
  %466 = sitofp i32 %465 to double
  %467 = fcmp ogt double %461, %466
  br i1 %467, label %468, label %469

468:                                              ; preds = %464
  store i32 7, ptr %12, align 4
  br label %477

469:                                              ; preds = %464
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %470 = invoke noundef double @_ZNK6R2Grid9GridValueERK7R2Point(ptr noundef nonnull align 8 dereferenceable(208) %13, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %471 unwind label %483

471:                                              ; preds = %469
  store double %470, ptr %31, align 8, !tbaa !21
  %472 = load ptr, ptr %7, align 8, !tbaa !5
  %473 = load i32, ptr %18, align 4, !tbaa !24
  %474 = load i32, ptr %17, align 4, !tbaa !24
  %475 = load double, ptr %31, align 8, !tbaa !21
  invoke void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %472, i32 noundef %473, i32 noundef %474, double noundef %475)
          to label %476 unwind label %483

476:                                              ; preds = %471
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  store i32 0, ptr %12, align 4
  br label %477

477:                                              ; preds = %476, %468, %459, %454, %445
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  %478 = load i32, ptr %12, align 4
  switch i32 %478, label %508 [
    i32 0, label %479
    i32 7, label %480
  ]

479:                                              ; preds = %477
  br label %480

480:                                              ; preds = %479, %477
  %481 = load i32, ptr %18, align 4, !tbaa !24
  %482 = add nsw i32 %481, 1
  store i32 %482, ptr %18, align 4, !tbaa !24
  br label %219, !llvm.loop !27

483:                                              ; preds = %471, %469
  %484 = landingpad { ptr, i32 }
          cleanup
  %485 = extractvalue { ptr, i32 } %484, 0
  store ptr %485, ptr %15, align 8
  %486 = extractvalue { ptr, i32 } %484, 1
  store i32 %486, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %487

487:                                              ; preds = %483, %440, %423
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %488

488:                                              ; preds = %487, %419
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %489

489:                                              ; preds = %488, %415
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %490

490:                                              ; preds = %489, %411
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  br label %491

491:                                              ; preds = %490, %407
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %492

492:                                              ; preds = %491, %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %497

493:                                              ; preds = %225
  br label %494

494:                                              ; preds = %493
  %495 = load i32, ptr %17, align 4, !tbaa !24
  %496 = add nsw i32 %495, 1
  store i32 %496, ptr %17, align 4, !tbaa !24
  br label %194, !llvm.loop !29

497:                                              ; preds = %492, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %499

498:                                              ; preds = %200
  store i32 1, ptr %5, align 4
  store i32 1, ptr %12, align 4
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %13) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %13) #7
  br label %500

499:                                              ; preds = %497, %210, %209
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %13) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %503

500:                                              ; preds = %498, %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %501

501:                                              ; preds = %500, %83, %72
  %502 = load i32, ptr %5, align 4
  ret i32 %502

503:                                              ; preds = %499
  %504 = load ptr, ptr %15, align 8
  %505 = load i32, ptr %16, align 4
  %506 = insertvalue { ptr, i32 } poison, ptr %504, 0
  %507 = insertvalue { ptr, i32 } %506, i32 %505, 1
  resume { ptr, i32 } %507

508:                                              ; preds = %477
  unreachable
}

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R2Grid9GridValueERK7R2Point(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !12, i64 48}
!10 = !{!"_ZTS10RGBDCamera", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !13, i64 176, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !11, i64 336, !11, i64 340, !11, i64 344}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTS8R4Matrix", !7, i64 0}
!14 = !{!10, !12, i64 56}
!15 = !{!10, !12, i64 64}
!16 = !{!10, !12, i64 72}
!17 = !{!10, !12, i64 80}
!18 = !{!10, !12, i64 88}
!19 = !{!10, !11, i64 0}
!20 = !{!10, !11, i64 4}
!21 = !{!12, !12, i64 0}
!22 = !{!10, !12, i64 32}
!23 = !{!10, !12, i64 40}
!24 = !{!11, !11, i64 0}
!25 = !{!10, !12, i64 16}
!26 = !{!10, !12, i64 24}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


; 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.R2Grid = type { %class.R2Affine, %class.R2Affine, double, ptr, [2 x i32], i32, i32 }
%class.R2Affine = type <{ %class.R2Transformation, %class.R3Matrix, i32, [4 x i8] }>
%class.R2Transformation = type { ptr }
%class.R3Matrix = type { [3 x [3 x double]] }
%class.R2Point = type { [2 x double] }

@RN_EPSILON = external local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [225 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1

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

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

declare void @_ZN6R2GridC1Eii(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #1

declare void @_ZN6R2Grid5ClearEd(ptr noundef nonnull align 8 dereferenceable(208), double noundef) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef, i32 noundef, double noundef) local_unnamed_addr #4 align 2

declare void @_ZN6R2GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z9RNIsEqualddd(double noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_Z31RGBDCreateUndistortedColorImageRK6R2GridRS_RK10RGBDCameraS5_(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(208) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(348) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(348) %3) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.R2Grid, align 8
  %6 = alloca %class.R2Grid, align 8
  %7 = alloca %class.R2Point, align 8
  %8 = alloca %class.R2Point, align 8
  %9 = alloca %class.R2Point, align 8
  %10 = getelementptr inbounds i8, ptr %3, i64 48
  %11 = getelementptr inbounds i8, ptr %3, i64 56
  %12 = getelementptr inbounds i8, ptr %3, i64 64
  %13 = getelementptr inbounds i8, ptr %3, i64 72
  %14 = load <4 x double>, ptr %10, align 8
  %.fr = freeze <4 x double> %14
  %15 = getelementptr inbounds i8, ptr %3, i64 80
  %16 = load double, ptr %15, align 8
  %.fr165 = freeze double %16
  %17 = fcmp oeq double %.fr165, 0.000000e+00
  %18 = getelementptr inbounds i8, ptr %3, i64 88
  %19 = load double, ptr %18, align 8
  %20 = fcmp oeq double %19, 0.000000e+00
  %21 = fcmp une <4 x double> %.fr, zeroinitializer
  %22 = bitcast <4 x i1> %21 to i4
  %23 = icmp eq i4 %22, 0
  %op.rdx162 = and i1 %23, %17
  %op.rdx163 = select i1 %op.rdx162, i1 %20, i1 false
  br i1 %op.rdx163, label %25, label %24

24:                                               ; preds = %4
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 401, ptr noundef nonnull @.str.2)
  br label %25

25:                                               ; preds = %4, %24
  %26 = load i32, ptr %2, align 8, !tbaa !5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %232, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %2, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %232, label %32

32:                                               ; preds = %28
  %33 = load i32, ptr %3, align 8, !tbaa !5
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %232, label %35

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %3, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %232, label %39

39:                                               ; preds = %35
  %40 = sitofp i32 %26 to double
  %41 = sitofp i32 %33 to double
  %42 = fdiv double %40, %41
  %43 = sitofp i32 %30 to double
  %44 = sitofp i32 %37 to double
  %45 = fdiv double %43, %44
  %46 = load double, ptr @RN_EPSILON, align 8, !tbaa !14
  %47 = tail call noundef i32 @_Z9RNIsEqualddd(double noundef %42, double noundef 1.000000e+00, double noundef %46)
  %.not = icmp eq i32 %47, 0
  br i1 %.not, label %95, label %48

48:                                               ; preds = %39
  %49 = load double, ptr @RN_EPSILON, align 8, !tbaa !14
  %50 = tail call noundef i32 @_Z9RNIsEqualddd(double noundef %45, double noundef 1.000000e+00, double noundef %49)
  %.not125 = icmp eq i32 %50, 0
  br i1 %.not125, label %95, label %51

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %2, i64 32
  %53 = load double, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %3, i64 32
  %55 = load double, ptr %54, align 8, !tbaa !15
  %56 = fcmp oeq double %53, %55
  br i1 %56, label %57, label %95

57:                                               ; preds = %51
  %58 = getelementptr inbounds i8, ptr %2, i64 40
  %59 = load double, ptr %58, align 8, !tbaa !16
  %60 = getelementptr inbounds i8, ptr %3, i64 40
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = fcmp oeq double %59, %61
  br i1 %62, label %63, label %95

63:                                               ; preds = %57
  %64 = getelementptr inbounds i8, ptr %2, i64 48
  %65 = load double, ptr %64, align 8, !tbaa !17
  %66 = load double, ptr %10, align 8, !tbaa !17
  %67 = fcmp oeq double %65, %66
  br i1 %67, label %68, label %95

68:                                               ; preds = %63
  %69 = getelementptr inbounds i8, ptr %2, i64 56
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = load double, ptr %11, align 8, !tbaa !18
  %72 = fcmp oeq double %70, %71
  br i1 %72, label %73, label %95

73:                                               ; preds = %68
  %74 = getelementptr inbounds i8, ptr %2, i64 64
  %75 = load double, ptr %74, align 8, !tbaa !19
  %76 = load double, ptr %12, align 8, !tbaa !19
  %77 = fcmp oeq double %75, %76
  br i1 %77, label %78, label %95

78:                                               ; preds = %73
  %79 = getelementptr inbounds i8, ptr %2, i64 72
  %80 = load double, ptr %79, align 8, !tbaa !20
  %81 = load double, ptr %13, align 8, !tbaa !20
  %82 = fcmp oeq double %80, %81
  br i1 %82, label %83, label %95

83:                                               ; preds = %78
  %84 = getelementptr inbounds i8, ptr %2, i64 80
  %85 = load double, ptr %84, align 8, !tbaa !21
  %86 = load double, ptr %15, align 8, !tbaa !21
  %87 = fcmp oeq double %85, %86
  br i1 %87, label %88, label %95

88:                                               ; preds = %83
  %89 = getelementptr inbounds i8, ptr %2, i64 88
  %90 = load double, ptr %89, align 8, !tbaa !22
  %91 = load double, ptr %18, align 8, !tbaa !22
  %92 = fcmp oeq double %90, %91
  br i1 %92, label %93, label %95

93:                                               ; preds = %88
  %94 = tail call noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208) %1, ptr noundef nonnull align 8 dereferenceable(208) %0)
  br label %232

95:                                               ; preds = %88, %83, %78, %73, %68, %63, %57, %51, %48, %39
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %5) #7
  call void @_ZN6R2GridC1ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %5, ptr noundef nonnull align 8 dereferenceable(208) %0)
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %6) #7
  %96 = load i32, ptr %3, align 8, !tbaa !5
  %97 = load i32, ptr %36, align 4, !tbaa !13
  invoke void @_ZN6R2GridC1Eii(ptr noundef nonnull align 8 dereferenceable(208) %6, i32 noundef %96, i32 noundef %97)
          to label %98 unwind label %119

98:                                               ; preds = %95
  %99 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZN6R2GridaSERKS_(ptr noundef nonnull align 8 dereferenceable(208) %1, ptr noundef nonnull align 8 dereferenceable(208) %6)
          to label %100 unwind label %121

100:                                              ; preds = %98
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %6) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #7
  invoke void @_ZN6R2Grid5ClearEd(ptr noundef nonnull align 8 dereferenceable(208) %1, double noundef -3.210000e+02)
          to label %.preheader158 unwind label %124

.preheader158:                                    ; preds = %100
  %101 = call noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %.preheader.lr.ph, label %._crit_edge161

.preheader.lr.ph:                                 ; preds = %.preheader158
  %103 = getelementptr inbounds i8, ptr %3, i64 32
  %104 = getelementptr inbounds i8, ptr %2, i64 32
  %105 = getelementptr inbounds i8, ptr %3, i64 40
  %106 = getelementptr inbounds i8, ptr %2, i64 40
  %107 = getelementptr inbounds i8, ptr %2, i64 48
  %108 = getelementptr inbounds i8, ptr %2, i64 56
  %109 = getelementptr inbounds i8, ptr %2, i64 64
  %110 = getelementptr inbounds i8, ptr %2, i64 72
  %111 = getelementptr inbounds i8, ptr %2, i64 80
  %112 = getelementptr inbounds i8, ptr %2, i64 16
  %113 = getelementptr inbounds i8, ptr %2, i64 24
  %114 = getelementptr inbounds i8, ptr %2, i64 88
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %.0120160 = phi i32 [ 0, %.preheader.lr.ph ], [ %126, %._crit_edge ]
  %115 = call noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %117 = uitofp nneg i32 %.0120160 to double
  %118 = fadd double %117, 5.000000e-01
  br label %129

._crit_edge161:                                   ; preds = %._crit_edge, %.preheader158
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %5) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %5) #7
  br label %232

119:                                              ; preds = %95
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %123

121:                                              ; preds = %98
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %6) #7
  br label %123

123:                                              ; preds = %121, %119
  %.pn = phi { ptr, i32 } [ %122, %121 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #7
  br label %231

124:                                              ; preds = %100
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %231

._crit_edge:                                      ; preds = %222, %.preheader
  %126 = add nuw nsw i32 %.0120160, 1
  %127 = call noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %.preheader, label %._crit_edge161, !llvm.loop !23

129:                                              ; preds = %.lr.ph, %222
  %.0121159 = phi i32 [ 0, %.lr.ph ], [ %223, %222 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %130 = uitofp nneg i32 %.0121159 to double
  %131 = fadd double %130, 5.000000e-01
  invoke void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %131, double noundef %118)
          to label %132 unwind label %195

132:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  invoke void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %133 unwind label %197

133:                                              ; preds = %132
  %134 = call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %135 = load double, ptr %103, align 8, !tbaa !15
  %136 = fsub double %134, %135
  %137 = load double, ptr %104, align 8, !tbaa !15
  %138 = call double @llvm.fmuladd.f64(double %42, double %136, double %137)
  %139 = call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  %140 = load double, ptr %105, align 8, !tbaa !16
  %141 = fsub double %139, %140
  %142 = load double, ptr %106, align 8, !tbaa !16
  %143 = call double @llvm.fmuladd.f64(double %45, double %141, double %142)
  call void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef %138, double noundef %143)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  invoke void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %144 unwind label %199

144:                                              ; preds = %133
  %145 = load <4 x double>, ptr %107, align 8
  %.fr166 = freeze <4 x double> %145
  %146 = fcmp une <4 x double> %.fr166, zeroinitializer
  %147 = load double, ptr %111, align 8
  %148 = fcmp une double %147, 0.000000e+00
  %149 = bitcast <4 x i1> %146 to i4
  %150 = icmp ne i4 %149, 0
  %op.rdx = select i1 %150, i1 true, i1 %148
  br i1 %op.rdx, label %151, label %201

151:                                              ; preds = %144
  %152 = call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %153 = load double, ptr %104, align 8, !tbaa !15
  %154 = fsub double %152, %153
  %155 = load double, ptr %112, align 8, !tbaa !25
  %156 = fdiv double %154, %155
  %157 = call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %158 = load double, ptr %106, align 8, !tbaa !16
  %159 = fsub double %157, %158
  %160 = load double, ptr %113, align 8, !tbaa !26
  %161 = fdiv double %159, %160
  %162 = fmul double %161, %161
  %163 = call double @llvm.fmuladd.f64(double %156, double %156, double %162)
  %164 = fmul double %163, %163
  %165 = load double, ptr %107, align 8, !tbaa !17
  %166 = call double @llvm.fmuladd.f64(double %163, double %165, double 1.000000e+00)
  %167 = load double, ptr %108, align 8, !tbaa !18
  %168 = call double @llvm.fmuladd.f64(double %164, double %167, double %166)
  %169 = fmul double %163, %164
  %170 = load double, ptr %109, align 8, !tbaa !19
  %171 = call double @llvm.fmuladd.f64(double %169, double %170, double %168)
  %172 = fmul double %164, %164
  %173 = load double, ptr %110, align 8, !tbaa !20
  %174 = call double @llvm.fmuladd.f64(double %172, double %173, double %171)
  %175 = load double, ptr %114, align 8, !tbaa !22
  %176 = fmul double %156, 2.000000e+00
  %177 = call double @llvm.fmuladd.f64(double %176, double %156, double %163)
  %178 = fmul double %177, %175
  %179 = call double @llvm.fmuladd.f64(double %174, double %156, double %178)
  %180 = load double, ptr %111, align 8, !tbaa !21
  %181 = fmul double %180, 2.000000e+00
  %182 = fmul double %156, %181
  %183 = call double @llvm.fmuladd.f64(double %182, double %161, double %179)
  %184 = fmul double %161, 2.000000e+00
  %185 = call double @llvm.fmuladd.f64(double %184, double %161, double %163)
  %186 = fmul double %185, %180
  %187 = call double @llvm.fmuladd.f64(double %174, double %161, double %186)
  %188 = fmul double %175, 2.000000e+00
  %189 = fmul double %188, %183
  %190 = call double @llvm.fmuladd.f64(double %189, double %161, double %187)
  %191 = load double, ptr %112, align 8, !tbaa !25
  %192 = load double, ptr %104, align 8, !tbaa !15
  %193 = call double @llvm.fmuladd.f64(double %183, double %191, double %192)
  %194 = call double @llvm.fmuladd.f64(double %190, double %160, double %158)
  call void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16) %9, double noundef %193, double noundef %194)
  br label %201

195:                                              ; preds = %129
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %230

197:                                              ; preds = %132
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %229

199:                                              ; preds = %133
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %228

201:                                              ; preds = %144, %151
  %202 = call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %203 = fcmp olt double %202, 0.000000e+00
  br i1 %203, label %222, label %204

204:                                              ; preds = %201
  %205 = call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %206 = call noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %5)
  %207 = add nsw i32 %206, -1
  %208 = sitofp i32 %207 to double
  %209 = fcmp ogt double %205, %208
  br i1 %209, label %222, label %210

210:                                              ; preds = %204
  %211 = call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %212 = fcmp olt double %211, 0.000000e+00
  br i1 %212, label %222, label %213

213:                                              ; preds = %210
  %214 = call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %215 = call noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %5)
  %216 = add nsw i32 %215, -1
  %217 = sitofp i32 %216 to double
  %218 = fcmp ogt double %214, %217
  br i1 %218, label %222, label %219

219:                                              ; preds = %213
  %220 = invoke noundef double @_ZNK6R2Grid9GridValueERK7R2Point(ptr noundef nonnull align 8 dereferenceable(208) %5, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %221 unwind label %226

221:                                              ; preds = %219
  invoke void @_ZN6R2Grid12SetGridValueEiid(ptr noundef nonnull align 8 dereferenceable(208) %1, i32 noundef %.0121159, i32 noundef %.0120160, double noundef %220)
          to label %222 unwind label %226

222:                                              ; preds = %221, %213, %210, %204, %201
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %223 = add nuw nsw i32 %.0121159, 1
  %224 = call noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %1)
  %225 = icmp slt i32 %223, %224
  br i1 %225, label %129, label %._crit_edge, !llvm.loop !27

226:                                              ; preds = %221, %219
  %227 = landingpad { ptr, i32 }
          cleanup
  br label %228

228:                                              ; preds = %226, %199
  %.pn127 = phi { ptr, i32 } [ %227, %226 ], [ %200, %199 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %229

229:                                              ; preds = %228, %197
  %.pn127.pn = phi { ptr, i32 } [ %.pn127, %228 ], [ %198, %197 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %230

230:                                              ; preds = %229, %195
  %.pn127.pn.pn = phi { ptr, i32 } [ %.pn127.pn, %229 ], [ %196, %195 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %231

231:                                              ; preds = %230, %124, %123
  %.pn127.pn.pn.pn = phi { ptr, i32 } [ %.pn127.pn.pn, %230 ], [ %125, %124 ], [ %.pn, %123 ]
  call void @_ZN6R2GridD1Ev(ptr noundef nonnull align 8 dereferenceable(208) %5) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn127.pn.pn.pn

232:                                              ; preds = %93, %._crit_edge161, %32, %35, %25, %28
  %.1 = phi i32 [ 0, %28 ], [ 0, %25 ], [ 0, %35 ], [ 0, %32 ], [ 1, %._crit_edge161 ], [ 1, %93 ]
  ret i32 %.1
}

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7R2Point5ResetEdd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R2Grid9GridValueERK7R2Point(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS10RGBDCamera", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !11, i64 176, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !7, i64 336, !7, i64 340, !7, i64 344}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTS8R4Matrix", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!10, !10, i64 0}
!15 = !{!6, !10, i64 32}
!16 = !{!6, !10, i64 40}
!17 = !{!6, !10, i64 48}
!18 = !{!6, !10, i64 56}
!19 = !{!6, !10, i64 64}
!20 = !{!6, !10, i64 72}
!21 = !{!6, !10, i64 80}
!22 = !{!6, !10, i64 88}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !10, i64 16}
!26 = !{!6, !10, i64 24}
!27 = distinct !{!27, !24}


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