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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R2Point = type { [2 x double] }
%class.R2Vector = type { [2 x double] }
%class.RGBDSurface = type { ptr, ptr, i32, %class.RNArray, i32, i32, i32, ptr, ptr, %class.R2Box, i32, ptr, ptr, ptr }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.R2Box = type { %class.R2Solid, %class.R2Point, %class.R2Point }
%class.R2Solid = type { %class.R2Shape }
%class.R2Shape = type { ptr }

@RN_EPSILON = external global double, align 8

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #2 align 2

declare void @_ZN7R2PointC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK11RGBDSurface19SearchMeshFaceIndexERK7R2PointPd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %class.R2Point, align 8
  %18 = alloca %class.R2Point, align 8
  %19 = alloca %class.R2Point, align 8
  %20 = alloca %class.R2Vector, align 8
  %21 = alloca %class.R2Vector, align 8
  %22 = alloca double, align 8
  %23 = alloca %class.R2Point, align 8
  %24 = alloca %class.R2Vector, align 8
  %25 = alloca %class.R2Vector, align 8
  %26 = alloca %class.R2Vector, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8
  %30 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = icmp ne ptr %31, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  br label %209

34:                                               ; preds = %3
  %35 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 13
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  %37 = icmp ne ptr %36, null
  br i1 %37, label %42, label %38

38:                                               ; preds = %34
  %39 = load ptr, ptr %29, align 8, !tbaa !19
  %40 = getelementptr inbounds ptr, ptr %39, i64 30
  %41 = load ptr, ptr %40, align 8
  call void %41(ptr noundef nonnull align 8 dereferenceable(144) %29)
  br label %42

42:                                               ; preds = %38, %34
  %43 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 13
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %45 = icmp ne ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  store ptr null, ptr %4, align 8
  br label %209

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %48)
  %50 = fadd double %49, 5.000000e-01
  %51 = fptosi double %50 to i32
  store i32 %51, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %52)
  %54 = fadd double %53, 5.000000e-01
  %55 = fptosi double %54 to i32
  store i32 %55, ptr %9, align 4, !tbaa !21
  %56 = load i32, ptr %8, align 4, !tbaa !21
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %64, label %58

58:                                               ; preds = %47
  %59 = load i32, ptr %8, align 4, !tbaa !21
  %60 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 13
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = call noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %61)
  %63 = icmp sge i32 %59, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %58, %47
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %208

65:                                               ; preds = %58
  %66 = load i32, ptr %9, align 4, !tbaa !21
  %67 = icmp slt i32 %66, 0
  br i1 %67, label %74, label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %9, align 4, !tbaa !21
  %70 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 13
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = call noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %71)
  %73 = icmp sge i32 %69, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %68, %65
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %208

75:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %76 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 13
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = load i32, ptr %8, align 4, !tbaa !21
  %79 = load i32, ptr %9, align 4, !tbaa !21
  %80 = call noundef double @_ZNK6R2Grid9GridValueEii(ptr noundef nonnull align 8 dereferenceable(208) %77, i32 noundef %78, i32 noundef %79)
  store double %80, ptr %11, align 8, !tbaa !22
  %81 = load double, ptr %11, align 8, !tbaa !22
  %82 = fcmp oeq double %81, -3.210000e+02
  br i1 %82, label %83, label %84

83:                                               ; preds = %75
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %207

84:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %85 = load double, ptr %11, align 8, !tbaa !22
  %86 = fadd double %85, 5.000000e-01
  %87 = fptosi double %86 to i32
  store i32 %87, ptr %12, align 4, !tbaa !21
  %88 = load i32, ptr %12, align 4, !tbaa !21
  %89 = icmp slt i32 %88, 0
  br i1 %89, label %96, label %90

90:                                               ; preds = %84
  %91 = load i32, ptr %12, align 4, !tbaa !21
  %92 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  %94 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %93)
  %95 = icmp sge i32 %91, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %90, %84
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %206

97:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %98 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = load i32, ptr %12, align 4, !tbaa !21
  %101 = call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %99, i32 noundef %100)
  store ptr %101, ptr %13, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %203

104:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %105 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %106, ptr noundef %107, i32 noundef 0)
  store ptr %108, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %109 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %110, ptr noundef %111, i32 noundef 1)
  store ptr %112, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %113 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %114, ptr noundef %115, i32 noundef 2)
  store ptr %116, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %117 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %118, ptr noundef %119)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %120)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %121 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %122, ptr noundef %123)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %124)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %125 = getelementptr inbounds %class.RGBDSurface, ptr %29, i32 0, i32 12
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %126, ptr noundef %127)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %128)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef 0)
  %130 = load double, ptr %129, align 8, !tbaa !22
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef 1)
  %132 = load double, ptr %131, align 8, !tbaa !22
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef 1)
  %134 = load double, ptr %133, align 8, !tbaa !22
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef 0)
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = fmul double %134, %136
  %138 = fneg double %137
  %139 = call double @llvm.fmuladd.f64(double %130, double %132, double %138)
  store double %139, ptr %22, align 8, !tbaa !22
  %140 = load double, ptr %22, align 8, !tbaa !22
  %141 = load double, ptr @RN_EPSILON, align 8, !tbaa !22
  %142 = call noundef i32 @_Z8RNIsZerodd(double noundef %140, double noundef %141)
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %151

144:                                              ; preds = %104
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i64 0
  store double 0.000000e+00, ptr %146, align 8, !tbaa !22
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 1
  store double 0.000000e+00, ptr %148, align 8, !tbaa !22
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds double, ptr %149, i64 2
  store double 0.000000e+00, ptr %150, align 8, !tbaa !22
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %200

151:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  call void @_ZN7R2PointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = call noundef i32 @_Z29RGBDTransformTextureToSurfaceRK7R2PointRS_PK11RGBDSurface(ptr noundef nonnull align 8 dereferenceable(16) %152, ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef %29)
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %199

156:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %24, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %23)
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %23)
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8 %26, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %23)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef 0)
  %158 = load double, ptr %157, align 8, !tbaa !22
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 1)
  %160 = load double, ptr %159, align 8, !tbaa !22
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef 1)
  %162 = load double, ptr %161, align 8, !tbaa !22
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 0)
  %164 = load double, ptr %163, align 8, !tbaa !22
  %165 = fmul double %162, %164
  %166 = fneg double %165
  %167 = call double @llvm.fmuladd.f64(double %158, double %160, double %166)
  store double %167, ptr %27, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 0)
  %169 = load double, ptr %168, align 8, !tbaa !22
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %26, i32 noundef 1)
  %171 = load double, ptr %170, align 8, !tbaa !22
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 1)
  %173 = load double, ptr %172, align 8, !tbaa !22
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %26, i32 noundef 0)
  %175 = load double, ptr %174, align 8, !tbaa !22
  %176 = fmul double %173, %175
  %177 = fneg double %176
  %178 = call double @llvm.fmuladd.f64(double %169, double %171, double %177)
  store double %178, ptr %28, align 8, !tbaa !22
  %179 = load double, ptr %27, align 8, !tbaa !22
  %180 = load double, ptr %22, align 8, !tbaa !22
  %181 = fdiv double %179, %180
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = getelementptr inbounds double, ptr %182, i64 0
  store double %181, ptr %183, align 8, !tbaa !22
  %184 = load double, ptr %28, align 8, !tbaa !22
  %185 = load double, ptr %22, align 8, !tbaa !22
  %186 = fdiv double %184, %185
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = getelementptr inbounds double, ptr %187, i64 1
  store double %186, ptr %188, align 8, !tbaa !22
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = getelementptr inbounds double, ptr %189, i64 0
  %191 = load double, ptr %190, align 8, !tbaa !22
  %192 = fsub double 1.000000e+00, %191
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds double, ptr %193, i64 1
  %195 = load double, ptr %194, align 8, !tbaa !22
  %196 = fsub double %192, %195
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = getelementptr inbounds double, ptr %197, i64 2
  store double %196, ptr %198, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  store i32 0, ptr %10, align 4
  br label %199

199:                                              ; preds = %156, %155
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br label %200

200:                                              ; preds = %199, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %201 = load i32, ptr %10, align 4
  switch i32 %201, label %205 [
    i32 0, label %202
  ]

202:                                              ; preds = %200
  br label %203

203:                                              ; preds = %202, %97
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %204, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %205

205:                                              ; preds = %203, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %206

206:                                              ; preds = %205, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %207

207:                                              ; preds = %206, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %208

208:                                              ; preds = %207, %74, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %209

209:                                              ; preds = %208, %46, %33
  %210 = load ptr, ptr %4, align 8
  ret ptr %210
}

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

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

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

declare void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #1 align 2

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

declare noundef i32 @_Z29RGBDTransformTextureToSurfaceRK7R2PointRS_PK11RGBDSurface(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #3

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R2Point = type { [2 x double] }
%class.R2Vector = type { [2 x double] }

@RN_EPSILON = external local_unnamed_addr global double, align 8

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #1 align 2

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

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

declare void @_ZN7R2PointC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK11RGBDSurface19SearchMeshFaceIndexERK7R2PointPd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef writeonly %2) unnamed_addr #4 align 2 {
  %4 = alloca %class.R2Point, align 8
  %5 = alloca %class.R2Point, align 8
  %6 = alloca %class.R2Point, align 8
  %7 = alloca %class.R2Vector, align 8
  %8 = alloca %class.R2Vector, align 8
  %9 = alloca %class.R2Point, align 8
  %10 = alloca %class.R2Vector, align 8
  %11 = alloca %class.R2Vector, align 8
  %12 = alloca %class.R2Vector, align 8
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %114, label %15

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

18:                                               ; preds = %15
  %19 = load ptr, ptr %0, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %19, i64 240
  %21 = load ptr, ptr %20, align 8
  tail call void %21(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %.pr = load ptr, ptr %16, align 8, !tbaa !17
  %.not44 = icmp eq ptr %.pr, null
  br i1 %.not44, label %114, label %.thread

.thread:                                          ; preds = %15, %18
  %22 = tail call noundef double @_ZNK7R2Point1XEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %23 = fadd double %22, 5.000000e-01
  %24 = fptosi double %23 to i32
  %25 = tail call noundef double @_ZNK7R2Point1YEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %26 = fadd double %25, 5.000000e-01
  %27 = fptosi double %26 to i32
  %28 = icmp slt i32 %24, 0
  br i1 %28, label %114, label %29

29:                                               ; preds = %.thread
  %30 = load ptr, ptr %16, align 8, !tbaa !17
  %31 = tail call noundef i32 @_ZNK6R2Grid11XResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %30)
  %.not45 = icmp sle i32 %31, %24
  %32 = icmp slt i32 %27, 0
  %or.cond = select i1 %.not45, i1 true, i1 %32
  br i1 %or.cond, label %114, label %33

33:                                               ; preds = %29
  %34 = load ptr, ptr %16, align 8, !tbaa !17
  %35 = tail call noundef i32 @_ZNK6R2Grid11YResolutionEv(ptr noundef nonnull align 8 dereferenceable(208) %34)
  %.not46 = icmp sgt i32 %35, %27
  br i1 %.not46, label %36, label %114

36:                                               ; preds = %33
  %37 = load ptr, ptr %16, align 8, !tbaa !17
  %38 = tail call noundef double @_ZNK6R2Grid9GridValueEii(ptr noundef nonnull align 8 dereferenceable(208) %37, i32 noundef %24, i32 noundef %27)
  %39 = fcmp oeq double %38, -3.210000e+02
  br i1 %39, label %114, label %40

40:                                               ; preds = %36
  %41 = fadd double %38, 5.000000e-01
  %42 = fptosi double %41 to i32
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %114, label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = tail call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %45)
  %.not47 = icmp sgt i32 %46, %42
  br i1 %.not47, label %47, label %114

47:                                               ; preds = %44
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = tail call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %48, i32 noundef %42)
  %.not48 = icmp eq ptr %2, null
  br i1 %.not48, label %114, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %51, ptr noundef %49, i32 noundef 0)
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %53, ptr noundef %49, i32 noundef 1)
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %55, ptr noundef %49, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %57, ptr noundef %52)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %58)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %59, ptr noundef %54)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %60)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %61, ptr noundef %56)
  call void @_ZN7R2PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %62)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %7, i32 noundef 0)
  %64 = load double, ptr %63, align 8, !tbaa !20
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 1)
  %66 = load double, ptr %65, align 8, !tbaa !20
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %7, i32 noundef 1)
  %68 = load double, ptr %67, align 8, !tbaa !20
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 0)
  %70 = load double, ptr %69, align 8, !tbaa !20
  %71 = fneg double %68
  %72 = fmul double %70, %71
  %73 = call double @llvm.fmuladd.f64(double %64, double %66, double %72)
  %74 = load double, ptr @RN_EPSILON, align 8, !tbaa !20
  %75 = call noundef i32 @_Z8RNIsZerodd(double noundef %73, double noundef %74)
  %.not49 = icmp eq i32 %75, 0
  br i1 %.not49, label %76, label %.critedge

.critedge:                                        ; preds = %50
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %114

76:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  call void @_ZN7R2PointC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %77 = call noundef i32 @_Z29RGBDTransformTextureToSurfaceRK7R2PointRS_PK11RGBDSurface(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %0)
  %.not50.not = icmp eq i32 %77, 0
  br i1 %.not50.not, label %.critedge52, label %78

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  call void @_ZmiRK7R2PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R2Vector) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef 0)
  %80 = load double, ptr %79, align 8, !tbaa !20
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 1)
  %82 = load double, ptr %81, align 8, !tbaa !20
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef 1)
  %84 = load double, ptr %83, align 8, !tbaa !20
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 0)
  %86 = load double, ptr %85, align 8, !tbaa !20
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 0)
  %88 = load double, ptr %87, align 8, !tbaa !20
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 1)
  %90 = load double, ptr %89, align 8, !tbaa !20
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 1)
  %92 = load double, ptr %91, align 8, !tbaa !20
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 0)
  %94 = load double, ptr %93, align 8, !tbaa !20
  %95 = insertelement <2 x double> poison, double %84, i64 0
  %96 = insertelement <2 x double> %95, double %92, i64 1
  %97 = fneg <2 x double> %96
  %98 = insertelement <2 x double> poison, double %86, i64 0
  %99 = insertelement <2 x double> %98, double %94, i64 1
  %100 = fmul <2 x double> %99, %97
  %101 = insertelement <2 x double> poison, double %80, i64 0
  %102 = insertelement <2 x double> %101, double %88, i64 1
  %103 = insertelement <2 x double> poison, double %82, i64 0
  %104 = insertelement <2 x double> %103, double %90, i64 1
  %105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %102, <2 x double> %104, <2 x double> %100)
  %106 = insertelement <2 x double> poison, double %73, i64 0
  %107 = shufflevector <2 x double> %106, <2 x double> poison, <2 x i32> zeroinitializer
  %108 = fdiv <2 x double> %105, %107
  store <2 x double> %108, ptr %2, align 8, !tbaa !20
  %109 = extractelement <2 x double> %108, i64 0
  %110 = fsub double 1.000000e+00, %109
  %111 = extractelement <2 x double> %108, i64 1
  %112 = fsub double %110, %111
  %113 = getelementptr inbounds i8, ptr %2, i64 16
  store double %112, ptr %113, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %114

.critedge52:                                      ; preds = %76
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %114

114:                                              ; preds = %47, %78, %.critedge52, %29, %.thread, %33, %44, %40, %.critedge, %36, %18, %3
  %.6 = phi ptr [ null, %3 ], [ null, %18 ], [ null, %29 ], [ null, %.thread ], [ null, %33 ], [ null, %36 ], [ null, %44 ], [ null, %40 ], [ null, %.critedge ], [ null, %.critedge52 ], [ %49, %78 ], [ %49, %47 ]
  ret ptr %.6
}

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

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

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

declare void @_ZmiRK7R2PointS1_(ptr dead_on_unwind writable sret(%class.R2Vector) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R2VectorixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1 align 2

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

declare noundef i32 @_Z29RGBDTransformTextureToSurfaceRK7R2PointRS_PK11RGBDSurface(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 128}
!6 = !{!"_ZTS11RGBDSurface", !7, i64 8, !10, i64 16, !11, i64 24, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !7, i64 64, !13, i64 72, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS7RNArrayIP6R2GridE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !7, i64 0, !10, i64 8, !10, i64 12}
!13 = !{!"_ZTS5R2Box", !14, i64 0, !16, i64 8, !16, i64 24}
!14 = !{!"_ZTS7R2Solid", !15, i64 0}
!15 = !{!"_ZTS7R2Shape"}
!16 = !{!"_ZTS7R2Point", !8, i64 0}
!17 = !{!6, !7, i64 136}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !9, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !8, i64 0}


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