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

; 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.RNRgb = type { [3 x double] }
%class.R3Point = type { [3 x double] }
%class.R2Point = type { [2 x double] }
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Vector = type { [3 x double] }

; 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 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488), i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind noalias writable sret(%class.RNRgb) align 8, ptr noundef nonnull align 8 dereferenceable(488), i32 noundef, i32 noundef) #3 align 2

declare noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #2

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

declare void @glBegin(i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24)) #1

declare void @glEnd() #2

declare void @glEnable(i32 noundef) #2

declare void @glDisable(i32 noundef) #2

declare void @glColorMaterial(i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9RGBDImage9DrawQuadsEii(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %class.R3Point, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca %class.R3Point, align 8
  %14 = alloca %class.R2Point, align 8
  %15 = alloca %class.R2Point, align 8
  %16 = alloca %class.R2Point, align 8
  %17 = alloca %class.R2Point, align 8
  %18 = alloca %class.R3Plane, align 8
  %19 = alloca double, align 8
  %20 = alloca %class.R3Vector, align 8
  %21 = alloca %class.RNRgb, align 8
  %22 = alloca %class.RNRgb, align 8
  %23 = alloca %class.RNRgb, align 8
  %24 = alloca %class.R3Plane, align 8
  %25 = alloca double, align 8
  %26 = alloca %class.R3Vector, align 8
  %27 = alloca %class.RNRgb, align 8
  %28 = alloca %class.RNRgb, align 8
  %29 = alloca %class.RNRgb, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %30 = load ptr, ptr %4, align 8
  %31 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %30)
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds ptr, ptr %32, i64 22
  %34 = load ptr, ptr %33, align 8
  call void %34(ptr noundef nonnull align 8 dereferenceable(272) %31)
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 2
  br i1 %36, label %37, label %38

37:                                               ; preds = %3
  call void @glEnable(i32 noundef 2903)
  call void @glColorMaterial(i32 noundef 1032, i32 noundef 5634)
  call void @glEnable(i32 noundef 2896)
  br label %38

38:                                               ; preds = %37, %3
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = load ptr, ptr %30, align 8, !tbaa !11
  %41 = getelementptr inbounds ptr, ptr %40, i64 23
  %42 = load ptr, ptr %41, align 8
  call void %42(ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %39)
  call void @glBegin(i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %229, %38
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef 0)
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = sub nsw i32 %45, %46
  %48 = icmp slt i32 %44, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %43
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %233

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %224, %50
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef 1)
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sub nsw i32 %53, %54
  %56 = icmp slt i32 %52, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %228

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sitofp i32 %59 to double
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sitofp i32 %61 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef %60, double noundef %62)
  %63 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %30)
  %64 = icmp ne i32 %63, 0
  %65 = xor i1 %64, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br i1 %65, label %66, label %67

66:                                               ; preds = %58
  store i32 7, ptr %8, align 4
  br label %221

67:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = add nsw i32 %68, %69
  %71 = sitofp i32 %70 to double
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = sitofp i32 %72 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %15, double noundef %71, double noundef %73)
  %74 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %30)
  %75 = icmp ne i32 %74, 0
  %76 = xor i1 %75, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br i1 %76, label %77, label %78

77:                                               ; preds = %67
  store i32 7, ptr %8, align 4
  br label %221

78:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = add nsw i32 %79, %80
  %82 = sitofp i32 %81 to double
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = add nsw i32 %83, %84
  %86 = sitofp i32 %85 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %82, double noundef %86)
  %87 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %30)
  %88 = icmp ne i32 %87, 0
  %89 = xor i1 %88, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br i1 %89, label %90, label %91

90:                                               ; preds = %78
  store i32 7, ptr %8, align 4
  br label %221

91:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = sitofp i32 %92 to double
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = add nsw i32 %94, %95
  %97 = sitofp i32 %96 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef %93, double noundef %97)
  %98 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef %30)
  %99 = icmp ne i32 %98, 0
  %100 = xor i1 %99, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br i1 %100, label %101, label %102

101:                                              ; preds = %91
  store i32 7, ptr %8, align 4
  br label %221

102:                                              ; preds = %91
  %103 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %104 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %105 = fsub double %103, %104
  %106 = call double @llvm.fabs.f64(double %105)
  %107 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %108 = fneg double %107
  %109 = fdiv double %106, %108
  %110 = fcmp olt double %109, 5.000000e-02
  br i1 %110, label %111, label %161

111:                                              ; preds = %102
  %112 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %113 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %114 = fsub double %112, %113
  %115 = call double @llvm.fabs.f64(double %114)
  %116 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %117 = fneg double %116
  %118 = fdiv double %115, %117
  %119 = fcmp olt double %118, 5.000000e-02
  br i1 %119, label %120, label %161

120:                                              ; preds = %111
  %121 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %122 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %123 = fsub double %121, %122
  %124 = call double @llvm.fabs.f64(double %123)
  %125 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %126 = fneg double %125
  %127 = fdiv double %124, %126
  %128 = fcmp olt double %127, 5.000000e-02
  br i1 %128, label %129, label %161

129:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  call void @_ZN7R3PlaneC1ERK7R3PointS2_S2_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %131 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %130, ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  store double %131, ptr %19, align 8, !tbaa !13
  %132 = load double, ptr %19, align 8, !tbaa !13
  %133 = fcmp olt double %132, -5.000000e-01
  br i1 %133, label %134, label %160

134:                                              ; preds = %129
  %135 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %135)
  %136 = load i32, ptr %5, align 4, !tbaa !9
  %137 = icmp eq i32 %136, 1
  br i1 %137, label %138, label %141

138:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  %139 = load i32, ptr %7, align 4, !tbaa !9
  %140 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %21, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %139, i32 noundef %140)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %21)
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %141

141:                                              ; preds = %138, %134
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %142 = load i32, ptr %5, align 4, !tbaa !9
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %144, label %149

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %145 = load i32, ptr %7, align 4, !tbaa !9
  %146 = load i32, ptr %6, align 4, !tbaa !9
  %147 = add nsw i32 %145, %146
  %148 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %22, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %147, i32 noundef %148)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %149

149:                                              ; preds = %144, %141
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %150 = load i32, ptr %5, align 4, !tbaa !9
  %151 = icmp eq i32 %150, 1
  br i1 %151, label %152, label %159

152:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  %153 = load i32, ptr %7, align 4, !tbaa !9
  %154 = load i32, ptr %6, align 4, !tbaa !9
  %155 = add nsw i32 %153, %154
  %156 = load i32, ptr %9, align 4, !tbaa !9
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = add nsw i32 %156, %157
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %23, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %155, i32 noundef %158)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %23)
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %159

159:                                              ; preds = %152, %149
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %12)
  br label %160

160:                                              ; preds = %159, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %161

161:                                              ; preds = %160, %120, %111, %102
  %162 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %163 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %164 = fsub double %162, %163
  %165 = call double @llvm.fabs.f64(double %164)
  %166 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %167 = fneg double %166
  %168 = fdiv double %165, %167
  %169 = fcmp olt double %168, 5.000000e-02
  br i1 %169, label %170, label %220

170:                                              ; preds = %161
  %171 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %172 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %173 = fsub double %171, %172
  %174 = call double @llvm.fabs.f64(double %173)
  %175 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %176 = fneg double %175
  %177 = fdiv double %174, %176
  %178 = fcmp olt double %177, 5.000000e-02
  br i1 %178, label %179, label %220

179:                                              ; preds = %170
  %180 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %181 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %182 = fsub double %180, %181
  %183 = call double @llvm.fabs.f64(double %182)
  %184 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %185 = fneg double %184
  %186 = fdiv double %183, %185
  %187 = fcmp olt double %186, 5.000000e-02
  br i1 %187, label %188, label %220

188:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  call void @_ZN7R3PlaneC1ERK7R3PointS2_S2_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %189 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %190 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %189, ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  store double %190, ptr %25, align 8, !tbaa !13
  %191 = load double, ptr %25, align 8, !tbaa !13
  %192 = fcmp olt double %191, -5.000000e-01
  br i1 %192, label %193, label %219

193:                                              ; preds = %188
  %194 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %194)
  %195 = load i32, ptr %5, align 4, !tbaa !9
  %196 = icmp eq i32 %195, 1
  br i1 %196, label %197, label %200

197:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #6
  %198 = load i32, ptr %7, align 4, !tbaa !9
  %199 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %27, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %198, i32 noundef %199)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %27)
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  br label %200

200:                                              ; preds = %197, %193
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %201 = load i32, ptr %5, align 4, !tbaa !9
  %202 = icmp eq i32 %201, 1
  br i1 %202, label %203, label %210

203:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #6
  %204 = load i32, ptr %7, align 4, !tbaa !9
  %205 = load i32, ptr %6, align 4, !tbaa !9
  %206 = add nsw i32 %204, %205
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = load i32, ptr %6, align 4, !tbaa !9
  %209 = add nsw i32 %207, %208
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %28, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %206, i32 noundef %209)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %28)
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  br label %210

210:                                              ; preds = %203, %200
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %211 = load i32, ptr %5, align 4, !tbaa !9
  %212 = icmp eq i32 %211, 1
  br i1 %212, label %213, label %218

213:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #6
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = load i32, ptr %9, align 4, !tbaa !9
  %216 = load i32, ptr %6, align 4, !tbaa !9
  %217 = add nsw i32 %215, %216
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind writable sret(%class.RNRgb) align 8 %29, ptr noundef nonnull align 8 dereferenceable(488) %30, i32 noundef %214, i32 noundef %217)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %29)
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #6
  br label %218

218:                                              ; preds = %213, %210
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %13)
  br label %219

219:                                              ; preds = %218, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  br label %220

220:                                              ; preds = %219, %179, %170, %161
  store i32 0, ptr %8, align 4
  br label %221

221:                                              ; preds = %220, %101, %90, %77, %66
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  %222 = load i32, ptr %8, align 4
  switch i32 %222, label %242 [
    i32 0, label %223
    i32 7, label %224
  ]

223:                                              ; preds = %221
  br label %224

224:                                              ; preds = %223, %221
  %225 = load i32, ptr %6, align 4, !tbaa !9
  %226 = load i32, ptr %9, align 4, !tbaa !9
  %227 = add nsw i32 %226, %225
  store i32 %227, ptr %9, align 4, !tbaa !9
  br label %51, !llvm.loop !15

228:                                              ; preds = %57
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %6, align 4, !tbaa !9
  %231 = load i32, ptr %7, align 4, !tbaa !9
  %232 = add nsw i32 %231, %230
  store i32 %232, ptr %7, align 4, !tbaa !9
  br label %43, !llvm.loop !17

233:                                              ; preds = %49
  call void @glEnd()
  %234 = load i32, ptr %5, align 4, !tbaa !9
  %235 = icmp eq i32 %234, 2
  br i1 %235, label %236, label %237

236:                                              ; preds = %233
  call void @glDisable(i32 noundef 2903)
  call void @glDisable(i32 noundef 2896)
  br label %237

237:                                              ; preds = %236, %233
  %238 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %30)
  %239 = load ptr, ptr %238, align 8, !tbaa !11
  %240 = getelementptr inbounds ptr, ptr %239, i64 23
  %241 = load ptr, ptr %240, align 8
  call void %241(ptr noundef nonnull align 8 dereferenceable(272) %238)
  ret void

242:                                              ; preds = %221
  unreachable
}

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

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

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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.RNRgb = type { [3 x double] }
%class.R3Point = type { [3 x double] }
%class.R2Point = type { [2 x double] }
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Vector = type { [3 x double] }

; 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 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind noalias writable sret(%class.RNRgb) align 8, ptr noundef nonnull align 8 dereferenceable(488), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

declare noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #2

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

declare void @glBegin(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare void @glEnd() local_unnamed_addr #2

declare void @glEnable(i32 noundef) local_unnamed_addr #2

declare void @glDisable(i32 noundef) local_unnamed_addr #2

declare void @glColorMaterial(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9RGBDImage9DrawQuadsEii(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca %class.R3Point, align 8
  %5 = alloca %class.R3Point, align 8
  %6 = alloca %class.R3Point, align 8
  %7 = alloca %class.R3Point, align 8
  %8 = alloca %class.R2Point, align 8
  %9 = alloca %class.R2Point, align 8
  %10 = alloca %class.R2Point, align 8
  %11 = alloca %class.R2Point, align 8
  %12 = alloca %class.R3Plane, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.RNRgb, align 8
  %15 = alloca %class.RNRgb, align 8
  %16 = alloca %class.RNRgb, align 8
  %17 = alloca %class.R3Plane, align 8
  %18 = alloca %class.R3Vector, align 8
  %19 = alloca %class.RNRgb, align 8
  %20 = alloca %class.RNRgb, align 8
  %21 = alloca %class.RNRgb, align 8
  %22 = tail call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %0)
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 176
  %25 = load ptr, ptr %24, align 8
  tail call void %25(ptr noundef nonnull align 8 dereferenceable(272) %22)
  %26 = icmp eq i32 %1, 2
  br i1 %26, label %27, label %28

27:                                               ; preds = %3
  tail call void @glEnable(i32 noundef 2903)
  tail call void @glColorMaterial(i32 noundef 1032, i32 noundef 5634)
  tail call void @glEnable(i32 noundef 2896)
  br label %28

28:                                               ; preds = %27, %3
  %29 = load ptr, ptr %0, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 184
  %31 = load ptr, ptr %30, align 8
  tail call void %31(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1)
  tail call void @glBegin(i32 noundef 4)
  %32 = tail call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef 0)
  %33 = icmp sgt i32 %32, %2
  br i1 %33, label %.preheader.lr.ph, label %._crit_edge62

.preheader.lr.ph:                                 ; preds = %28
  %34 = icmp eq i32 %1, 1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %.061 = phi i32 [ 0, %.preheader.lr.ph ], [ %.pre-phi, %._crit_edge ]
  %35 = call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef 1)
  %36 = icmp sgt i32 %35, %2
  br i1 %36, label %.lr.ph, label %.preheader.._crit_edge_crit_edge

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre = add nsw i32 %.061, %2
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %37 = sitofp i32 %.061 to double
  %38 = add nsw i32 %.061, %2
  %39 = sitofp i32 %38 to double
  br label %43

._crit_edge62:                                    ; preds = %._crit_edge, %28
  call void @glEnd()
  br i1 %26, label %133, label %134

._crit_edge:                                      ; preds = %128, %.preheader.._crit_edge_crit_edge
  %.pre-phi = phi i32 [ %.pre, %.preheader.._crit_edge_crit_edge ], [ %38, %128 ]
  %40 = call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef 0)
  %41 = sub nsw i32 %40, %2
  %42 = icmp slt i32 %.pre-phi, %41
  br i1 %42, label %.preheader, label %._crit_edge62, !llvm.loop !8

43:                                               ; preds = %.lr.ph, %128
  %.04960 = phi i32 [ 0, %.lr.ph ], [ %129, %128 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %44 = sitofp i32 %.04960 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef %37, double noundef %44)
  %45 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %0)
  %.not = icmp eq i32 %45, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br i1 %.not, label %128, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %9, double noundef %39, double noundef %44)
  %47 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull %0)
  %.not50 = icmp eq i32 %47, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br i1 %.not50, label %128, label %48

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %49 = add nsw i32 %.04960, %2
  %50 = sitofp i32 %49 to double
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %10, double noundef %39, double noundef %50)
  %51 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %0)
  %.not51 = icmp eq i32 %51, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br i1 %.not51, label %128, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  call void @_ZN7R2PointC1Edd(ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %37, double noundef %50)
  %53 = call noundef i32 @_Z26RGBDTransformImageToCameraRK7R2PointR7R3PointPK9RGBDImage(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull %0)
  %.not52 = icmp eq i32 %53, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br i1 %.not52, label %128, label %54

54:                                               ; preds = %52
  %55 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %56 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %57 = fsub double %55, %56
  %58 = call double @llvm.fabs.f64(double %57)
  %59 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %60 = fneg double %59
  %61 = fdiv double %58, %60
  %62 = fcmp olt double %61, 5.000000e-02
  br i1 %62, label %63, label %91

63:                                               ; preds = %54
  %64 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %65 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %66 = fsub double %64, %65
  %67 = call double @llvm.fabs.f64(double %66)
  %68 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %69 = fneg double %68
  %70 = fdiv double %67, %69
  %71 = fcmp olt double %70, 5.000000e-02
  br i1 %71, label %72, label %91

72:                                               ; preds = %63
  %73 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %74 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %75 = fsub double %73, %74
  %76 = call double @llvm.fabs.f64(double %75)
  %77 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %78 = fneg double %77
  %79 = fdiv double %76, %78
  %80 = fcmp olt double %79, 5.000000e-02
  br i1 %80, label %81, label %91

81:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN7R3PlaneC1ERK7R3PointS2_S2_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %83 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  %84 = fcmp olt double %83, -5.000000e-01
  br i1 %84, label %85, label %90

85:                                               ; preds = %81
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %86)
  br i1 %34, label %88, label %87

87:                                               ; preds = %85
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %5)
  br label %89

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %14, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %.061, i32 noundef %.04960)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %15, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %38, i32 noundef %.04960)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %16, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %38, i32 noundef %49)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #6
  br label %89

89:                                               ; preds = %87, %88
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %90

90:                                               ; preds = %89, %81
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br label %91

91:                                               ; preds = %90, %72, %63, %54
  %92 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %93 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %94 = fsub double %92, %93
  %95 = call double @llvm.fabs.f64(double %94)
  %96 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %97 = fneg double %96
  %98 = fdiv double %95, %97
  %99 = fcmp olt double %98, 5.000000e-02
  br i1 %99, label %100, label %128

100:                                              ; preds = %91
  %101 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %102 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %103 = fsub double %101, %102
  %104 = call double @llvm.fabs.f64(double %103)
  %105 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %106 = fneg double %105
  %107 = fdiv double %104, %106
  %108 = fcmp olt double %107, 5.000000e-02
  br i1 %108, label %109, label %128

109:                                              ; preds = %100
  %110 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %111 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %112 = fsub double %110, %111
  %113 = call double @llvm.fabs.f64(double %112)
  %114 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %115 = fneg double %114
  %116 = fdiv double %113, %115
  %117 = fcmp olt double %116, 5.000000e-02
  br i1 %117, label %118, label %128

118:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #6
  call void @_ZN7R3PlaneC1ERK7R3PointS2_S2_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #6
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %120 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #6
  %121 = fcmp olt double %120, -5.000000e-01
  br i1 %121, label %122, label %127

122:                                              ; preds = %118
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7R3Plane6NormalEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  call void @_Z12R3LoadNormalRK8R3Vector(ptr noundef nonnull align 8 dereferenceable(24) %123)
  br i1 %34, label %125, label %124

124:                                              ; preds = %122
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %126

125:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %19, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %.061, i32 noundef %.04960)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %19)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %20, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %38, i32 noundef %49)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #6
  call void @_ZNK9RGBDImage10PixelColorEii(ptr dead_on_unwind nonnull writable sret(%class.RNRgb) align 8 %21, ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %.061, i32 noundef %49)
  call void @_Z9RNLoadRgbRK5RNRgb(ptr noundef nonnull align 8 dereferenceable(24) %21)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #6
  br label %126

126:                                              ; preds = %124, %125
  call void @_Z11R3LoadPointRK7R3Point(ptr noundef nonnull align 8 dereferenceable(24) %7)
  br label %127

127:                                              ; preds = %126, %118
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  br label %128

128:                                              ; preds = %91, %100, %109, %127, %52, %48, %46, %43
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %129 = add nsw i32 %.04960, %2
  %130 = call noundef i32 @_ZNK9RGBDImage7NPixelsEi(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef 1)
  %131 = sub nsw i32 %130, %2
  %132 = icmp slt i32 %129, %131
  br i1 %132, label %43, label %._crit_edge, !llvm.loop !10

133:                                              ; preds = %._crit_edge62
  call void @glDisable(i32 noundef 2903)
  call void @glDisable(i32 noundef 2896)
  br label %134

134:                                              ; preds = %133, %._crit_edge62
  %135 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9RGBDImage13CameraToWorldEv(ptr noundef nonnull align 8 dereferenceable(488) %0)
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 184
  %138 = load ptr, ptr %137, align 8
  call void %138(ptr noundef nonnull align 8 dereferenceable(272) %135)
  ret void
}

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

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

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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