; 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.R3Vector = type { [3 x double] }
%class.R3Ray = type { %class.R3Line }
%class.R3Line = type { %class.R3Point, %class.R3Vector }
%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_EPSILON = external global double, align 8
@R3null_point = external global %class.R3Point, 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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK11R3SceneNode10IntersectsERK5R3RayPPS_PP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(48) %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 ptr, align 8
  %23 = alloca %class.R3Point, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %class.R3Point, align 8
  %30 = alloca %class.R3Vector, align 8
  %31 = alloca double, align 8
  %32 = alloca i32, align 4
  %33 = alloca %class.R3Ray, align 8
  %34 = alloca double, align 8
  %35 = alloca %class.R3Vector, align 8
  %36 = alloca double, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = 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
  %44 = load ptr, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) @R3null_point)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %45 = load double, ptr %21, align 8, !tbaa !9
  store double %45, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #5
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %29)
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #5
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %46 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %44)
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48) %47)
  %49 = call noundef i32 @_Z10R3ContainsRK5R3BoxRK7R3Point(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %65, label %51

51:                                               ; preds = %10
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %44)
  %54 = call noundef i32 @_Z12R3IntersectsRK5R3RayRK5R3BoxP7R3PointP8R3VectorPd(ptr noundef nonnull align 8 dereferenceable(48) %52, ptr noundef nonnull align 8 dereferenceable(56) %53, ptr noundef null, ptr noundef null, ptr noundef %25)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  store i32 0, ptr %11, align 4
  store i32 1, ptr %32, align 4
  br label %300

57:                                               ; preds = %51
  %58 = load double, ptr %25, align 8, !tbaa !9
  %59 = load double, ptr %21, align 8, !tbaa !9
  %60 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %61 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %58, double noundef %59, double noundef %60)
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %57
  store i32 0, ptr %11, align 4
  store i32 1, ptr %32, align 4
  br label %300

64:                                               ; preds = %57
  br label %65

65:                                               ; preds = %64, %10
  call void @llvm.lifetime.start.p0(i64 48, ptr %33) #5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN5R3RayC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef nonnull align 8 dereferenceable(48) %66)
  %67 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 8
  call void @_ZN5R3Ray16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef nonnull align 8 dereferenceable(8) %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  store double 1.000000e+00, ptr %34, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #5
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %68)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(24) %69)
  %70 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 8
  call void @_ZN8R3Vector16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(8) %70)
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %71 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store double %71, ptr %36, align 8, !tbaa !9
  %72 = load double, ptr %36, align 8, !tbaa !9
  %73 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %74 = call noundef i32 @_Z18RNIsNegativeOrZerodd(double noundef %72, double noundef %73)
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %65
  store i32 0, ptr %11, align 4
  store i32 1, ptr %32, align 4
  br label %299

77:                                               ; preds = %65
  %78 = load double, ptr %36, align 8, !tbaa !9
  %79 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %80 = call noundef i32 @_Z12RNIsNotEqualddd(double noundef %78, double noundef 1.000000e+00, double noundef %79)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %90

82:                                               ; preds = %77
  %83 = load double, ptr %36, align 8, !tbaa !9
  store double %83, ptr %34, align 8, !tbaa !9
  %84 = load double, ptr %34, align 8, !tbaa !9
  %85 = load double, ptr %20, align 8, !tbaa !9
  %86 = fmul double %85, %84
  store double %86, ptr %20, align 8, !tbaa !9
  %87 = load double, ptr %34, align 8, !tbaa !9
  %88 = load double, ptr %24, align 8, !tbaa !9
  %89 = fmul double %88, %87
  store double %89, ptr %24, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %82, %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  store i32 0, ptr %37, align 4, !tbaa !11
  br label %91

91:                                               ; preds = %143, %90
  %92 = load i32, ptr %37, align 4, !tbaa !11
  %93 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 5
  %94 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %93)
  %95 = icmp slt i32 %92, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  store i32 2, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  br label %146

97:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  %98 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 5
  %99 = load i32, ptr %37, align 4, !tbaa !11
  %100 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %98, i32 noundef %99)
  store ptr %100, ptr %38, align 8, !tbaa !5
  %101 = load ptr, ptr %38, align 8, !tbaa !5
  %102 = load double, ptr %20, align 8, !tbaa !9
  %103 = load double, ptr %24, align 8, !tbaa !9
  %104 = call noundef i32 @_ZNK14R3SceneElement10IntersectsERK5R3RayPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %101, ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31, double noundef %102, double noundef %103)
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %142

106:                                              ; preds = %97
  %107 = load double, ptr %31, align 8, !tbaa !9
  %108 = load double, ptr %20, align 8, !tbaa !9
  %109 = fcmp oge double %107, %108
  br i1 %109, label %110, label %141

110:                                              ; preds = %106
  %111 = load double, ptr %31, align 8, !tbaa !9
  %112 = load double, ptr %24, align 8, !tbaa !9
  %113 = fcmp ole double %111, %112
  br i1 %113, label %114, label %141

114:                                              ; preds = %110
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %44, ptr %118, align 8, !tbaa !5
  br label %119

119:                                              ; preds = %117, %114
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %126

122:                                              ; preds = %119
  %123 = load ptr, ptr %38, align 8, !tbaa !5
  %124 = call noundef ptr @_ZNK14R3SceneElement8MaterialEv(ptr noundef nonnull align 8 dereferenceable(96) %123)
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %124, ptr %125, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %122, %119
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %132

129:                                              ; preds = %126
  %130 = load ptr, ptr %28, align 8, !tbaa !5
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %130, ptr %131, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %129, %126
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %138

135:                                              ; preds = %132
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %136, ptr noundef nonnull align 8 dereferenceable(24) %30)
  br label %138

138:                                              ; preds = %135, %132
  store ptr %44, ptr %22, align 8, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %29)
  %140 = load double, ptr %31, align 8, !tbaa !9
  store double %140, ptr %24, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %138, %110, %106
  br label %142

142:                                              ; preds = %141, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %37, align 4, !tbaa !11
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %37, align 4, !tbaa !11
  br label %91, !llvm.loop !13

146:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  store i32 0, ptr %39, align 4, !tbaa !11
  br label %147

147:                                              ; preds = %205, %146
  %148 = load i32, ptr %39, align 4, !tbaa !11
  %149 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 6
  %150 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %149)
  %151 = icmp slt i32 %148, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %147
  store i32 5, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  br label %208

153:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  %154 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 6
  %155 = load i32, ptr %39, align 4, !tbaa !11
  %156 = call noundef ptr @_ZNK7RNArrayIP16R3SceneReferenceE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %154, i32 noundef %155)
  store ptr %156, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %157 = load ptr, ptr %40, align 8, !tbaa !5
  %158 = call noundef ptr @_ZNK16R3SceneReference15ReferencedSceneEv(ptr noundef nonnull align 8 dereferenceable(48) %157)
  store ptr %158, ptr %41, align 8, !tbaa !5
  %159 = load ptr, ptr %41, align 8, !tbaa !5
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %204

161:                                              ; preds = %153
  %162 = load ptr, ptr %41, align 8, !tbaa !5
  %163 = load double, ptr %20, align 8, !tbaa !9
  %164 = load double, ptr %24, align 8, !tbaa !9
  %165 = call noundef i32 @_ZNK7R3Scene10IntersectsERK5R3RayPP11R3SceneNodePP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352) %162, ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31, double noundef %163, double noundef %164)
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %203

167:                                              ; preds = %161
  %168 = load double, ptr %31, align 8, !tbaa !9
  %169 = load double, ptr %20, align 8, !tbaa !9
  %170 = fcmp oge double %168, %169
  br i1 %170, label %171, label %202

171:                                              ; preds = %167
  %172 = load double, ptr %31, align 8, !tbaa !9
  %173 = load double, ptr %24, align 8, !tbaa !9
  %174 = fcmp ole double %172, %173
  br i1 %174, label %175, label %202

175:                                              ; preds = %171
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %181

178:                                              ; preds = %175
  %179 = load ptr, ptr %26, align 8, !tbaa !5
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %179, ptr %180, align 8, !tbaa !5
  br label %181

181:                                              ; preds = %178, %175
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %187

184:                                              ; preds = %181
  %185 = load ptr, ptr %27, align 8, !tbaa !5
  %186 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %185, ptr %186, align 8, !tbaa !5
  br label %187

187:                                              ; preds = %184, %181
  %188 = load ptr, ptr %16, align 8, !tbaa !5
  %189 = icmp ne ptr %188, null
  br i1 %189, label %190, label %193

190:                                              ; preds = %187
  %191 = load ptr, ptr %28, align 8, !tbaa !5
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %191, ptr %192, align 8, !tbaa !5
  br label %193

193:                                              ; preds = %190, %187
  %194 = load ptr, ptr %18, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %199

196:                                              ; preds = %193
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %197, ptr noundef nonnull align 8 dereferenceable(24) %30)
  br label %199

199:                                              ; preds = %196, %193
  store ptr %44, ptr %22, align 8, !tbaa !5
  %200 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %29)
  %201 = load double, ptr %31, align 8, !tbaa !9
  store double %201, ptr %24, align 8, !tbaa !9
  br label %202

202:                                              ; preds = %199, %171, %167
  br label %203

203:                                              ; preds = %202, %161
  br label %204

204:                                              ; preds = %203, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %39, align 4, !tbaa !11
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %39, align 4, !tbaa !11
  br label %147, !llvm.loop !15

208:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #5
  store i32 0, ptr %42, align 4, !tbaa !11
  br label %209

209:                                              ; preds = %262, %208
  %210 = load i32, ptr %42, align 4, !tbaa !11
  %211 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 4
  %212 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %211)
  %213 = icmp slt i32 %210, %212
  br i1 %213, label %215, label %214

214:                                              ; preds = %209
  store i32 8, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  br label %265

215:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %216 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 4
  %217 = load i32, ptr %42, align 4, !tbaa !11
  %218 = call noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %216, i32 noundef %217)
  store ptr %218, ptr %43, align 8, !tbaa !5
  %219 = load ptr, ptr %43, align 8, !tbaa !5
  %220 = load double, ptr %20, align 8, !tbaa !9
  %221 = load double, ptr %24, align 8, !tbaa !9
  %222 = call noundef i32 @_ZNK11R3SceneNode10IntersectsERK5R3RayPPS_PP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %219, ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31, double noundef %220, double noundef %221)
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %261

224:                                              ; preds = %215
  %225 = load double, ptr %31, align 8, !tbaa !9
  %226 = load double, ptr %20, align 8, !tbaa !9
  %227 = fcmp oge double %225, %226
  br i1 %227, label %228, label %260

228:                                              ; preds = %224
  %229 = load double, ptr %31, align 8, !tbaa !9
  %230 = load double, ptr %24, align 8, !tbaa !9
  %231 = fcmp ole double %229, %230
  br i1 %231, label %232, label %260

232:                                              ; preds = %228
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = icmp ne ptr %233, null
  br i1 %234, label %235, label %238

235:                                              ; preds = %232
  %236 = load ptr, ptr %26, align 8, !tbaa !5
  %237 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %236, ptr %237, align 8, !tbaa !5
  br label %238

238:                                              ; preds = %235, %232
  %239 = load ptr, ptr %15, align 8, !tbaa !5
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %244

241:                                              ; preds = %238
  %242 = load ptr, ptr %27, align 8, !tbaa !5
  %243 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %242, ptr %243, align 8, !tbaa !5
  br label %244

244:                                              ; preds = %241, %238
  %245 = load ptr, ptr %16, align 8, !tbaa !5
  %246 = icmp ne ptr %245, null
  br i1 %246, label %247, label %250

247:                                              ; preds = %244
  %248 = load ptr, ptr %28, align 8, !tbaa !5
  %249 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %248, ptr %249, align 8, !tbaa !5
  br label %250

250:                                              ; preds = %247, %244
  %251 = load ptr, ptr %18, align 8, !tbaa !5
  %252 = icmp ne ptr %251, null
  br i1 %252, label %253, label %256

253:                                              ; preds = %250
  %254 = load ptr, ptr %18, align 8, !tbaa !5
  %255 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %254, ptr noundef nonnull align 8 dereferenceable(24) %30)
  br label %256

256:                                              ; preds = %253, %250
  %257 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %257, ptr %22, align 8, !tbaa !5
  %258 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %29)
  %259 = load double, ptr %31, align 8, !tbaa !9
  store double %259, ptr %24, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %256, %228, %224
  br label %261

261:                                              ; preds = %260, %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %42, align 4, !tbaa !11
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %42, align 4, !tbaa !11
  br label %209, !llvm.loop !16

265:                                              ; preds = %214
  %266 = load ptr, ptr %22, align 8, !tbaa !5
  %267 = icmp ne ptr %266, null
  br i1 %267, label %269, label %268

268:                                              ; preds = %265
  store i32 0, ptr %11, align 4
  store i32 1, ptr %32, align 4
  br label %299

269:                                              ; preds = %265
  %270 = load ptr, ptr %19, align 8, !tbaa !5
  %271 = icmp ne ptr %270, null
  br i1 %271, label %275, label %272

272:                                              ; preds = %269
  %273 = load ptr, ptr %17, align 8, !tbaa !5
  %274 = icmp ne ptr %273, null
  br i1 %274, label %275, label %291

275:                                              ; preds = %272, %269
  %276 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 8
  call void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(8) %276)
  %277 = load ptr, ptr %17, align 8, !tbaa !5
  %278 = icmp ne ptr %277, null
  br i1 %278, label %279, label %282

279:                                              ; preds = %275
  %280 = load ptr, ptr %17, align 8, !tbaa !5
  %281 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %280, ptr noundef nonnull align 8 dereferenceable(24) %23)
  br label %282

282:                                              ; preds = %279, %275
  %283 = load ptr, ptr %19, align 8, !tbaa !5
  %284 = icmp ne ptr %283, null
  br i1 %284, label %285, label %290

285:                                              ; preds = %282
  %286 = load double, ptr %24, align 8, !tbaa !9
  %287 = load double, ptr %34, align 8, !tbaa !9
  %288 = fdiv double %286, %287
  %289 = load ptr, ptr %19, align 8, !tbaa !5
  store double %288, ptr %289, align 8, !tbaa !9
  br label %290

290:                                              ; preds = %285, %282
  br label %291

291:                                              ; preds = %290, %272
  %292 = load ptr, ptr %18, align 8, !tbaa !5
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %298

294:                                              ; preds = %291
  %295 = load ptr, ptr %18, align 8, !tbaa !5
  %296 = getelementptr inbounds %class.R3SceneNode, ptr %44, i32 0, i32 8
  call void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %295, ptr noundef nonnull align 8 dereferenceable(8) %296)
  %297 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %297)
  br label %298

298:                                              ; preds = %294, %291
  store i32 1, ptr %11, align 4
  store i32 1, ptr %32, align 4
  br label %299

299:                                              ; preds = %298, %268, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %33) #5
  br label %300

300:                                              ; preds = %299, %63, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %301 = load i32, ptr %11, align 4
  ret i32 %301
}

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

declare noundef i32 @_Z10R3ContainsRK5R3BoxRK7R3Point(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(24)) #3

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

declare noundef i32 @_Z12R3IntersectsRK5R3RayRK5R3BoxP7R3PointP8R3VectorPd(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef, ptr noundef) #3

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

declare void @_ZN5R3RayC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

declare void @_ZN5R3Ray16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

declare noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) #3

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

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

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

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

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

declare noundef i32 @_ZNK7R3Scene10IntersectsERK5R3RayPP11R3SceneNodePP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) #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] }
%class.R3Vector = type { [3 x double] }
%class.R3Ray = type { %class.R3Line }
%class.R3Line = type { %class.R3Point, %class.R3Vector }

@RN_EPSILON = external local_unnamed_addr global double, align 8
@R3null_point = external global %class.R3Point, 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

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

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

; 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 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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZNK11R3SceneNode10IntersectsERK5R3RayPPS_PP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef writeonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4, ptr noundef %5, ptr noundef %6, ptr noundef writeonly %7, double noundef %8, double noundef %9) local_unnamed_addr #2 align 2 {
  %11 = alloca %class.R3Point, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %class.R3Point, align 8
  %17 = alloca %class.R3Vector, align 8
  %18 = alloca double, align 8
  %19 = alloca %class.R3Ray, align 8
  %20 = alloca %class.R3Vector, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) @R3null_point)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #5
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #5
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %21 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %0)
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %23 = call noundef i32 @_Z10R3ContainsRK5R3BoxRK7R3Point(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %24, label %31

24:                                               ; preds = %10
  %25 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11R3SceneNode4BBoxEv(ptr noundef nonnull align 8 dereferenceable(432) %0)
  %26 = call noundef i32 @_Z12R3IntersectsRK5R3RayRK5R3BoxP7R3PointP8R3VectorPd(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef null, ptr noundef null, ptr noundef nonnull %12)
  %.not110 = icmp eq i32 %26, 0
  br i1 %.not110, label %161, label %27

27:                                               ; preds = %24
  %28 = load double, ptr %12, align 8, !tbaa !5
  %29 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %30 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %28, double noundef %9, double noundef %29)
  %.not111 = icmp eq i32 %30, 0
  br i1 %.not111, label %31, label %161

31:                                               ; preds = %27, %10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %19) #5
  call void @_ZN5R3RayC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %32 = getelementptr inbounds i8, ptr %0, i64 88
  call void @_ZN5R3Ray16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(8) %32)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #5
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %33)
  call void @_ZN8R3Vector16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %34 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %35 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %36 = call noundef i32 @_Z18RNIsNegativeOrZerodd(double noundef %34, double noundef %35)
  %.not112 = icmp eq i32 %36, 0
  br i1 %.not112, label %37, label %160

37:                                               ; preds = %31
  %38 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %39 = call noundef i32 @_Z12RNIsNotEqualddd(double noundef %34, double noundef 1.000000e+00, double noundef %38)
  %.not113 = icmp eq i32 %39, 0
  %40 = fmul double %34, %8
  %41 = fmul double %34, %9
  %.090 = select i1 %.not113, double 1.000000e+00, double %34
  %.083 = select i1 %.not113, double %9, double %41
  %.079 = select i1 %.not113, double %8, double %40
  %42 = getelementptr inbounds i8, ptr %0, i64 48
  %43 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph, label %.preheader135

.lr.ph:                                           ; preds = %37
  %.not128 = icmp eq ptr %2, null
  %.not129 = icmp eq ptr %3, null
  %.not130 = icmp eq ptr %4, null
  %.not131 = icmp eq ptr %6, null
  br i1 %.not129, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %62
  %.080138.us = phi ptr [ %.181.us, %62 ], [ null, %.lr.ph ]
  %.184137.us = phi double [ %.285.us, %62 ], [ %.083, %.lr.ph ]
  %.089136.us = phi i32 [ %63, %62 ], [ 0, %.lr.ph ]
  %45 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %42, i32 noundef %.089136.us)
  %46 = call noundef i32 @_ZNK14R3SceneElement10IntersectsERK5R3RayPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %45, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, double noundef %.079, double noundef %.184137.us)
  %.not127.us = icmp eq i32 %46, 0
  br i1 %.not127.us, label %62, label %47

47:                                               ; preds = %.lr.ph.split.us
  %48 = load double, ptr %18, align 8, !tbaa !5
  %49 = fcmp ult double %48, %.079
  %50 = fcmp ugt double %48, %.184137.us
  %or.cond132.us = select i1 %49, i1 true, i1 %50
  br i1 %or.cond132.us, label %62, label %51

51:                                               ; preds = %47
  br i1 %.not128, label %53, label %52

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

53:                                               ; preds = %52, %51
  br i1 %.not130, label %56, label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %55, ptr %4, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %54, %53
  br i1 %.not131, label %59, label %57

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %17)
  br label %59

59:                                               ; preds = %57, %56
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %61 = load double, ptr %18, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %59, %47, %.lr.ph.split.us
  %.285.us = phi double [ %61, %59 ], [ %.184137.us, %47 ], [ %.184137.us, %.lr.ph.split.us ]
  %.181.us = phi ptr [ %0, %59 ], [ %.080138.us, %47 ], [ %.080138.us, %.lr.ph.split.us ]
  %63 = add nuw nsw i32 %.089136.us, 1
  %64 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %.lr.ph.split.us, label %.preheader135, !llvm.loop !11

.preheader135:                                    ; preds = %87, %62, %37
  %.184.lcssa = phi double [ %.083, %37 ], [ %.285.us, %62 ], [ %.285, %87 ]
  %.080.lcssa = phi ptr [ null, %37 ], [ %.181.us, %62 ], [ %.181, %87 ]
  %66 = getelementptr inbounds i8, ptr %0, i64 64
  %67 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %66)
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph144, label %.preheader

.lr.ph144:                                        ; preds = %.preheader135
  %.not123 = icmp eq ptr %2, null
  %.not124 = icmp eq ptr %3, null
  %.not125 = icmp eq ptr %4, null
  %.not126 = icmp eq ptr %6, null
  br label %94

.lr.ph.split:                                     ; preds = %.lr.ph, %87
  %.080138 = phi ptr [ %.181, %87 ], [ null, %.lr.ph ]
  %.184137 = phi double [ %.285, %87 ], [ %.083, %.lr.ph ]
  %.089136 = phi i32 [ %88, %87 ], [ 0, %.lr.ph ]
  %69 = call noundef ptr @_ZNK7RNArrayIP14R3SceneElementE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %42, i32 noundef %.089136)
  %70 = call noundef i32 @_ZNK14R3SceneElement10IntersectsERK5R3RayPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(96) %69, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, double noundef %.079, double noundef %.184137)
  %.not127 = icmp eq i32 %70, 0
  br i1 %.not127, label %87, label %71

71:                                               ; preds = %.lr.ph.split
  %72 = load double, ptr %18, align 8, !tbaa !5
  %73 = fcmp ult double %72, %.079
  %74 = fcmp ugt double %72, %.184137
  %or.cond132 = select i1 %73, i1 true, i1 %74
  br i1 %or.cond132, label %87, label %75

75:                                               ; preds = %71
  br i1 %.not128, label %77, label %76

76:                                               ; preds = %75
  store ptr %0, ptr %2, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %76, %75
  %78 = call noundef ptr @_ZNK14R3SceneElement8MaterialEv(ptr noundef nonnull align 8 dereferenceable(96) %69)
  store ptr %78, ptr %3, align 8, !tbaa !9
  br i1 %.not130, label %81, label %79

79:                                               ; preds = %77
  %80 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %80, ptr %4, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %79, %77
  br i1 %.not131, label %84, label %82

82:                                               ; preds = %81
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %17)
  br label %84

84:                                               ; preds = %82, %81
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %86 = load double, ptr %18, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %71, %84, %.lr.ph.split
  %.285 = phi double [ %86, %84 ], [ %.184137, %71 ], [ %.184137, %.lr.ph.split ]
  %.181 = phi ptr [ %0, %84 ], [ %.080138, %71 ], [ %.080138, %.lr.ph.split ]
  %88 = add nuw nsw i32 %.089136, 1
  %89 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %.lr.ph.split, label %.preheader135, !llvm.loop !11

.preheader:                                       ; preds = %118, %.preheader135
  %.386.lcssa = phi double [ %.184.lcssa, %.preheader135 ], [ %.487, %118 ]
  %.2.lcssa = phi ptr [ %.080.lcssa, %.preheader135 ], [ %.3, %118 ]
  %91 = getelementptr inbounds i8, ptr %0, i64 32
  %92 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %91)
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %.lr.ph150, label %._crit_edge

.lr.ph150:                                        ; preds = %.preheader
  %.not117 = icmp eq ptr %2, null
  %.not118 = icmp eq ptr %3, null
  %.not119 = icmp eq ptr %4, null
  %.not120 = icmp eq ptr %6, null
  br label %122

94:                                               ; preds = %.lr.ph144, %118
  %.2143 = phi ptr [ %.080.lcssa, %.lr.ph144 ], [ %.3, %118 ]
  %.082142 = phi i32 [ 0, %.lr.ph144 ], [ %119, %118 ]
  %.386141 = phi double [ %.184.lcssa, %.lr.ph144 ], [ %.487, %118 ]
  %95 = call noundef ptr @_ZNK7RNArrayIP16R3SceneReferenceE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %66, i32 noundef %.082142)
  %96 = call noundef ptr @_ZNK16R3SceneReference15ReferencedSceneEv(ptr noundef nonnull align 8 dereferenceable(48) %95)
  %.not121 = icmp eq ptr %96, null
  br i1 %.not121, label %118, label %97

97:                                               ; preds = %94
  %98 = call noundef i32 @_ZNK7R3Scene10IntersectsERK5R3RayPP11R3SceneNodePP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352) %96, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, double noundef %.079, double noundef %.386141)
  %.not122 = icmp eq i32 %98, 0
  br i1 %.not122, label %118, label %99

99:                                               ; preds = %97
  %100 = load double, ptr %18, align 8, !tbaa !5
  %101 = fcmp ult double %100, %.079
  %102 = fcmp ugt double %100, %.386141
  %or.cond133 = select i1 %101, i1 true, i1 %102
  br i1 %or.cond133, label %118, label %103

103:                                              ; preds = %99
  br i1 %.not123, label %106, label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %105, ptr %2, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %104, %103
  br i1 %.not124, label %109, label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %108, ptr %3, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %107, %106
  br i1 %.not125, label %112, label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %111, ptr %4, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %110, %109
  br i1 %.not126, label %115, label %113

113:                                              ; preds = %112
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %17)
  br label %115

115:                                              ; preds = %113, %112
  %116 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %117 = load double, ptr %18, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %97, %115, %99, %94
  %.487 = phi double [ %117, %115 ], [ %.386141, %99 ], [ %.386141, %97 ], [ %.386141, %94 ]
  %.3 = phi ptr [ %0, %115 ], [ %.2143, %99 ], [ %.2143, %97 ], [ %.2143, %94 ]
  %119 = add nuw nsw i32 %.082142, 1
  %120 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %66)
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %94, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %145, %.preheader
  %.588.lcssa = phi double [ %.386.lcssa, %.preheader ], [ %.6, %145 ]
  %.4.lcssa = phi ptr [ %.2.lcssa, %.preheader ], [ %.5, %145 ]
  %.not114 = icmp eq ptr %.4.lcssa, null
  br i1 %.not114, label %160, label %149

122:                                              ; preds = %.lr.ph150, %145
  %.078149 = phi i32 [ 0, %.lr.ph150 ], [ %146, %145 ]
  %.4148 = phi ptr [ %.2.lcssa, %.lr.ph150 ], [ %.5, %145 ]
  %.588147 = phi double [ %.386.lcssa, %.lr.ph150 ], [ %.6, %145 ]
  %123 = call noundef ptr @_ZNK7RNArrayIP11R3SceneNodeE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %91, i32 noundef %.078149)
  %124 = call noundef i32 @_ZNK11R3SceneNode10IntersectsERK5R3RayPPS_PP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(432) %123, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, double noundef %.079, double noundef %.588147)
  %.not116 = icmp eq i32 %124, 0
  br i1 %.not116, label %145, label %125

125:                                              ; preds = %122
  %126 = load double, ptr %18, align 8, !tbaa !5
  %127 = fcmp ult double %126, %.079
  %128 = fcmp ugt double %126, %.588147
  %or.cond134 = select i1 %127, i1 true, i1 %128
  br i1 %or.cond134, label %145, label %129

129:                                              ; preds = %125
  br i1 %.not117, label %132, label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %131, ptr %2, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %130, %129
  br i1 %.not118, label %135, label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %134, ptr %3, align 8, !tbaa !9
  br label %135

135:                                              ; preds = %133, %132
  br i1 %.not119, label %138, label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %15, align 8, !tbaa !9
  store ptr %137, ptr %4, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %136, %135
  br i1 %.not120, label %141, label %139

139:                                              ; preds = %138
  %140 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %17)
  br label %141

141:                                              ; preds = %139, %138
  %142 = load ptr, ptr %13, align 8, !tbaa !9
  %143 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %144 = load double, ptr %18, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %125, %141, %122
  %.6 = phi double [ %144, %141 ], [ %.588147, %125 ], [ %.588147, %122 ]
  %.5 = phi ptr [ %142, %141 ], [ %.4148, %125 ], [ %.4148, %122 ]
  %146 = add nuw nsw i32 %.078149, 1
  %147 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %91)
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %122, label %._crit_edge, !llvm.loop !14

149:                                              ; preds = %._crit_edge
  %150 = icmp ne ptr %7, null
  %151 = icmp ne ptr %5, null
  %or.cond = or i1 %151, %150
  br i1 %or.cond, label %152, label %158

152:                                              ; preds = %149
  call void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %32)
  br i1 %151, label %153, label %155

153:                                              ; preds = %152
  %154 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %11)
  br label %155

155:                                              ; preds = %153, %152
  br i1 %150, label %156, label %158

156:                                              ; preds = %155
  %157 = fdiv double %.588.lcssa, %.090
  store double %157, ptr %7, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %155, %156, %149
  %.not115 = icmp eq ptr %6, null
  br i1 %.not115, label %160, label %159

159:                                              ; preds = %158
  call void @_ZN8R3Vector9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %32)
  call void @_ZN8R3Vector9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %160

160:                                              ; preds = %158, %159, %._crit_edge, %31
  %.0 = phi i32 [ 0, %31 ], [ 0, %._crit_edge ], [ 1, %159 ], [ 1, %158 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #5
  br label %161

161:                                              ; preds = %27, %24, %160
  %.1 = phi i32 [ %.0, %160 ], [ 0, %24 ], [ 0, %27 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  ret i32 %.1
}

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

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

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

declare noundef i32 @_Z12R3IntersectsRK5R3RayRK5R3BoxP7R3PointP8R3VectorPd(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @_ZN5R3RayC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

declare void @_ZN5R3Ray16InverseTransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

declare noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

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

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

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

declare noundef i32 @_ZNK7R3Scene10IntersectsERK5R3RayPP11R3SceneNodePP10R3MaterialPP7R3ShapeP7R3PointP8R3VectorPddd(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, double noundef) 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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass