; LLVM IR from Xingyu-Lin/softgym :: PyFlex/core/voxelize.ll (Z8VoxelizePK8XVector3IfEiPKiijjjPjS0_S0_)

; 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.XVector3 = type { float, float, float }
%class.AABBTree = type <{ i32, [4 x i8], ptr, i32, [4 x i8], ptr, i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl" }
%"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl" = type { %"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8VoxelizePK8XVector3IfEiPKiijjjPjS0_S0_(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7, <2 x float> %8, float %9, <2 x float> %10, float %11) #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca %class.XVector3, align 4
  %14 = alloca { <2 x float>, float }, align 4
  %15 = alloca %class.XVector3, align 4
  %16 = alloca { <2 x float>, float }, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca %class.AABBTree, align 8
  %26 = alloca %class.XVector3, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca { <2 x float>, float }, align 8
  %30 = alloca %class.XVector3, align 4
  %31 = alloca %class.XVector3, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i8, align 1
  %37 = alloca %class.XVector3, align 4
  %38 = alloca %class.XVector3, align 4
  %39 = alloca %class.XVector3, align 4
  %40 = alloca { <2 x float>, float }, align 8
  %41 = alloca i32, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  %44 = alloca float, align 4
  %45 = alloca float, align 4
  %46 = alloca float, align 4
  %47 = alloca i32, align 4
  %48 = alloca float, align 4
  %49 = alloca float, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca %class.XVector3, align 4
  %56 = alloca { <2 x float>, float }, align 8
  %57 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 0
  store <2 x float> %8, ptr %57, align 4
  %58 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 1
  store float %9, ptr %58, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %14, i64 12, i1 false)
  %59 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 0
  store <2 x float> %10, ptr %59, align 4
  %60 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 1
  store float %11, ptr %60, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %16, i64 12, i1 false)
  store ptr %0, ptr %17, align 8, !tbaa !5
  store i32 %1, ptr %18, align 4, !tbaa !9
  store ptr %2, ptr %19, align 8, !tbaa !5
  store i32 %3, ptr %20, align 4, !tbaa !9
  store i32 %4, ptr %21, align 4, !tbaa !9
  store i32 %5, ptr %22, align 4, !tbaa !9
  store i32 %6, ptr %23, align 4, !tbaa !9
  store ptr %7, ptr %24, align 8, !tbaa !5
  %61 = load ptr, ptr %24, align 8, !tbaa !5
  %62 = load i32, ptr %21, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = mul i64 4, %63
  %65 = load i32, ptr %22, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = mul i64 %64, %66
  %68 = load i32, ptr %23, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = mul i64 %67, %69
  call void @llvm.memset.p0.i64(ptr align 4 %61, i8 0, i64 %70, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr %25) #8
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = load i32, ptr %18, align 4, !tbaa !9
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = load i32, ptr %20, align 4, !tbaa !9
  %75 = sdiv i32 %74, 3
  call void @_ZN8AABBTreeC1EPK8XVector3IfEjPKjj(ptr noundef nonnull align 8 dereferenceable(124) %25, ptr noundef %71, i32 noundef %72, ptr noundef %73, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #8
  %76 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %77 unwind label %112

77:                                               ; preds = %12
  store { <2 x float>, float } %76, ptr %29, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 8 %29, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #8
  %78 = getelementptr inbounds %class.XVector3, ptr %26, i32 0, i32 0
  %79 = load float, ptr %78, align 4, !tbaa !11
  %80 = load i32, ptr %21, align 4, !tbaa !9
  %81 = uitofp i32 %80 to float
  %82 = fdiv float %79, %81
  %83 = getelementptr inbounds %class.XVector3, ptr %26, i32 0, i32 1
  %84 = load float, ptr %83, align 4, !tbaa !14
  %85 = load i32, ptr %22, align 4, !tbaa !9
  %86 = uitofp i32 %85 to float
  %87 = fdiv float %84, %86
  %88 = getelementptr inbounds %class.XVector3, ptr %26, i32 0, i32 2
  %89 = load float, ptr %88, align 4, !tbaa !15
  %90 = load i32, ptr %23, align 4, !tbaa !9
  %91 = uitofp i32 %90 to float
  %92 = fdiv float %89, %91
  invoke void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %30, float noundef %82, float noundef %87, float noundef %92)
          to label %93 unwind label %116

93:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #8
  %94 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 0
  %95 = load float, ptr %94, align 4, !tbaa !11
  %96 = fmul float 5.000000e-01, %95
  %97 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 1
  %98 = load float, ptr %97, align 4, !tbaa !14
  %99 = fmul float 5.000000e-01, %98
  %100 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 2
  %101 = load float, ptr %100, align 4, !tbaa !15
  %102 = fmul float 5.000000e-01, %101
  invoke void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %31, float noundef %96, float noundef %99, float noundef %102)
          to label %103 unwind label %120

103:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %104 = getelementptr inbounds %class.XVector3, ptr %26, i32 0, i32 2
  %105 = load float, ptr %104, align 4, !tbaa !15
  %106 = fmul float 0x3EE4F8B580000000, %105
  store float %106, ptr %32, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %272, %103
  %108 = load i32, ptr %33, align 4, !tbaa !9
  %109 = load i32, ptr %21, align 4, !tbaa !9
  %110 = icmp ult i32 %108, %109
  br i1 %110, label %124, label %111

111:                                              ; preds = %107
  store i32 2, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %275

112:                                              ; preds = %12
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %27, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %28, align 4
  br label %278

116:                                              ; preds = %77
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %27, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %28, align 4
  br label %277

120:                                              ; preds = %93
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %27, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %28, align 4
  br label %276

124:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %266, %124
  %126 = load i32, ptr %35, align 4, !tbaa !9
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = icmp ult i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 5, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %271

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #8
  store i8 0, ptr %36, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #8
  invoke void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %37, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %131 unwind label %195

131:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 12, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #8
  %132 = load i32, ptr %33, align 4, !tbaa !9
  %133 = uitofp i32 %132 to float
  %134 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !11
  %136 = getelementptr inbounds %class.XVector3, ptr %31, i32 0, i32 0
  %137 = load float, ptr %136, align 4, !tbaa !11
  %138 = call float @llvm.fmuladd.f32(float %133, float %135, float %137)
  %139 = load i32, ptr %35, align 4, !tbaa !9
  %140 = uitofp i32 %139 to float
  %141 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !14
  %143 = getelementptr inbounds %class.XVector3, ptr %31, i32 0, i32 1
  %144 = load float, ptr %143, align 4, !tbaa !14
  %145 = call float @llvm.fmuladd.f32(float %140, float %142, float %144)
  invoke void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %39, float noundef %138, float noundef %145, float noundef 0.000000e+00)
          to label %146 unwind label %199

146:                                              ; preds = %131
  %147 = invoke { <2 x float>, float } @_ZNK8XVector3IfEplERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %148 unwind label %199

148:                                              ; preds = %146
  store { <2 x float>, float } %147, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  store i32 -1, ptr %41, align 4, !tbaa !9
  br label %149

149:                                              ; preds = %263, %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  %150 = invoke noundef zeroext i1 @_ZNK8AABBTree8TraceRayERK8XVector3IfES3_RfS4_S4_S4_S4_Rj(ptr noundef nonnull align 8 dereferenceable(124) %25, ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %43, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %45, ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %47)
          to label %151 unwind label %203

151:                                              ; preds = %149
  br i1 %150, label %152, label %259

152:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %153 = getelementptr inbounds %class.XVector3, ptr %38, i32 0, i32 2
  %154 = load float, ptr %153, align 4, !tbaa !15
  %155 = load float, ptr %42, align 4, !tbaa !16
  %156 = getelementptr inbounds %class.XVector3, ptr %37, i32 0, i32 2
  %157 = load float, ptr %156, align 4, !tbaa !15
  %158 = call float @llvm.fmuladd.f32(float %155, float %157, float %154)
  store float %158, ptr %48, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %159 = load float, ptr %48, align 4, !tbaa !16
  %160 = getelementptr inbounds %class.XVector3, ptr %13, i32 0, i32 2
  %161 = load float, ptr %160, align 4, !tbaa !15
  %162 = fsub float %159, %161
  %163 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 2
  %164 = load float, ptr %163, align 4, !tbaa !15
  %165 = fdiv float %162, %164
  store float %165, ptr %49, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  %166 = getelementptr inbounds %class.XVector3, ptr %38, i32 0, i32 2
  %167 = load float, ptr %166, align 4, !tbaa !15
  %168 = getelementptr inbounds %class.XVector3, ptr %13, i32 0, i32 2
  %169 = load float, ptr %168, align 4, !tbaa !15
  %170 = fsub float %167, %169
  %171 = getelementptr inbounds %class.XVector3, ptr %30, i32 0, i32 2
  %172 = load float, ptr %171, align 4, !tbaa !15
  %173 = fdiv float %170, %172
  %174 = fadd float %173, 5.000000e-01
  %175 = call float @llvm.floor.f32(float %174)
  %176 = fptoui float %175 to i32
  store i32 %176, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #8
  %177 = load float, ptr %49, align 4, !tbaa !16
  %178 = fadd float %177, 5.000000e-01
  %179 = call float @llvm.floor.f32(float %178)
  %180 = fptoui float %179 to i32
  store i32 %180, ptr %52, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #8
  %181 = load i32, ptr %23, align 4, !tbaa !9
  %182 = sub i32 %181, 1
  store i32 %182, ptr %53, align 4, !tbaa !9
  %183 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %53)
          to label %184 unwind label %207

184:                                              ; preds = %152
  %185 = load i32, ptr %183, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #8
  store i32 %185, ptr %51, align 4, !tbaa !9
  %186 = load i8, ptr %36, align 1, !tbaa !17, !range !19, !noundef !20
  %187 = trunc i8 %186 to i1
  br i1 %187, label %188, label %230

188:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  %189 = load i32, ptr %50, align 4, !tbaa !9
  store i32 %189, ptr %54, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %226, %188
  %191 = load i32, ptr %54, align 4, !tbaa !9
  %192 = load i32, ptr %51, align 4, !tbaa !9
  %193 = icmp ult i32 %191, %192
  br i1 %193, label %211, label %194

194:                                              ; preds = %190
  store i32 10, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  br label %229

195:                                              ; preds = %130
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %27, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %28, align 4
  br label %270

199:                                              ; preds = %146, %131
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %27, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #8
  br label %269

203:                                              ; preds = %149
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %27, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %28, align 4
  br label %264

207:                                              ; preds = %152
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %27, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #8
  br label %258

211:                                              ; preds = %190
  %212 = load ptr, ptr %24, align 8, !tbaa !5
  %213 = load i32, ptr %54, align 4, !tbaa !9
  %214 = load i32, ptr %21, align 4, !tbaa !9
  %215 = mul i32 %213, %214
  %216 = load i32, ptr %22, align 4, !tbaa !9
  %217 = mul i32 %215, %216
  %218 = load i32, ptr %35, align 4, !tbaa !9
  %219 = load i32, ptr %21, align 4, !tbaa !9
  %220 = mul i32 %218, %219
  %221 = add i32 %217, %220
  %222 = load i32, ptr %33, align 4, !tbaa !9
  %223 = add i32 %221, %222
  %224 = zext i32 %223 to i64
  %225 = getelementptr inbounds i32, ptr %212, i64 %224
  store i32 -1, ptr %225, align 4, !tbaa !9
  br label %226

226:                                              ; preds = %211
  %227 = load i32, ptr %54, align 4, !tbaa !9
  %228 = add i32 %227, 1
  store i32 %228, ptr %54, align 4, !tbaa !9
  br label %190, !llvm.loop !21

229:                                              ; preds = %194
  br label %230

230:                                              ; preds = %229, %184
  %231 = load i8, ptr %36, align 1, !tbaa !17, !range !19, !noundef !20
  %232 = trunc i8 %231 to i1
  %233 = xor i1 %232, true
  %234 = zext i1 %233 to i8
  store i8 %234, ptr %36, align 1, !tbaa !17
  %235 = load i32, ptr %47, align 4, !tbaa !9
  %236 = load i32, ptr %41, align 4, !tbaa !9
  %237 = icmp eq i32 %235, %236
  br i1 %237, label %238, label %245

238:                                              ; preds = %230
  %239 = invoke i32 (ptr, ...) @printf(ptr noundef @.str)
          to label %240 unwind label %241

240:                                              ; preds = %238
  br label %245

241:                                              ; preds = %238
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %27, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %28, align 4
  br label %258

245:                                              ; preds = %240, %230
  %246 = load i32, ptr %47, align 4, !tbaa !9
  store i32 %246, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #8
  %247 = load float, ptr %42, align 4, !tbaa !16
  %248 = load float, ptr %32, align 4, !tbaa !16
  %249 = fadd float %247, %248
  %250 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmlEf(ptr noundef nonnull align 4 dereferenceable(12) %37, float noundef %249)
          to label %251 unwind label %254

251:                                              ; preds = %245
  store { <2 x float>, float } %250, ptr %56, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 8 %56, i64 12, i1 false)
  %252 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %55)
          to label %253 unwind label %254

253:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %260

254:                                              ; preds = %251, %245
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %27, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #8
  br label %258

258:                                              ; preds = %254, %241, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %264

259:                                              ; preds = %151
  store i32 8, ptr %34, align 4
  br label %261

260:                                              ; preds = %253
  store i32 0, ptr %34, align 4
  br label %261

261:                                              ; preds = %260, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  %262 = load i32, ptr %34, align 4
  switch i32 %262, label %284 [
    i32 0, label %263
    i32 8, label %265
  ]

263:                                              ; preds = %261
  br label %149, !llvm.loop !23

264:                                              ; preds = %258, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %269

265:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #8
  br label %266

266:                                              ; preds = %265
  %267 = load i32, ptr %35, align 4, !tbaa !9
  %268 = add i32 %267, 1
  store i32 %268, ptr %35, align 4, !tbaa !9
  br label %125, !llvm.loop !24

269:                                              ; preds = %264, %199
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #8
  br label %270

270:                                              ; preds = %269, %195
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %276

271:                                              ; preds = %129
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %33, align 4, !tbaa !9
  %274 = add i32 %273, 1
  store i32 %274, ptr %33, align 4, !tbaa !9
  br label %107, !llvm.loop !25

275:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  call void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124) %25) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %25) #8
  ret void

276:                                              ; preds = %270, %120
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  br label %277

277:                                              ; preds = %276, %116
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #8
  br label %278

278:                                              ; preds = %277, %112
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  call void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124) %25) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %25) #8
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %27, align 8
  %281 = load i32, ptr %28, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283

284:                                              ; preds = %261
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

declare void @_ZN8AABBTreeC1EPK8XVector3IfEjPKjj(ptr noundef nonnull align 8 dereferenceable(124), ptr noundef, i32 noundef, ptr noundef, i32 noundef) unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEplERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

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

declare noundef zeroext i1 @_ZNK8AABBTree8TraceRayERK8XVector3IfES3_RfS4_S4_S4_S4_Rj(ptr noundef nonnull align 8 dereferenceable(124), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #7

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

declare i32 @printf(ptr noundef, ...) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124)) unnamed_addr #6 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 = { 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS8XVector3IfE", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !13, i64 8}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !22}


; 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.XVector3 = type { float, float, float }
%class.AABBTree = type <{ i32, [4 x i8], ptr, i32, [4 x i8], ptr, i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", i32, i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AABBTree::Node, std::allocator<AABBTree::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl" }
%"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl" = type { %"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AABBTree::Bounds, std::allocator<AABBTree::Bounds>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8VoxelizePK8XVector3IfEiPKiijjjPjS0_S0_(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, ptr nocapture noundef writeonly %7, <2 x float> %8, float %9, <2 x float> %10, float %11) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca %class.XVector3, align 8
  %14 = alloca %class.XVector3, align 8
  %15 = alloca %class.AABBTree, align 8
  %16 = alloca %class.XVector3, align 4
  %17 = alloca %class.XVector3, align 4
  %18 = alloca %class.XVector3, align 4
  %19 = alloca %class.XVector3, align 8
  %20 = alloca %class.XVector3, 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 i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %class.XVector3, align 8
  store <2 x float> %8, ptr %13, align 8
  %.sroa.252.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store float %9, ptr %.sroa.252.0..sroa_idx, align 8
  store <2 x float> %10, ptr %14, align 8
  %.sroa.250.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  store float %11, ptr %.sroa.250.0..sroa_idx, align 8
  %30 = zext i32 %4 to i64
  %31 = shl nuw nsw i64 %30, 2
  %32 = zext i32 %5 to i64
  %33 = mul i64 %31, %32
  %34 = zext i32 %6 to i64
  %35 = mul i64 %33, %34
  tail call void @llvm.memset.p0.i64(ptr align 4 %7, i8 0, i64 %35, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %15) #8
  %36 = sdiv i32 %3, 3
  call void @_ZN8AABBTreeC1EPK8XVector3IfEjPKjj(ptr noundef nonnull align 8 dereferenceable(124) %15, ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %36)
  %37 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %38 unwind label %129

38:                                               ; preds = %12
  %.fca.0.extract23 = extractvalue { <2 x float>, float } %37, 0
  %.fca.1.extract24 = extractvalue { <2 x float>, float } %37, 1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #8
  %.sroa.029.0.vec.extract = extractelement <2 x float> %.fca.0.extract23, i64 0
  %39 = uitofp i32 %4 to float
  %40 = fdiv float %.sroa.029.0.vec.extract, %39
  %.sroa.029.4.vec.extract = extractelement <2 x float> %.fca.0.extract23, i64 1
  %41 = uitofp i32 %5 to float
  %42 = fdiv float %.sroa.029.4.vec.extract, %41
  %43 = uitofp i32 %6 to float
  %44 = fdiv float %.fca.1.extract24, %43
  call void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef %40, float noundef %42, float noundef %44)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #8
  %45 = load float, ptr %16, align 4, !tbaa !5
  %46 = fmul float %45, 5.000000e-01
  %47 = getelementptr inbounds i8, ptr %16, i64 4
  %48 = load float, ptr %47, align 4, !tbaa !10
  %49 = fmul float %48, 5.000000e-01
  %50 = getelementptr inbounds i8, ptr %16, i64 8
  %51 = load float, ptr %50, align 4, !tbaa !11
  %52 = fmul float %51, 5.000000e-01
  call void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %17, float noundef %46, float noundef %49, float noundef %52)
  %53 = fmul float %.fca.1.extract24, 0x3EE4F8B580000000
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge77, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %38
  %.not84 = icmp eq i32 %5, 0
  %54 = getelementptr inbounds i8, ptr %17, i64 4
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %55 = getelementptr inbounds i8, ptr %18, i64 8
  %56 = add i32 %6, -1
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %29, i64 8
  br i1 %.not84, label %._crit_edge77, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us
  %.05776.us = phi i32 [ %125, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  %57 = uitofp i32 %.05776.us to float
  br label %58

58:                                               ; preds = %.preheader.us, %71
  %.05974.us = phi i32 [ 0, %.preheader.us ], [ %72, %71 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #8
  call void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #8
  %59 = load float, ptr %16, align 4, !tbaa !5
  %60 = load float, ptr %17, align 4, !tbaa !5
  %61 = call float @llvm.fmuladd.f32(float %57, float %59, float %60)
  %62 = uitofp i32 %.05974.us to float
  %63 = load float, ptr %47, align 4, !tbaa !10
  %64 = load float, ptr %54, align 4, !tbaa !10
  %65 = call float @llvm.fmuladd.f32(float %62, float %63, float %64)
  call void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef %61, float noundef %65, float noundef 0.000000e+00)
  %66 = invoke { <2 x float>, float } @_ZNK8XVector3IfEplERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %67 unwind label %.split.us

67:                                               ; preds = %58
  %.fca.0.extract7.us = extractvalue { <2 x float>, float } %66, 0
  %.fca.1.extract8.us = extractvalue { <2 x float>, float } %66, 1
  store <2 x float> %.fca.0.extract7.us, ptr %19, align 8
  store float %.fca.1.extract8.us, ptr %.sroa.210.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #8
  br label %68

68:                                               ; preds = %112, %67
  %.062.us = phi i32 [ -1, %67 ], [ %108, %112 ]
  %.060.us = phi i1 [ false, %67 ], [ %102, %112 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #8
  %69 = invoke noundef zeroext i1 @_ZNK8AABBTree8TraceRayERK8XVector3IfES3_RfS4_S4_S4_S4_Rj(ptr noundef nonnull align 8 dereferenceable(124) %15, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %70 unwind label %.split79.us

70:                                               ; preds = %68
  br i1 %69, label %73, label %71

71:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #8
  %72 = add nuw i32 %.05974.us, 1
  %exitcond87.not = icmp eq i32 %72, %5
  br i1 %exitcond87.not, label %._crit_edge.us, label %58, !llvm.loop !12

73:                                               ; preds = %70
  %74 = load float, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !11
  %75 = load float, ptr %21, align 4, !tbaa !14
  %76 = load float, ptr %55, align 4, !tbaa !11
  %77 = call float @llvm.fmuladd.f32(float %75, float %76, float %74)
  %78 = load float, ptr %.sroa.252.0..sroa_idx, align 8, !tbaa !11
  %79 = fsub float %77, %78
  %80 = load float, ptr %50, align 4, !tbaa !11
  %81 = fdiv float %79, %80
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #8
  %82 = fadd float %81, 5.000000e-01
  %83 = call float @llvm.floor.f32(float %82)
  %84 = fptoui float %83 to i32
  store i32 %84, ptr %27, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #8
  store i32 %56, ptr %28, align 4, !tbaa !15
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %86 = load i32, ptr %85, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #8
  br i1 %.060.us, label %87, label %.loopexit.us

87:                                               ; preds = %73
  %88 = fsub float %74, %78
  %89 = fdiv float %88, %80
  %90 = fadd float %89, 5.000000e-01
  %91 = call float @llvm.floor.f32(float %90)
  %92 = fptoui float %91 to i32
  %93 = icmp ugt i32 %86, %92
  br i1 %93, label %.lr.ph.us.preheader, label %.loopexit.us

.lr.ph.us.preheader:                              ; preds = %87
  %94 = zext i32 %92 to i64
  %wide.trip.count = zext i32 %86 to i64
  %95 = sub nsw i64 %wide.trip.count, %94
  %xtraiter = and i64 %95, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.us.prol.loopexit, label %.lr.ph.us.prol

.lr.ph.us.prol:                                   ; preds = %.lr.ph.us.preheader
  %96 = mul i32 %92, %5
  %reass.add.us.prol = add i32 %96, %.05974.us
  %reass.mul.us.prol = mul i32 %reass.add.us.prol, %4
  %97 = add i32 %reass.mul.us.prol, %.05776.us
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %7, i64 %98
  store i32 -1, ptr %99, align 4, !tbaa !15
  %indvars.iv.next.prol = add nuw nsw i64 %94, 1
  br label %.lr.ph.us.prol.loopexit

.lr.ph.us.prol.loopexit:                          ; preds = %.lr.ph.us.prol, %.lr.ph.us.preheader
  %indvars.iv.unr = phi i64 [ %94, %.lr.ph.us.preheader ], [ %indvars.iv.next.prol, %.lr.ph.us.prol ]
  %100 = add nsw i64 %wide.trip.count, -1
  %101 = icmp eq i64 %100, %94
  br i1 %101, label %.loopexit.us, label %.lr.ph.us

.loopexit.us:                                     ; preds = %.lr.ph.us.prol.loopexit, %.lr.ph.us, %87, %73
  %102 = xor i1 %.060.us, true
  %103 = load i32, ptr %26, align 4, !tbaa !15
  %104 = icmp eq i32 %103, %.062.us
  br i1 %104, label %105, label %107

105:                                              ; preds = %.loopexit.us
  %106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %.pre = load i32, ptr %26, align 4, !tbaa !15
  br label %107

107:                                              ; preds = %105, %.loopexit.us
  %108 = phi i32 [ %.pre, %105 ], [ %103, %.loopexit.us ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #8
  %109 = load float, ptr %21, align 4, !tbaa !14
  %110 = fadd float %53, %109
  %111 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmlEf(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef %110)
          to label %112 unwind label %.split82.us

112:                                              ; preds = %107
  %.fca.0.extract.us = extractvalue { <2 x float>, float } %111, 0
  %.fca.1.extract.us = extractvalue { <2 x float>, float } %111, 1
  store <2 x float> %.fca.0.extract.us, ptr %29, align 8
  store float %.fca.1.extract.us, ptr %.sroa.2.0..sroa_idx, align 8
  %113 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #8
  br label %68

.lr.ph.us:                                        ; preds = %.lr.ph.us.prol.loopexit, %.lr.ph.us
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph.us ], [ %indvars.iv.unr, %.lr.ph.us.prol.loopexit ]
  %114 = trunc nuw i64 %indvars.iv to i32
  %115 = mul i32 %114, %5
  %reass.add.us = add i32 %115, %.05974.us
  %reass.mul.us = mul i32 %reass.add.us, %4
  %116 = add i32 %reass.mul.us, %.05776.us
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %7, i64 %117
  store i32 -1, ptr %118, align 4, !tbaa !15
  %119 = trunc i64 %indvars.iv to i32
  %120 = add i32 %119, 1
  %121 = mul i32 %120, %5
  %reass.add.us.1 = add i32 %121, %.05974.us
  %reass.mul.us.1 = mul i32 %reass.add.us.1, %4
  %122 = add i32 %reass.mul.us.1, %.05776.us
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %7, i64 %123
  store i32 -1, ptr %124, align 4, !tbaa !15
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit.us, label %.lr.ph.us, !llvm.loop !17

._crit_edge.us:                                   ; preds = %71
  %125 = add nuw i32 %.05776.us, 1
  %exitcond88.not = icmp eq i32 %125, %4
  br i1 %exitcond88.not, label %._crit_edge77, label %.preheader.us, !llvm.loop !18

.split.us:                                        ; preds = %58
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #8
  br label %132

.split79.us:                                      ; preds = %68
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %131

.split82.us:                                      ; preds = %107
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #8
  br label %131

._crit_edge77:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %38
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #8
  call void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124) %15) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %15) #8
  ret void

129:                                              ; preds = %12
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %.split82.us, %.split79.us
  %.pn = phi { ptr, i32 } [ %128, %.split82.us ], [ %127, %.split79.us ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #8
  br label %132

132:                                              ; preds = %131, %.split.us
  %.pn.pn = phi { ptr, i32 } [ %.pn, %131 ], [ %126, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #8
  br label %133

133:                                              ; preds = %132, %129
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %132 ], [ %130, %129 ]
  call void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124) %15) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %15) #8
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

declare void @_ZN8AABBTreeC1EPK8XVector3IfEjPKjj(ptr noundef nonnull align 8 dereferenceable(124), ptr noundef, i32 noundef, ptr noundef, i32 noundef) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8XVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEplERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

declare noundef zeroext i1 @_ZNK8AABBTree8TraceRayERK8XVector3IfES3_RfS4_S4_S4_S4_Rj(ptr noundef nonnull align 8 dereferenceable(124), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #6

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8AABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(124)) unnamed_addr #5 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nofree nounwind "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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS8XVector3IfE", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass