; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (raycast)

; 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.Vector3 = type { [3 x float] }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::raycastResult_t" = type { i8, i32, [2 x %class.Vector3], [2 x float] }
%"struct.geometry::types::transform_t" = type { %class.Matrix33, %class.Matrix33, %class.Vector3 }
%"struct.geometry::types::shapeCube_t" = type { float, float, float }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix33coEv(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix33mlERKS_(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36)) #1 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 void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40)) unnamed_addr #3 align 2

declare void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_tERKNS3_11shapeCube_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(84) %3, ptr noundef nonnull align 4 dereferenceable(12) %4) #1 {
  %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 %class.Vector3, align 4
  %12 = alloca %class.Matrix33, align 4
  %13 = alloca %class.Matrix33, align 4
  %14 = alloca %class.Matrix33, align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca %class.Vector3, align 4
  %17 = alloca %class.Vector3, align 4
  %18 = alloca %class.Vector3, align 4
  %19 = alloca %class.Vector3, align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca %class.Vector3, align 4
  %27 = alloca %class.Vector3, align 4
  %28 = alloca %class.Vector3, align 4
  %29 = alloca %class.Vector3, align 4
  %30 = alloca %class.Vector3, align 4
  %31 = alloca %class.Vector3, align 4
  %32 = alloca %class.Vector3, align 4
  %33 = alloca %class.Vector3, align 4
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #7
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.start.p0(i64 36, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 36, ptr %13) #7
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.geometry::types::transform_t", ptr %36, i32 0, i32 0
  call void @_ZNK8Matrix33coEv(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %13, ptr noundef nonnull align 4 dereferenceable(36) %37)
  call void @llvm.lifetime.start.p0(i64 36, ptr %14) #7
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.geometry::types::transform_t", ptr %38, i32 0, i32 1
  call void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %14, ptr noundef nonnull align 4 dereferenceable(36) %39)
  call void @_ZNK8Matrix33mlERKS_(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %12, ptr noundef nonnull align 4 dereferenceable(36) %13, ptr noundef nonnull align 4 dereferenceable(36) %14)
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.geometry::types::transform_t", ptr %41, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %42)
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(36) %12, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #7
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(36) %12, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %43, i32 0, i32 0
  %45 = load float, ptr %44, align 4, !tbaa !9
  %46 = fdiv float %45, 2.000000e+00
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %47, i32 0, i32 1
  %49 = load float, ptr %48, align 4, !tbaa !12
  %50 = fdiv float %49, 2.000000e+00
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %51, i32 0, i32 2
  %53 = load float, ptr %52, align 4, !tbaa !13
  %54 = fdiv float %53, 2.000000e+00
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef %46, float noundef %50, float noundef %54)
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %56 = load float, ptr %55, align 4, !tbaa !14
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 0)
  %58 = load float, ptr %57, align 4, !tbaa !14
  %59 = fneg float %58
  %60 = call float @llvm.fmuladd.f32(float -1.000000e+00, float %56, float %59)
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 0)
  %62 = load float, ptr %61, align 4, !tbaa !14
  %63 = fdiv float %60, %62
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %65 = load float, ptr %64, align 4, !tbaa !14
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 1)
  %67 = load float, ptr %66, align 4, !tbaa !14
  %68 = fneg float %67
  %69 = call float @llvm.fmuladd.f32(float -1.000000e+00, float %65, float %68)
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 1)
  %71 = load float, ptr %70, align 4, !tbaa !14
  %72 = fdiv float %69, %71
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %74 = load float, ptr %73, align 4, !tbaa !14
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 2)
  %76 = load float, ptr %75, align 4, !tbaa !14
  %77 = fneg float %76
  %78 = call float @llvm.fmuladd.f32(float -1.000000e+00, float %74, float %77)
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 2)
  %80 = load float, ptr %79, align 4, !tbaa !14
  %81 = fdiv float %78, %80
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef %63, float noundef %72, float noundef %81)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %83 = load float, ptr %82, align 4, !tbaa !14
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 0)
  %85 = load float, ptr %84, align 4, !tbaa !14
  %86 = fsub float %83, %85
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 0)
  %88 = load float, ptr %87, align 4, !tbaa !14
  %89 = fdiv float %86, %88
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %91 = load float, ptr %90, align 4, !tbaa !14
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 1)
  %93 = load float, ptr %92, align 4, !tbaa !14
  %94 = fsub float %91, %93
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 1)
  %96 = load float, ptr %95, align 4, !tbaa !14
  %97 = fdiv float %94, %96
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %99 = load float, ptr %98, align 4, !tbaa !14
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef 2)
  %101 = load float, ptr %100, align 4, !tbaa !14
  %102 = fsub float %99, %101
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %17, i32 noundef 2)
  %104 = load float, ptr %103, align 4, !tbaa !14
  %105 = fdiv float %102, %104
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef %89, float noundef %97, float noundef %105)
  call void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %106 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 1
  store ptr %106, ptr %21, align 8, !tbaa !5
  %107 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 0, ptr %107, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !15
  br label %108

108:                                              ; preds = %221, %5
  %109 = load i32, ptr %22, align 4, !tbaa !15
  %110 = icmp ult i32 %109, 3
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  store i32 2, ptr %23, align 4
  br label %224

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %113 = load i32, ptr %22, align 4, !tbaa !15
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %19, i32 noundef %113)
  %115 = load float, ptr %114, align 4, !tbaa !14
  store float %115, ptr %24, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %116 = load i32, ptr %22, align 4, !tbaa !15
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %20, i32 noundef %116)
  %118 = load float, ptr %117, align 4, !tbaa !14
  store float %118, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %27, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %26, i32 noundef 0)
  %120 = load float, ptr %119, align 4, !tbaa !14
  %121 = call noundef float @_ZSt4fabsf(float noundef %120)
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %123 = load float, ptr %122, align 4, !tbaa !14
  %124 = fadd float %123, 0x3EE4F8B580000000
  %125 = fcmp ole float %121, %124
  br i1 %125, label %126, label %162

126:                                              ; preds = %112
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %26, i32 noundef 1)
  %128 = load float, ptr %127, align 4, !tbaa !14
  %129 = call noundef float @_ZSt4fabsf(float noundef %128)
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %131 = load float, ptr %130, align 4, !tbaa !14
  %132 = fadd float %131, 0x3EE4F8B580000000
  %133 = fcmp ole float %129, %132
  br i1 %133, label %134, label %162

134:                                              ; preds = %126
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %26, i32 noundef 2)
  %136 = load float, ptr %135, align 4, !tbaa !14
  %137 = call noundef float @_ZSt4fabsf(float noundef %136)
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %139 = load float, ptr %138, align 4, !tbaa !14
  %140 = fadd float %139, 0x3EE4F8B580000000
  %141 = fcmp ole float %137, %140
  br i1 %141, label %142, label %162

142:                                              ; preds = %134
  %143 = load float, ptr %24, align 4, !tbaa !14
  %144 = fcmp oge float %143, 0.000000e+00
  br i1 %144, label %145, label %162

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %29, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %146)
  %147 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 2
  %148 = load ptr, ptr %21, align 8, !tbaa !5
  %149 = load i32, ptr %148, align 4, !tbaa !15
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds [2 x %class.Vector3], ptr %147, i64 0, i64 %150
  %152 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %151, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  %153 = load float, ptr %24, align 4, !tbaa !14
  %154 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %155 = load ptr, ptr %21, align 8, !tbaa !5
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [2 x float], ptr %154, i64 0, i64 %157
  store float %153, ptr %158, align 4, !tbaa !14
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  %160 = load i32, ptr %159, align 4, !tbaa !15
  %161 = add i32 %160, 1
  store i32 %161, ptr %159, align 4, !tbaa !15
  br label %162

162:                                              ; preds = %145, %142, %134, %126, %112
  %163 = load ptr, ptr %21, align 8, !tbaa !5
  %164 = load i32, ptr %163, align 4, !tbaa !15
  %165 = icmp ugt i32 %164, 1
  br i1 %165, label %166, label %167

166:                                              ; preds = %162
  store i32 2, ptr %23, align 4
  br label %218

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %30, i32 noundef 0)
  %169 = load float, ptr %168, align 4, !tbaa !14
  %170 = call noundef float @_ZSt4fabsf(float noundef %169)
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %172 = load float, ptr %171, align 4, !tbaa !14
  %173 = fadd float %172, 0x3EE4F8B580000000
  %174 = fcmp ole float %170, %173
  br i1 %174, label %175, label %211

175:                                              ; preds = %167
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %30, i32 noundef 1)
  %177 = load float, ptr %176, align 4, !tbaa !14
  %178 = call noundef float @_ZSt4fabsf(float noundef %177)
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %180 = load float, ptr %179, align 4, !tbaa !14
  %181 = fadd float %180, 0x3EE4F8B580000000
  %182 = fcmp ole float %178, %181
  br i1 %182, label %183, label %211

183:                                              ; preds = %175
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %30, i32 noundef 2)
  %185 = load float, ptr %184, align 4, !tbaa !14
  %186 = call noundef float @_ZSt4fabsf(float noundef %185)
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %188 = load float, ptr %187, align 4, !tbaa !14
  %189 = fadd float %188, 0x3EE4F8B580000000
  %190 = fcmp ole float %186, %189
  br i1 %190, label %191, label %211

191:                                              ; preds = %183
  %192 = load float, ptr %25, align 4, !tbaa !14
  %193 = fcmp oge float %192, 0.000000e+00
  br i1 %193, label %194, label %211

194:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %33, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %195)
  %196 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 2
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  %198 = load i32, ptr %197, align 4, !tbaa !15
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds [2 x %class.Vector3], ptr %196, i64 0, i64 %199
  %201 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %200, ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #7
  %202 = load float, ptr %25, align 4, !tbaa !14
  %203 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  %205 = load i32, ptr %204, align 4, !tbaa !15
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds [2 x float], ptr %203, i64 0, i64 %206
  store float %202, ptr %207, align 4, !tbaa !14
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = load i32, ptr %208, align 4, !tbaa !15
  %210 = add i32 %209, 1
  store i32 %210, ptr %208, align 4, !tbaa !15
  br label %211

211:                                              ; preds = %194, %191, %183, %175, %167
  %212 = load ptr, ptr %21, align 8, !tbaa !5
  %213 = load i32, ptr %212, align 4, !tbaa !15
  %214 = icmp ugt i32 %213, 1
  br i1 %214, label %215, label %216

215:                                              ; preds = %211
  store i32 2, ptr %23, align 4
  br label %217

216:                                              ; preds = %211
  store i32 0, ptr %23, align 4
  br label %217

217:                                              ; preds = %216, %215
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  br label %218

218:                                              ; preds = %217, %166
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  %219 = load i32, ptr %23, align 4
  switch i32 %219, label %224 [
    i32 0, label %220
  ]

220:                                              ; preds = %218
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %22, align 4, !tbaa !15
  %223 = add i32 %222, 1
  store i32 %223, ptr %22, align 4, !tbaa !15
  br label %108, !llvm.loop !17

224:                                              ; preds = %218, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr %21, align 8, !tbaa !5
  %227 = load i32, ptr %226, align 4, !tbaa !15
  %228 = icmp ugt i32 %227, 0
  %229 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 0
  %230 = zext i1 %228 to i8
  store i8 %230, ptr %229, align 4, !tbaa !19
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #7
  ret void
}

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

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

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


; 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.Vector3 = type { [3 x float] }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::raycastResult_t" = type { i8, i32, [2 x %class.Vector3], [2 x float] }

; 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 uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix33coEv(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix33mlERKS_(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1 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 void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40)) unnamed_addr #3 align 2

declare void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_tERKNS3_11shapeCube_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(84) %3, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %4) local_unnamed_addr #1 {
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %class.Matrix33, align 4
  %8 = alloca %class.Matrix33, align 4
  %9 = alloca %class.Matrix33, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca %class.Vector3, align 4
  %19 = alloca %class.Vector3, align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca %class.Vector3, align 4
  %22 = alloca %class.Vector3, align 4
  %23 = alloca %class.Vector3, align 4
  %24 = alloca %class.Vector3, align 4
  %25 = alloca %class.Vector3, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8) #7
  call void @_ZNK8Matrix33coEv(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %8, ptr noundef nonnull align 4 dereferenceable(36) %3)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #7
  %26 = getelementptr inbounds i8, ptr %3, i64 36
  call void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %9, ptr noundef nonnull align 4 dereferenceable(36) %26)
  call void @_ZNK8Matrix33mlERKS_(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %7, ptr noundef nonnull align 4 dereferenceable(36) %8, ptr noundef nonnull align 4 dereferenceable(36) %9)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %27 = getelementptr inbounds i8, ptr %3, i64 72
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %10, ptr noundef nonnull align 4 dereferenceable(36) %7, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(36) %7, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #7
  %28 = load float, ptr %4, align 4, !tbaa !5
  %29 = fmul float %28, 5.000000e-01
  %30 = getelementptr inbounds i8, ptr %4, i64 4
  %31 = load float, ptr %30, align 4, !tbaa !10
  %32 = fmul float %31, 5.000000e-01
  %33 = getelementptr inbounds i8, ptr %4, i64 8
  %34 = load float, ptr %33, align 4, !tbaa !11
  %35 = fmul float %34, 5.000000e-01
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %29, float noundef %32, float noundef %35)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 0)
  %37 = load float, ptr %36, align 4, !tbaa !12
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 0)
  %39 = load float, ptr %38, align 4, !tbaa !12
  %40 = fneg float %39
  %41 = call float @llvm.fmuladd.f32(float %37, float -1.000000e+00, float %40)
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 0)
  %43 = load float, ptr %42, align 4, !tbaa !12
  %44 = fdiv float %41, %43
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 1)
  %46 = load float, ptr %45, align 4, !tbaa !12
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 1)
  %48 = load float, ptr %47, align 4, !tbaa !12
  %49 = fneg float %48
  %50 = call float @llvm.fmuladd.f32(float %46, float -1.000000e+00, float %49)
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 1)
  %52 = load float, ptr %51, align 4, !tbaa !12
  %53 = fdiv float %50, %52
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 2)
  %55 = load float, ptr %54, align 4, !tbaa !12
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 2)
  %57 = load float, ptr %56, align 4, !tbaa !12
  %58 = fneg float %57
  %59 = call float @llvm.fmuladd.f32(float %55, float -1.000000e+00, float %58)
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 2)
  %61 = load float, ptr %60, align 4, !tbaa !12
  %62 = fdiv float %59, %61
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %14, float noundef %44, float noundef %53, float noundef %62)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 0)
  %64 = load float, ptr %63, align 4, !tbaa !12
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 0)
  %66 = load float, ptr %65, align 4, !tbaa !12
  %67 = fsub float %64, %66
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 0)
  %69 = load float, ptr %68, align 4, !tbaa !12
  %70 = fdiv float %67, %69
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 1)
  %72 = load float, ptr %71, align 4, !tbaa !12
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 1)
  %74 = load float, ptr %73, align 4, !tbaa !12
  %75 = fsub float %72, %74
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 1)
  %77 = load float, ptr %76, align 4, !tbaa !12
  %78 = fdiv float %75, %77
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 2)
  %80 = load float, ptr %79, align 4, !tbaa !12
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef 2)
  %82 = load float, ptr %81, align 4, !tbaa !12
  %83 = fsub float %80, %82
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 noundef 2)
  %85 = load float, ptr %84, align 4, !tbaa !12
  %86 = fdiv float %83, %85
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %15, float noundef %70, float noundef %78, float noundef %86)
  call void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40) %0)
  %87 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %87, align 4, !tbaa !13
  %88 = getelementptr inbounds i8, ptr %0, i64 8
  %89 = getelementptr inbounds i8, ptr %0, i64 32
  br label %90

90:                                               ; preds = %5, %172
  %.02833 = phi i32 [ 0, %5 ], [ %173, %172 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef %.02833)
  %92 = load float, ptr %91, align 4, !tbaa !12
  store float %92, ptr %16, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %15, i32 noundef %.02833)
  %94 = load float, ptr %93, align 4, !tbaa !12
  store float %94, ptr %17, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %19, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #7
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %96 = load float, ptr %95, align 4, !tbaa !12
  %97 = call noundef float @_ZSt4fabsf(float noundef %96)
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 0)
  %99 = load float, ptr %98, align 4, !tbaa !12
  %100 = fadd float %99, 0x3EE4F8B580000000
  %101 = fcmp ugt float %97, %100
  br i1 %101, label %thread-pre-split, label %102

102:                                              ; preds = %90
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %104 = load float, ptr %103, align 4, !tbaa !12
  %105 = call noundef float @_ZSt4fabsf(float noundef %104)
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 1)
  %107 = load float, ptr %106, align 4, !tbaa !12
  %108 = fadd float %107, 0x3EE4F8B580000000
  %109 = fcmp ugt float %105, %108
  br i1 %109, label %thread-pre-split, label %110

110:                                              ; preds = %102
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %112 = load float, ptr %111, align 4, !tbaa !12
  %113 = call noundef float @_ZSt4fabsf(float noundef %112)
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 2)
  %115 = load float, ptr %114, align 4, !tbaa !12
  %116 = fadd float %115, 0x3EE4F8B580000000
  %117 = fcmp ole float %113, %116
  %118 = load float, ptr %16, align 4
  %119 = fcmp oge float %118, 0.000000e+00
  %or.cond = select i1 %117, i1 %119, i1 false
  br i1 %or.cond, label %120, label %thread-pre-split

120:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %21, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %121 = load i32, ptr %87, align 4, !tbaa !13
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds [2 x %class.Vector3], ptr %88, i64 0, i64 %122
  %124 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %123, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #7
  %125 = load float, ptr %16, align 4, !tbaa !12
  %126 = load i32, ptr %87, align 4, !tbaa !13
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds [2 x float], ptr %89, i64 0, i64 %127
  store float %125, ptr %128, align 4, !tbaa !12
  %129 = add i32 %126, 1
  store i32 %129, ptr %87, align 4, !tbaa !13
  br label %130

thread-pre-split:                                 ; preds = %90, %102, %110
  %.pr = load i32, ptr %87, align 4, !tbaa !13
  br label %130

130:                                              ; preds = %thread-pre-split, %120
  %131 = phi i32 [ %.pr, %thread-pre-split ], [ %129, %120 ]
  %132 = icmp ugt i32 %131, 1
  br i1 %132, label %.thread, label %133

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %23, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %22, i32 noundef 0)
  %135 = load float, ptr %134, align 4, !tbaa !12
  %136 = call noundef float @_ZSt4fabsf(float noundef %135)
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 0)
  %138 = load float, ptr %137, align 4, !tbaa !12
  %139 = fadd float %138, 0x3EE4F8B580000000
  %140 = fcmp ugt float %136, %139
  br i1 %140, label %thread-pre-split31, label %141

141:                                              ; preds = %133
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %22, i32 noundef 1)
  %143 = load float, ptr %142, align 4, !tbaa !12
  %144 = call noundef float @_ZSt4fabsf(float noundef %143)
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 1)
  %146 = load float, ptr %145, align 4, !tbaa !12
  %147 = fadd float %146, 0x3EE4F8B580000000
  %148 = fcmp ugt float %144, %147
  br i1 %148, label %thread-pre-split31, label %149

149:                                              ; preds = %141
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %22, i32 noundef 2)
  %151 = load float, ptr %150, align 4, !tbaa !12
  %152 = call noundef float @_ZSt4fabsf(float noundef %151)
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef 2)
  %154 = load float, ptr %153, align 4, !tbaa !12
  %155 = fadd float %154, 0x3EE4F8B580000000
  %156 = fcmp ole float %152, %155
  %157 = load float, ptr %17, align 4
  %158 = fcmp oge float %157, 0.000000e+00
  %or.cond3 = select i1 %156, i1 %158, i1 false
  br i1 %or.cond3, label %159, label %thread-pre-split31

159:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %160 = load i32, ptr %87, align 4, !tbaa !13
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds [2 x %class.Vector3], ptr %88, i64 0, i64 %161
  %163 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %162, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #7
  %164 = load float, ptr %17, align 4, !tbaa !12
  %165 = load i32, ptr %87, align 4, !tbaa !13
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds [2 x float], ptr %89, i64 0, i64 %166
  store float %164, ptr %167, align 4, !tbaa !12
  %168 = add i32 %165, 1
  store i32 %168, ptr %87, align 4, !tbaa !13
  br label %169

thread-pre-split31:                               ; preds = %133, %141, %149
  %.pr32 = load i32, ptr %87, align 4, !tbaa !13
  br label %169

169:                                              ; preds = %thread-pre-split31, %159
  %170 = phi i32 [ %.pr32, %thread-pre-split31 ], [ %168, %159 ]
  %171 = icmp ugt i32 %170, 1
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #7
  br i1 %171, label %.thread, label %172

.thread:                                          ; preds = %130, %169
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %.loopexit

172:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %173 = add nuw nsw i32 %.02833, 1
  %exitcond.not = icmp eq i32 %173, 3
  br i1 %exitcond.not, label %.loopexit.loopexit, label %90, !llvm.loop !15

.loopexit.loopexit:                               ; preds = %172
  %174 = trunc nuw i32 %170 to i8
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.thread
  %175 = phi i8 [ %174, %.loopexit.loopexit ], [ 1, %.thread ]
  store i8 %175, ptr %0, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  ret void
}

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

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

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


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