; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Graphics (R3SceneNode)

; 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.R3Point = type { [3 x double] }
%class.R3SceneNode = type { ptr, i32, ptr, i32, %class.RNArray, %class.RNArray.0, %class.RNArray.1, %class.RNSymbolTable, %class.R3Affine, %class.R3Box, ptr, ptr }
%class.RNArray = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.0 = type { %class.RNVArray }
%class.RNArray.1 = type { %class.RNVArray }
%class.RNSymbolTable = type { %class.RNMap }
%class.RNMap = type { ptr }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

@RN_INFINITY = external global double, align 8
@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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11R3SceneNode11FindClosestERK7R3PointPPS_PP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, double noundef %8, double noundef %9) #2 align 2 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca %class.R3Point, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store double %8, ptr %20, align 8, !tbaa !9
  store double %9, ptr %21, align 8, !tbaa !9
  %35 = load ptr, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %35)
  %38 = call noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(56) %37)
  store double %38, ptr %24, align 8, !tbaa !9
  %39 = load double, ptr %24, align 8, !tbaa !9
  %40 = load double, ptr %21, align 8, !tbaa !9
  %41 = fcmp ogt double %39, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %10
  store i32 0, ptr %11, align 4
  store i32 1, ptr %25, align 4
  br label %243

43:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %44)
  %45 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 8
  call void @_ZN7R3Point16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %45)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %46 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 8
  %47 = call noundef double @_ZNK8R3Affine11ScaleFactorEv(ptr noundef nonnull align 8 dereferenceable(272) %46)
  store double %47, ptr %27, align 8, !tbaa !9
  %48 = load double, ptr %27, align 8, !tbaa !9
  %49 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %50 = call noundef i32 @_Z8RNIsZerodd(double noundef %48, double noundef %49)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %43
  store i32 0, ptr %11, align 4
  store i32 1, ptr %25, align 4
  br label %242

53:                                               ; preds = %43
  %54 = load double, ptr %20, align 8, !tbaa !9
  %55 = load double, ptr @RN_INFINITY, align 8, !tbaa !9
  %56 = fcmp olt double %54, %55
  br i1 %56, label %57, label %61

57:                                               ; preds = %53
  %58 = load double, ptr %27, align 8, !tbaa !9
  %59 = load double, ptr %20, align 8, !tbaa !9
  %60 = fdiv double %59, %58
  store double %60, ptr %20, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %57, %53
  %62 = load double, ptr %21, align 8, !tbaa !9
  %63 = load double, ptr @RN_INFINITY, align 8, !tbaa !9
  %64 = fcmp olt double %62, %63
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = load double, ptr %27, align 8, !tbaa !9
  %67 = load double, ptr %21, align 8, !tbaa !9
  %68 = fdiv double %67, %66
  store double %68, ptr %21, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !11
  br label %70

70:                                               ; preds = %118, %69
  %71 = load i32, ptr %28, align 4, !tbaa !11
  %72 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 5
  %73 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %72)
  %74 = icmp slt i32 %71, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %70
  store i32 2, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %121

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %77 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 5
  %78 = load i32, ptr %28, align 4, !tbaa !11
  %79 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %77, i32 noundef %78)
  store ptr %79, ptr %29, align 8, !tbaa !5
  %80 = load ptr, ptr %29, align 8, !tbaa !5
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = load double, ptr %20, align 8, !tbaa !9
  %85 = load double, ptr %21, align 8, !tbaa !9
  %86 = call noundef i32 @_ZNK14R3SceneElement11FindClosestERK7R3PointPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %80, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef %81, ptr noundef %82, ptr noundef %83, ptr noundef %23, double noundef %84, double noundef %85)
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %117

88:                                               ; preds = %76
  %89 = load double, ptr %23, align 8, !tbaa !9
  %90 = load double, ptr %20, align 8, !tbaa !9
  %91 = fcmp oge double %89, %90
  br i1 %91, label %92, label %116

92:                                               ; preds = %88
  %93 = load double, ptr %23, align 8, !tbaa !9
  %94 = load double, ptr %21, align 8, !tbaa !9
  %95 = fcmp ole double %93, %94
  br i1 %95, label %96, label %116

96:                                               ; preds = %92
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %101

99:                                               ; preds = %96
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %35, ptr %100, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %99, %96
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %108

104:                                              ; preds = %101
  %105 = load ptr, ptr %29, align 8, !tbaa !5
  %106 = call noundef ptr @_ZNK14R3SceneElement8MaterialEv(ptr noundef nonnull align 8 dereferenceable(96) %105)
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %106, ptr %107, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %104, %101
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %114

111:                                              ; preds = %108
  %112 = load double, ptr %23, align 8, !tbaa !9
  %113 = load ptr, ptr %19, align 8, !tbaa !5
  store double %112, ptr %113, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %111, %108
  store i32 1, ptr %22, align 4, !tbaa !11
  %115 = load double, ptr %23, align 8, !tbaa !9
  store double %115, ptr %21, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %114, %92, %88
  br label %117

117:                                              ; preds = %116, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %28, align 4, !tbaa !11
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %28, align 4, !tbaa !11
  br label %70, !llvm.loop !13

121:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %122

122:                                              ; preds = %166, %121
  %123 = load i32, ptr %30, align 4, !tbaa !11
  %124 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 6
  %125 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = icmp slt i32 %123, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %122
  store i32 5, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %169

128:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %129 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 6
  %130 = load i32, ptr %30, align 4, !tbaa !11
  %131 = call noundef ptr @_ZNK7RNArrayIP16R3SceneReferenceE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %129, i32 noundef %130)
  store ptr %131, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %132 = load ptr, ptr %31, align 8, !tbaa !5
  %133 = call noundef ptr @_ZNK16R3SceneReference15ReferencedSceneEv(ptr noundef nonnull align 8 dereferenceable(48) %132)
  store ptr %133, ptr %32, align 8, !tbaa !5
  %134 = load ptr, ptr %32, align 8, !tbaa !5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %165

136:                                              ; preds = %128
  %137 = load ptr, ptr %32, align 8, !tbaa !5
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = load ptr, ptr %17, align 8, !tbaa !5
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = load double, ptr %20, align 8, !tbaa !9
  %144 = load double, ptr %21, align 8, !tbaa !9
  %145 = call noundef i32 @_ZNK7R3Scene11FindClosestERK7R3PointPP11R3SceneNodePP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352) %137, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %23, double noundef %143, double noundef %144)
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %164

147:                                              ; preds = %136
  %148 = load double, ptr %23, align 8, !tbaa !9
  %149 = load double, ptr %20, align 8, !tbaa !9
  %150 = fcmp oge double %148, %149
  br i1 %150, label %151, label %163

151:                                              ; preds = %147
  %152 = load double, ptr %23, align 8, !tbaa !9
  %153 = load double, ptr %21, align 8, !tbaa !9
  %154 = fcmp ole double %152, %153
  br i1 %154, label %155, label %163

155:                                              ; preds = %151
  %156 = load ptr, ptr %19, align 8, !tbaa !5
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %161

158:                                              ; preds = %155
  %159 = load double, ptr %23, align 8, !tbaa !9
  %160 = load ptr, ptr %19, align 8, !tbaa !5
  store double %159, ptr %160, align 8, !tbaa !9
  br label %161

161:                                              ; preds = %158, %155
  store i32 1, ptr %22, align 4, !tbaa !11
  %162 = load double, ptr %23, align 8, !tbaa !9
  store double %162, ptr %21, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %161, %151, %147
  br label %164

164:                                              ; preds = %163, %136
  br label %165

165:                                              ; preds = %164, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %30, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %30, align 4, !tbaa !11
  br label %122, !llvm.loop !15

169:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 0, ptr %33, align 4, !tbaa !11
  br label %170

170:                                              ; preds = %208, %169
  %171 = load i32, ptr %33, align 4, !tbaa !11
  %172 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 4
  %173 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %172)
  %174 = icmp slt i32 %171, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %170
  store i32 8, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %211

176:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %177 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 4
  %178 = load i32, ptr %33, align 4, !tbaa !11
  %179 = call noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %177, i32 noundef %178)
  store ptr %179, ptr %34, align 8, !tbaa !5
  %180 = load ptr, ptr %34, align 8, !tbaa !5
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = load ptr, ptr %16, align 8, !tbaa !5
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = load ptr, ptr %18, align 8, !tbaa !5
  %186 = load double, ptr %20, align 8, !tbaa !9
  %187 = load double, ptr %21, align 8, !tbaa !9
  %188 = call noundef i32 @_ZNK11R3SceneNode11FindClosestERK7R3PointPPS_PP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %180, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184, ptr noundef %185, ptr noundef %23, double noundef %186, double noundef %187)
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %207

190:                                              ; preds = %176
  %191 = load double, ptr %23, align 8, !tbaa !9
  %192 = load double, ptr %20, align 8, !tbaa !9
  %193 = fcmp oge double %191, %192
  br i1 %193, label %194, label %206

194:                                              ; preds = %190
  %195 = load double, ptr %23, align 8, !tbaa !9
  %196 = load double, ptr %21, align 8, !tbaa !9
  %197 = fcmp ole double %195, %196
  br i1 %197, label %198, label %206

198:                                              ; preds = %194
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %204

201:                                              ; preds = %198
  %202 = load double, ptr %23, align 8, !tbaa !9
  %203 = load ptr, ptr %19, align 8, !tbaa !5
  store double %202, ptr %203, align 8, !tbaa !9
  br label %204

204:                                              ; preds = %201, %198
  store i32 1, ptr %22, align 4, !tbaa !11
  %205 = load double, ptr %23, align 8, !tbaa !9
  store double %205, ptr %21, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %204, %194, %190
  br label %207

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

208:                                              ; preds = %207
  %209 = load i32, ptr %33, align 4, !tbaa !11
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %33, align 4, !tbaa !11
  br label %170, !llvm.loop !16

211:                                              ; preds = %175
  %212 = load i32, ptr %22, align 4, !tbaa !11
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %240

214:                                              ; preds = %211
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  %216 = icmp ne ptr %215, null
  br i1 %216, label %217, label %220

217:                                              ; preds = %214
  %218 = load ptr, ptr %17, align 8, !tbaa !5
  %219 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 8
  call void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %218, ptr noundef nonnull align 8 dereferenceable(8) %219)
  br label %220

220:                                              ; preds = %217, %214
  %221 = load ptr, ptr %18, align 8, !tbaa !5
  %222 = icmp ne ptr %221, null
  br i1 %222, label %223, label %226

223:                                              ; preds = %220
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = getelementptr inbounds %class.R3SceneNode, ptr %35, i32 0, i32 8
  call void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %224, ptr noundef nonnull align 8 dereferenceable(8) %225)
  br label %226

226:                                              ; preds = %223, %220
  %227 = load ptr, ptr %18, align 8, !tbaa !5
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %231

229:                                              ; preds = %226
  %230 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %230)
  br label %231

231:                                              ; preds = %229, %226
  %232 = load ptr, ptr %19, align 8, !tbaa !5
  %233 = icmp ne ptr %232, null
  br i1 %233, label %234, label %239

234:                                              ; preds = %231
  %235 = load double, ptr %27, align 8, !tbaa !9
  %236 = load ptr, ptr %19, align 8, !tbaa !5
  %237 = load double, ptr %236, align 8, !tbaa !9
  %238 = fmul double %237, %235
  store double %238, ptr %236, align 8, !tbaa !9
  br label %239

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

240:                                              ; preds = %239, %211
  %241 = load i32, ptr %22, align 4, !tbaa !11
  store i32 %241, ptr %11, align 4
  store i32 1, ptr %25, align 4
  br label %242

242:                                              ; preds = %240, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  br label %243

243:                                              ; preds = %242, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %244 = load i32, ptr %11, align 4
  ret i32 %244
}

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432)) #2 align 2

declare noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZN7R3Point16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare noundef double @_ZNK8R3Affine11ScaleFactorEv(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #3

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

declare noundef i32 @_ZNK14R3SceneElement11FindClosestERK7R3PointPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) #3

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

declare noundef i32 @_ZNK7R3Scene11FindClosestERK7R3PointPP11R3SceneNodePP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.R3Point = type { [3 x double] }

@RN_INFINITY = external local_unnamed_addr global double, align 8
@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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZNK11R3SceneNode11FindClosestERK7R3PointPPS_PP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, double noundef %8, double noundef %9) local_unnamed_addr #2 align 2 {
  %11 = alloca double, align 8
  %12 = alloca %class.R3Point, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %13 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %0)
  %14 = tail call noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(56) %13)
  %15 = fcmp ogt double %14, %9
  br i1 %15, label %99, label %16

16:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %17 = getelementptr inbounds i8, ptr %0, i64 88
  call void @_ZN7R3Point16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %18 = call noundef double @_ZNK8R3Affine11ScaleFactorEv(ptr noundef nonnull align 8 dereferenceable(272) %17)
  %19 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %20 = call noundef i32 @_Z8RNIsZerodd(double noundef %18, double noundef %19)
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %21, label %98

21:                                               ; preds = %16
  %22 = load double, ptr @RN_INFINITY, align 8, !tbaa !5
  %23 = fcmp ogt double %22, %8
  %24 = fdiv double %8, %18
  %.074 = select i1 %23, double %24, double %8
  %25 = fcmp ogt double %22, %9
  %26 = fdiv double %9, %18
  %.075 = select i1 %25, double %26, double %9
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  %28 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph, label %.preheader116

.lr.ph:                                           ; preds = %21
  %.not111 = icmp eq ptr %2, null
  %.not112 = icmp eq ptr %3, null
  %.not113 = icmp eq ptr %7, null
  br i1 %.not112, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %40
  %.176119.us = phi double [ %.2.us, %40 ], [ %.075, %.lr.ph ]
  %.078118.us = phi i32 [ %.179.us, %40 ], [ 0, %.lr.ph ]
  %.084117.us = phi i32 [ %41, %40 ], [ 0, %.lr.ph ]
  %30 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %27, i32 noundef %.084117.us)
  %31 = call noundef i32 @_ZNK14R3SceneElement11FindClosestERK7R3PointPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %30, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %11, double noundef %.074, double noundef %.176119.us)
  %.not110.us = icmp eq i32 %31, 0
  br i1 %.not110.us, label %40, label %32

32:                                               ; preds = %.lr.ph.split.us
  %33 = load double, ptr %11, align 8, !tbaa !5
  %34 = fcmp ult double %33, %.074
  %35 = fcmp ugt double %33, %.176119.us
  %or.cond.us = select i1 %34, i1 true, i1 %35
  br i1 %or.cond.us, label %40, label %36

36:                                               ; preds = %32
  br i1 %.not111, label %38, label %37

37:                                               ; preds = %36
  store ptr %0, ptr %2, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %37, %36
  br i1 %.not113, label %40, label %39

39:                                               ; preds = %38
  store double %33, ptr %7, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %38, %39, %32, %.lr.ph.split.us
  %.179.us = phi i32 [ %.078118.us, %32 ], [ %.078118.us, %.lr.ph.split.us ], [ 1, %39 ], [ 1, %38 ]
  %.2.us = phi double [ %.176119.us, %32 ], [ %.176119.us, %.lr.ph.split.us ], [ %33, %39 ], [ %33, %38 ]
  %41 = add nuw nsw i32 %.084117.us, 1
  %42 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %.lr.ph.split.us, label %.preheader116, !llvm.loop !11

.preheader116:                                    ; preds = %58, %40, %21
  %.078.lcssa = phi i32 [ 0, %21 ], [ %.179.us, %40 ], [ %.179, %58 ]
  %.176.lcssa = phi double [ %.075, %21 ], [ %.2.us, %40 ], [ %.2, %58 ]
  %44 = getelementptr inbounds i8, ptr %0, i64 64
  %45 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.lr.ph125, label %.preheader

.lr.ph125:                                        ; preds = %.preheader116
  %.not109 = icmp eq ptr %7, null
  br label %65

.lr.ph.split:                                     ; preds = %.lr.ph, %58
  %.176119 = phi double [ %.2, %58 ], [ %.075, %.lr.ph ]
  %.078118 = phi i32 [ %.179, %58 ], [ 0, %.lr.ph ]
  %.084117 = phi i32 [ %59, %58 ], [ 0, %.lr.ph ]
  %47 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %27, i32 noundef %.084117)
  %48 = call noundef i32 @_ZNK14R3SceneElement11FindClosestERK7R3PointPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %47, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %11, double noundef %.074, double noundef %.176119)
  %.not110 = icmp eq i32 %48, 0
  br i1 %.not110, label %58, label %49

49:                                               ; preds = %.lr.ph.split
  %50 = load double, ptr %11, align 8, !tbaa !5
  %51 = fcmp ult double %50, %.074
  %52 = fcmp ugt double %50, %.176119
  %or.cond = select i1 %51, i1 true, i1 %52
  br i1 %or.cond, label %58, label %53

53:                                               ; preds = %49
  br i1 %.not111, label %55, label %54

54:                                               ; preds = %53
  store ptr %0, ptr %2, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %54, %53
  %56 = call noundef ptr @_ZNK14R3SceneElement8MaterialEv(ptr noundef nonnull align 8 dereferenceable(96) %47)
  store ptr %56, ptr %3, align 8, !tbaa !9
  %.pre = load double, ptr %11, align 8, !tbaa !5
  br i1 %.not113, label %58, label %57

57:                                               ; preds = %55
  store double %.pre, ptr %7, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %55, %57, %49, %.lr.ph.split
  %.179 = phi i32 [ %.078118, %49 ], [ %.078118, %.lr.ph.split ], [ 1, %57 ], [ 1, %55 ]
  %.2 = phi double [ %.176119, %49 ], [ %.176119, %.lr.ph.split ], [ %.pre, %57 ], [ %.pre, %55 ]
  %59 = add nuw nsw i32 %.084117, 1
  %60 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %.lr.ph.split, label %.preheader116, !llvm.loop !11

.preheader:                                       ; preds = %75, %.preheader116
  %.280.lcssa = phi i32 [ %.078.lcssa, %.preheader116 ], [ %.381, %75 ]
  %.3.lcssa = phi double [ %.176.lcssa, %.preheader116 ], [ %.4, %75 ]
  %62 = getelementptr inbounds i8, ptr %0, i64 32
  %63 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %62)
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph131, label %._crit_edge

.lr.ph131:                                        ; preds = %.preheader
  %.not106 = icmp eq ptr %7, null
  br label %79

65:                                               ; preds = %.lr.ph125, %75
  %.3124 = phi double [ %.176.lcssa, %.lr.ph125 ], [ %.4, %75 ]
  %.077123 = phi i32 [ 0, %.lr.ph125 ], [ %76, %75 ]
  %.280122 = phi i32 [ %.078.lcssa, %.lr.ph125 ], [ %.381, %75 ]
  %66 = call noundef ptr @_ZNK7RNArrayIP16R3SceneReferenceE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %44, i32 noundef %.077123)
  %67 = call noundef ptr @_ZNK16R3SceneReference15ReferencedSceneEv(ptr noundef nonnull align 8 dereferenceable(48) %66)
  %.not107 = icmp eq ptr %67, null
  br i1 %.not107, label %75, label %68

68:                                               ; preds = %65
  %69 = call noundef i32 @_ZNK7R3Scene11FindClosestERK7R3PointPP11R3SceneNodePP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352) %67, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %11, double noundef %.074, double noundef %.3124)
  %.not108 = icmp eq i32 %69, 0
  br i1 %.not108, label %75, label %70

70:                                               ; preds = %68
  %71 = load double, ptr %11, align 8, !tbaa !5
  %72 = fcmp ult double %71, %.074
  %73 = fcmp ugt double %71, %.3124
  %or.cond114 = select i1 %72, i1 true, i1 %73
  %brmerge = or i1 %or.cond114, %.not109
  %.280122.mux = select i1 %or.cond114, i32 %.280122, i32 1
  %.3124.mux = select i1 %or.cond114, double %.3124, double %71
  br i1 %brmerge, label %75, label %74

74:                                               ; preds = %70
  store double %71, ptr %7, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %70, %74, %68, %65
  %.381 = phi i32 [ %.280122.mux, %70 ], [ %.280122, %68 ], [ %.280122, %65 ], [ 1, %74 ]
  %.4 = phi double [ %.3124.mux, %70 ], [ %.3124, %68 ], [ %.3124, %65 ], [ %71, %74 ]
  %76 = add nuw nsw i32 %.077123, 1
  %77 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %65, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %87, %.preheader
  %.482.lcssa = phi i32 [ %.280.lcssa, %.preheader ], [ %.583, %87 ]
  %.not101 = icmp eq i32 %.482.lcssa, 0
  br i1 %.not101, label %98, label %91

79:                                               ; preds = %.lr.ph131, %87
  %.073130 = phi i32 [ 0, %.lr.ph131 ], [ %88, %87 ]
  %.5129 = phi double [ %.3.lcssa, %.lr.ph131 ], [ %.6, %87 ]
  %.482128 = phi i32 [ %.280.lcssa, %.lr.ph131 ], [ %.583, %87 ]
  %80 = call noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %62, i32 noundef %.073130)
  %81 = call noundef i32 @_ZNK11R3SceneNode11FindClosestERK7R3PointPPS_PP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %80, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %11, double noundef %.074, double noundef %.5129)
  %.not105 = icmp eq i32 %81, 0
  br i1 %.not105, label %87, label %82

82:                                               ; preds = %79
  %83 = load double, ptr %11, align 8, !tbaa !5
  %84 = fcmp ult double %83, %.074
  %85 = fcmp ugt double %83, %.5129
  %or.cond115 = select i1 %84, i1 true, i1 %85
  %brmerge133 = or i1 %or.cond115, %.not106
  %.482128.mux = select i1 %or.cond115, i32 %.482128, i32 1
  %.5129.mux = select i1 %or.cond115, double %.5129, double %83
  br i1 %brmerge133, label %87, label %86

86:                                               ; preds = %82
  store double %83, ptr %7, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %82, %86, %79
  %.583 = phi i32 [ %.482128.mux, %82 ], [ %.482128, %79 ], [ 1, %86 ]
  %.6 = phi double [ %.5129.mux, %82 ], [ %.5129, %79 ], [ %83, %86 ]
  %88 = add nuw nsw i32 %.073130, 1
  %89 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %62)
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %79, label %._crit_edge, !llvm.loop !14

91:                                               ; preds = %._crit_edge
  %.not102 = icmp eq ptr %5, null
  br i1 %.not102, label %93, label %92

92:                                               ; preds = %91
  call void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %17)
  br label %93

93:                                               ; preds = %92, %91
  %.not103 = icmp eq ptr %6, null
  br i1 %.not103, label %.critedge, label %94

94:                                               ; preds = %93
  call void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %.critedge

.critedge:                                        ; preds = %93, %94
  %.not104 = icmp eq ptr %7, null
  br i1 %.not104, label %98, label %95

95:                                               ; preds = %.critedge
  %96 = load double, ptr %7, align 8, !tbaa !5
  %97 = fmul double %18, %96
  store double %97, ptr %7, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %._crit_edge, %95, %.critedge, %16
  %.0 = phi i32 [ 0, %16 ], [ %.482.lcssa, %.critedge ], [ %.482.lcssa, %95 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  br label %99

99:                                               ; preds = %10, %98
  %.1 = phi i32 [ %.0, %98 ], [ 0, %10 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  ret i32 %.1
}

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432)) local_unnamed_addr #2 align 2

declare noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

declare void @_ZN7R3Point16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare noundef double @_ZNK8R3Affine11ScaleFactorEv(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #3

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

declare noundef i32 @_ZNK14R3SceneElement11FindClosestERK7R3PointPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) local_unnamed_addr #3

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

declare noundef i32 @_ZNK7R3Scene11FindClosestERK7R3PointPP11R3SceneNodePP10R3MaterialPP7R3ShapePS0_P8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) local_unnamed_addr #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass