; LLVM IR from yangfengzzz/DigitalVox4 :: vox.math (collision_utils)

; 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.vox::Ray" = type { %"class.vox::Point", %"class.vox::Vector" }
%"class.vox::Point" = type { float, float, float }
%"class.vox::Vector" = type { float, float, float }
%"class.vox::BoundingBox" = type { %"class.vox::Point", %"class.vox::Point" }

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_ZN3vox19intersectsRayAndBoxERKNS_3RayIfLm3EEERKNS_11BoundingBoxIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(24) %1) #2 {
  %3 = alloca float, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.vox::Ray", ptr %31, i32 0, i32 0
  store ptr %32, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.vox::Ray", ptr %33, i32 0, i32 1
  store ptr %34, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.vox::BoundingBox", ptr %35, i32 0, i32 0
  store ptr %36, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.vox::BoundingBox", ptr %37, i32 0, i32 1
  store ptr %38, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.vox::Vector", ptr %39, i32 0, i32 0
  store ptr %40, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.vox::Vector", ptr %41, i32 0, i32 1
  store ptr %42, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.vox::Vector", ptr %43, i32 0, i32 2
  store ptr %44, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.vox::Point", ptr %45, i32 0, i32 0
  store ptr %46, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.vox::Point", ptr %47, i32 0, i32 1
  store ptr %48, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.vox::Point", ptr %49, i32 0, i32 2
  store ptr %50, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store float 0.000000e+00, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %51 = call noundef float @_ZNSt14numeric_limitsIfE3maxEv() #4
  store float %51, ptr %17, align 4, !tbaa !9
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = load float, ptr %52, align 4, !tbaa !9
  %54 = call noundef float @_ZSt3absf(float noundef %53)
  %55 = fcmp olt float %54, 0x3E80000000000000
  br i1 %55, label %56, label %72

56:                                               ; preds = %2
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = load float, ptr %57, align 4, !tbaa !9
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.vox::Point", ptr %59, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !11
  %62 = fcmp olt float %58, %61
  br i1 %62, label %70, label %63

63:                                               ; preds = %56
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = load float, ptr %64, align 4, !tbaa !9
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.vox::Point", ptr %66, i32 0, i32 0
  %68 = load float, ptr %67, align 4, !tbaa !11
  %69 = fcmp ogt float %65, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %63, %56
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %242

71:                                               ; preds = %63
  br label %114

72:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = load float, ptr %73, align 4, !tbaa !9
  %75 = fpext float %74 to double
  %76 = fdiv double 1.000000e+00, %75
  %77 = fptrunc double %76 to float
  store float %77, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.vox::Point", ptr %78, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !11
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load float, ptr %81, align 4, !tbaa !9
  %83 = fsub float %80, %82
  %84 = load float, ptr %19, align 4, !tbaa !9
  %85 = fmul float %83, %84
  store float %85, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.vox::Point", ptr %86, i32 0, i32 0
  %88 = load float, ptr %87, align 4, !tbaa !11
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load float, ptr %89, align 4, !tbaa !9
  %91 = fsub float %88, %90
  %92 = load float, ptr %19, align 4, !tbaa !9
  %93 = fmul float %91, %92
  store float %93, ptr %21, align 4, !tbaa !9
  %94 = load float, ptr %20, align 4, !tbaa !9
  %95 = load float, ptr %21, align 4, !tbaa !9
  %96 = fcmp ogt float %94, %95
  br i1 %96, label %97, label %101

97:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %98 = load float, ptr %20, align 4, !tbaa !9
  store float %98, ptr %22, align 4, !tbaa !9
  %99 = load float, ptr %21, align 4, !tbaa !9
  store float %99, ptr %20, align 4, !tbaa !9
  %100 = load float, ptr %22, align 4, !tbaa !9
  store float %100, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %101

101:                                              ; preds = %97, %72
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %103 = load float, ptr %102, align 4, !tbaa !9
  store float %103, ptr %16, align 4, !tbaa !9
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %105 = load float, ptr %104, align 4, !tbaa !9
  store float %105, ptr %17, align 4, !tbaa !9
  %106 = load float, ptr %16, align 4, !tbaa !9
  %107 = load float, ptr %17, align 4, !tbaa !9
  %108 = fcmp ogt float %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %101
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %111

110:                                              ; preds = %101
  store i32 0, ptr %18, align 4
  br label %111

111:                                              ; preds = %110, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  %112 = load i32, ptr %18, align 4
  switch i32 %112, label %242 [
    i32 0, label %113
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113, %71
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load float, ptr %115, align 4, !tbaa !9
  %117 = call noundef float @_ZSt3absf(float noundef %116)
  %118 = fcmp olt float %117, 0x3E80000000000000
  br i1 %118, label %119, label %135

119:                                              ; preds = %114
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = load float, ptr %120, align 4, !tbaa !9
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %"class.vox::Point", ptr %122, i32 0, i32 1
  %124 = load float, ptr %123, align 4, !tbaa !13
  %125 = fcmp olt float %121, %124
  br i1 %125, label %133, label %126

126:                                              ; preds = %119
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load float, ptr %127, align 4, !tbaa !9
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %"class.vox::Point", ptr %129, i32 0, i32 1
  %131 = load float, ptr %130, align 4, !tbaa !13
  %132 = fcmp ogt float %128, %131
  br i1 %132, label %133, label %134

133:                                              ; preds = %126, %119
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %242

134:                                              ; preds = %126
  br label %177

135:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = load float, ptr %136, align 4, !tbaa !9
  %138 = fpext float %137 to double
  %139 = fdiv double 1.000000e+00, %138
  %140 = fptrunc double %139 to float
  store float %140, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %"class.vox::Point", ptr %141, i32 0, i32 1
  %143 = load float, ptr %142, align 4, !tbaa !13
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load float, ptr %144, align 4, !tbaa !9
  %146 = fsub float %143, %145
  %147 = load float, ptr %23, align 4, !tbaa !9
  %148 = fmul float %146, %147
  store float %148, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.vox::Point", ptr %149, i32 0, i32 1
  %151 = load float, ptr %150, align 4, !tbaa !13
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = load float, ptr %152, align 4, !tbaa !9
  %154 = fsub float %151, %153
  %155 = load float, ptr %23, align 4, !tbaa !9
  %156 = fmul float %154, %155
  store float %156, ptr %25, align 4, !tbaa !9
  %157 = load float, ptr %24, align 4, !tbaa !9
  %158 = load float, ptr %25, align 4, !tbaa !9
  %159 = fcmp ogt float %157, %158
  br i1 %159, label %160, label %164

160:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %161 = load float, ptr %24, align 4, !tbaa !9
  store float %161, ptr %26, align 4, !tbaa !9
  %162 = load float, ptr %25, align 4, !tbaa !9
  store float %162, ptr %24, align 4, !tbaa !9
  %163 = load float, ptr %26, align 4, !tbaa !9
  store float %163, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %164

164:                                              ; preds = %160, %135
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %166 = load float, ptr %165, align 4, !tbaa !9
  store float %166, ptr %16, align 4, !tbaa !9
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %168 = load float, ptr %167, align 4, !tbaa !9
  store float %168, ptr %17, align 4, !tbaa !9
  %169 = load float, ptr %16, align 4, !tbaa !9
  %170 = load float, ptr %17, align 4, !tbaa !9
  %171 = fcmp ogt float %169, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %164
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %174

173:                                              ; preds = %164
  store i32 0, ptr %18, align 4
  br label %174

174:                                              ; preds = %173, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  %175 = load i32, ptr %18, align 4
  switch i32 %175, label %242 [
    i32 0, label %176
  ]

176:                                              ; preds = %174
  br label %177

177:                                              ; preds = %176, %134
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = load float, ptr %178, align 4, !tbaa !9
  %180 = call noundef float @_ZSt3absf(float noundef %179)
  %181 = fcmp olt float %180, 0x3E80000000000000
  br i1 %181, label %182, label %198

182:                                              ; preds = %177
  %183 = load ptr, ptr %15, align 8, !tbaa !5
  %184 = load float, ptr %183, align 4, !tbaa !9
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = getelementptr inbounds %"class.vox::Point", ptr %185, i32 0, i32 2
  %187 = load float, ptr %186, align 4, !tbaa !14
  %188 = fcmp olt float %184, %187
  br i1 %188, label %196, label %189

189:                                              ; preds = %182
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  %191 = load float, ptr %190, align 4, !tbaa !9
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = getelementptr inbounds %"class.vox::Point", ptr %192, i32 0, i32 2
  %194 = load float, ptr %193, align 4, !tbaa !14
  %195 = fcmp ogt float %191, %194
  br i1 %195, label %196, label %197

196:                                              ; preds = %189, %182
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %242

197:                                              ; preds = %189
  br label %240

198:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %199 = load ptr, ptr %12, align 8, !tbaa !5
  %200 = load float, ptr %199, align 4, !tbaa !9
  %201 = fpext float %200 to double
  %202 = fdiv double 1.000000e+00, %201
  %203 = fptrunc double %202 to float
  store float %203, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %"class.vox::Point", ptr %204, i32 0, i32 2
  %206 = load float, ptr %205, align 4, !tbaa !14
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  %208 = load float, ptr %207, align 4, !tbaa !9
  %209 = fsub float %206, %208
  %210 = load float, ptr %27, align 4, !tbaa !9
  %211 = fmul float %209, %210
  store float %211, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = getelementptr inbounds %"class.vox::Point", ptr %212, i32 0, i32 2
  %214 = load float, ptr %213, align 4, !tbaa !14
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  %216 = load float, ptr %215, align 4, !tbaa !9
  %217 = fsub float %214, %216
  %218 = load float, ptr %27, align 4, !tbaa !9
  %219 = fmul float %217, %218
  store float %219, ptr %29, align 4, !tbaa !9
  %220 = load float, ptr %28, align 4, !tbaa !9
  %221 = load float, ptr %29, align 4, !tbaa !9
  %222 = fcmp ogt float %220, %221
  br i1 %222, label %223, label %227

223:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %224 = load float, ptr %28, align 4, !tbaa !9
  store float %224, ptr %30, align 4, !tbaa !9
  %225 = load float, ptr %29, align 4, !tbaa !9
  store float %225, ptr %28, align 4, !tbaa !9
  %226 = load float, ptr %30, align 4, !tbaa !9
  store float %226, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %227

227:                                              ; preds = %223, %198
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %229 = load float, ptr %228, align 4, !tbaa !9
  store float %229, ptr %16, align 4, !tbaa !9
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %231 = load float, ptr %230, align 4, !tbaa !9
  store float %231, ptr %17, align 4, !tbaa !9
  %232 = load float, ptr %16, align 4, !tbaa !9
  %233 = load float, ptr %17, align 4, !tbaa !9
  %234 = fcmp ogt float %232, %233
  br i1 %234, label %235, label %236

235:                                              ; preds = %227
  store float -1.000000e+00, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %237

236:                                              ; preds = %227
  store i32 0, ptr %18, align 4
  br label %237

237:                                              ; preds = %236, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  %238 = load i32, ptr %18, align 4
  switch i32 %238, label %242 [
    i32 0, label %239
  ]

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239, %197
  %241 = load float, ptr %16, align 4, !tbaa !9
  store float %241, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %242

242:                                              ; preds = %240, %237, %196, %174, %133, %111, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %243 = load float, ptr %3, align 4
  ret float %243
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3maxEv() #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN3vox5PointIfLm3EEE", !10, i64 0, !10, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}


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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef float @_ZN3vox19intersectsRayAndBoxERKNS_3RayIfLm3EEERKNS_11BoundingBoxIfLm3EEE(ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %1) local_unnamed_addr #2 {
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  %12 = getelementptr inbounds i8, ptr %1, i64 12
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store float 0.000000e+00, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %17 = tail call noundef float @_ZNSt14numeric_limitsIfE3maxEv() #3
  store float %17, ptr %4, align 4, !tbaa !5
  %18 = load float, ptr %11, align 4, !tbaa !5
  %19 = tail call noundef float @_ZSt3absf(float noundef %18)
  %20 = fcmp olt float %19, 0x3E80000000000000
  br i1 %20, label %21, label %27

21:                                               ; preds = %2
  %22 = load float, ptr %0, align 4, !tbaa !5
  %23 = load float, ptr %1, align 4, !tbaa !9
  %24 = fcmp olt float %22, %23
  %25 = load float, ptr %12, align 4
  %26 = fcmp ogt float %22, %25
  %or.cond = select i1 %24, i1 true, i1 %26
  br i1 %or.cond, label %113, label %46

27:                                               ; preds = %2
  %28 = load float, ptr %11, align 4, !tbaa !5
  %29 = fdiv float 1.000000e+00, %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %30 = load float, ptr %1, align 4, !tbaa !9
  %31 = load float, ptr %0, align 4, !tbaa !5
  %32 = fsub float %30, %31
  %33 = fmul float %29, %32
  store float %33, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %34 = load float, ptr %12, align 4, !tbaa !9
  %35 = fsub float %34, %31
  %36 = fmul float %29, %35
  store float %36, ptr %6, align 4, !tbaa !5
  %37 = fcmp ogt float %33, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %27
  store float %36, ptr %5, align 4, !tbaa !5
  store float %33, ptr %6, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %38, %27
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %41 = load float, ptr %40, align 4, !tbaa !5
  store float %41, ptr %3, align 4, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = load float, ptr %42, align 4, !tbaa !5
  store float %43, ptr %4, align 4, !tbaa !5
  %44 = load float, ptr %3, align 4, !tbaa !5
  %45 = fcmp ule float %44, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br i1 %45, label %46, label %113

46:                                               ; preds = %21, %39
  %47 = load float, ptr %13, align 4, !tbaa !5
  %48 = call noundef float @_ZSt3absf(float noundef %47)
  %49 = fcmp olt float %48, 0x3E80000000000000
  br i1 %49, label %50, label %58

50:                                               ; preds = %46
  %51 = load float, ptr %15, align 4, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %1, i64 4
  %53 = load float, ptr %52, align 4, !tbaa !11
  %54 = fcmp olt float %51, %53
  %55 = getelementptr inbounds i8, ptr %1, i64 16
  %56 = load float, ptr %55, align 4
  %57 = fcmp ogt float %51, %56
  %or.cond68 = select i1 %54, i1 true, i1 %57
  br i1 %or.cond68, label %113, label %79

58:                                               ; preds = %46
  %59 = load float, ptr %13, align 4, !tbaa !5
  %60 = fdiv float 1.000000e+00, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %61 = getelementptr inbounds i8, ptr %1, i64 4
  %62 = load float, ptr %61, align 4, !tbaa !11
  %63 = load float, ptr %15, align 4, !tbaa !5
  %64 = fsub float %62, %63
  %65 = fmul float %60, %64
  store float %65, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %66 = getelementptr inbounds i8, ptr %1, i64 16
  %67 = load float, ptr %66, align 4, !tbaa !11
  %68 = fsub float %67, %63
  %69 = fmul float %60, %68
  store float %69, ptr %8, align 4, !tbaa !5
  %70 = fcmp ogt float %65, %69
  br i1 %70, label %71, label %72

71:                                               ; preds = %58
  store float %69, ptr %7, align 4, !tbaa !5
  store float %65, ptr %8, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %71, %58
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %74 = load float, ptr %73, align 4, !tbaa !5
  store float %74, ptr %3, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %76 = load float, ptr %75, align 4, !tbaa !5
  store float %76, ptr %4, align 4, !tbaa !5
  %77 = load float, ptr %3, align 4, !tbaa !5
  %78 = fcmp ule float %77, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br i1 %78, label %79, label %113

79:                                               ; preds = %50, %72
  %80 = load float, ptr %14, align 4, !tbaa !5
  %81 = call noundef float @_ZSt3absf(float noundef %80)
  %82 = fcmp olt float %81, 0x3E80000000000000
  br i1 %82, label %83, label %91

83:                                               ; preds = %79
  %84 = load float, ptr %16, align 4, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %1, i64 8
  %86 = load float, ptr %85, align 4, !tbaa !12
  %87 = fcmp olt float %84, %86
  %88 = getelementptr inbounds i8, ptr %1, i64 20
  %89 = load float, ptr %88, align 4
  %90 = fcmp ogt float %84, %89
  %or.cond71 = select i1 %87, i1 true, i1 %90
  br i1 %or.cond71, label %113, label %._crit_edge

._crit_edge:                                      ; preds = %83
  %.pre = load float, ptr %3, align 4, !tbaa !5
  br label %113

91:                                               ; preds = %79
  %92 = load float, ptr %14, align 4, !tbaa !5
  %93 = fdiv float 1.000000e+00, %92
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %94 = getelementptr inbounds i8, ptr %1, i64 8
  %95 = load float, ptr %94, align 4, !tbaa !12
  %96 = load float, ptr %16, align 4, !tbaa !5
  %97 = fsub float %95, %96
  %98 = fmul float %93, %97
  store float %98, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  %99 = getelementptr inbounds i8, ptr %1, i64 20
  %100 = load float, ptr %99, align 4, !tbaa !12
  %101 = fsub float %100, %96
  %102 = fmul float %93, %101
  store float %102, ptr %10, align 4, !tbaa !5
  %103 = fcmp ogt float %98, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %91
  store float %102, ptr %9, align 4, !tbaa !5
  store float %98, ptr %10, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %104, %91
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %107 = load float, ptr %106, align 4, !tbaa !5
  store float %107, ptr %3, align 4, !tbaa !5
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %109 = load float, ptr %108, align 4, !tbaa !5
  %110 = load float, ptr %3, align 4, !tbaa !5
  %111 = fcmp ule float %110, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  br i1 %111, label %112, label %113

112:                                              ; preds = %105
  br label %113

113:                                              ; preds = %._crit_edge, %83, %50, %21, %105, %72, %39, %112
  %.5 = phi float [ -1.000000e+00, %105 ], [ -1.000000e+00, %72 ], [ -1.000000e+00, %39 ], [ -1.000000e+00, %21 ], [ -1.000000e+00, %50 ], [ -1.000000e+00, %83 ], [ %.pre, %._crit_edge ], [ %110, %112 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret float %.5
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3maxEv() local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN3vox5PointIfLm3EEE", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}


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