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

@__const._ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_tE.u_vals = external hidden unnamed_addr constant [6 x float], align 16

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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) #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 void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #5 align 2

; 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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPfEvT_S1_(ptr noundef, ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_15shapeCylinder_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_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(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %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.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca float, align 4
  %16 = alloca %class.Vector3, align 4
  %17 = alloca %class.Vector3, align 4
  %18 = alloca float, align 4
  %19 = alloca %"struct.geometry::types::shapeCylinder_t", align 4
  %20 = alloca %"struct.geometry::types::shapeSphere_t", align 4
  %21 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %22 = alloca %"struct.geometry::types::isometricTransform_t", align 4
  %23 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %24 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %25 = alloca i32, align 4
  %26 = alloca [6 x float], align 16
  %27 = alloca i32, align 4
  %28 = alloca i32, 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
  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
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = 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) %33, ptr noundef nonnull align 4 dereferenceable(12) %34)
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %36, i32 0, i32 1
  %38 = load float, ptr %37, align 4, !tbaa !9
  %39 = fdiv float %38, 2.000000e+00
  %40 = fmul float -1.000000e+00, %39
  store float %40, ptr %15, align 4, !tbaa !12
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @_ZN8geometry9transform12forwardBoundERKNS_5types20isometricTransform_tERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(48) %35, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %42, i32 0, i32 1
  %44 = load float, ptr %43, align 4, !tbaa !9
  %45 = fdiv float %44, 2.000000e+00
  store float %45, ptr %18, align 4, !tbaa !12
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @_ZN8geometry9transform12forwardBoundERKNS_5types20isometricTransform_tERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %16, ptr noundef nonnull align 4 dereferenceable(48) %41, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %46, i32 0, i32 1
  %48 = load float, ptr %47, align 4, !tbaa !9
  %49 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %19, i32 0, i32 1
  store float %48, ptr %49, align 4, !tbaa !13
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %50, i32 0, i32 0
  %52 = load float, ptr %51, align 4, !tbaa !15
  %53 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %19, i32 0, i32 0
  store float %52, ptr %53, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %54, i32 0, i32 0
  %56 = load float, ptr %55, align 4, !tbaa !15
  %57 = getelementptr inbounds %"struct.geometry::types::shapeSphere_t", ptr %20, i32 0, i32 0
  store float %56, ptr %57, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #7
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_15shapeCylinder_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::raycastResult_t") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %59, ptr noundef nonnull align 4 dereferenceable(48) %60, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.start.p0(i64 48, ptr %22) #7
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN8geometry5types20isometricTransform_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(48) %22, ptr noundef nonnull align 4 dereferenceable(48) %61)
  %62 = getelementptr inbounds %"struct.geometry::types::isometricTransform_t", ptr %22, i32 0, i32 1
  %63 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %62, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #7
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::raycastResult_t") align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %64, ptr noundef nonnull align 4 dereferenceable(12) %65, ptr noundef nonnull align 4 dereferenceable(48) %22, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %66 = getelementptr inbounds %"struct.geometry::types::isometricTransform_t", ptr %22, i32 0, i32 1
  %67 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #7
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind writable sret(%"struct.geometry::types::raycastResult_t") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull align 4 dereferenceable(48) %22, ptr noundef nonnull align 4 dereferenceable(4) %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 @__const._ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_tE.u_vals, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !19
  br label %70

70:                                               ; preds = %123, %5
  %71 = load i32, ptr %27, align 4, !tbaa !19
  %72 = icmp ult i32 %71, 2
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %126

74:                                               ; preds = %70
  %75 = load i32, ptr %27, align 4, !tbaa !19
  %76 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %21, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !21
  %78 = icmp ult i32 %75, %77
  br i1 %78, label %79, label %90

79:                                               ; preds = %74
  %80 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %21, i32 0, i32 3
  %81 = load i32, ptr %27, align 4, !tbaa !19
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds [2 x float], ptr %80, i64 0, i64 %82
  %84 = load float, ptr %83, align 4, !tbaa !12
  %85 = load i32, ptr %25, align 4, !tbaa !19
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds [6 x float], ptr %26, i64 0, i64 %86
  store float %84, ptr %87, align 4, !tbaa !12
  %88 = load i32, ptr %25, align 4, !tbaa !19
  %89 = add i32 %88, 1
  store i32 %89, ptr %25, align 4, !tbaa !19
  br label %90

90:                                               ; preds = %79, %74
  %91 = load i32, ptr %27, align 4, !tbaa !19
  %92 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %23, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !21
  %94 = icmp ult i32 %91, %93
  br i1 %94, label %95, label %106

95:                                               ; preds = %90
  %96 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %23, i32 0, i32 3
  %97 = load i32, ptr %27, align 4, !tbaa !19
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [2 x float], ptr %96, i64 0, i64 %98
  %100 = load float, ptr %99, align 4, !tbaa !12
  %101 = load i32, ptr %25, align 4, !tbaa !19
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds [6 x float], ptr %26, i64 0, i64 %102
  store float %100, ptr %103, align 4, !tbaa !12
  %104 = load i32, ptr %25, align 4, !tbaa !19
  %105 = add i32 %104, 1
  store i32 %105, ptr %25, align 4, !tbaa !19
  br label %106

106:                                              ; preds = %95, %90
  %107 = load i32, ptr %27, align 4, !tbaa !19
  %108 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %24, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !21
  %110 = icmp ult i32 %107, %109
  br i1 %110, label %111, label %122

111:                                              ; preds = %106
  %112 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %24, i32 0, i32 3
  %113 = load i32, ptr %27, align 4, !tbaa !19
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds [2 x float], ptr %112, i64 0, i64 %114
  %116 = load float, ptr %115, align 4, !tbaa !12
  %117 = load i32, ptr %25, align 4, !tbaa !19
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [6 x float], ptr %26, i64 0, i64 %118
  store float %116, ptr %119, align 4, !tbaa !12
  %120 = load i32, ptr %25, align 4, !tbaa !19
  %121 = add i32 %120, 1
  store i32 %121, ptr %25, align 4, !tbaa !19
  br label %122

122:                                              ; preds = %111, %106
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %27, align 4, !tbaa !19
  %125 = add i32 %124, 1
  store i32 %125, ptr %27, align 4, !tbaa !19
  br label %70, !llvm.loop !24

126:                                              ; preds = %73
  call void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 2, ptr %28, align 4, !tbaa !19
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %128 = load i32, ptr %127, align 4, !tbaa !19
  %129 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 1
  store i32 %128, ptr %129, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %130 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 1
  %131 = load i32, ptr %130, align 4, !tbaa !21
  %132 = icmp ugt i32 %131, 0
  br i1 %132, label %133, label %159

133:                                              ; preds = %126
  %134 = call noundef ptr @_ZSt5beginIfLm6EEPT_RAT0__S0_(ptr noundef nonnull align 4 dereferenceable(24) %26) #7
  %135 = call noundef ptr @_ZSt3endIfLm6EEPT_RAT0__S0_(ptr noundef nonnull align 4 dereferenceable(24) %26) #7
  call void @_ZSt4sortIPfEvT_S1_(ptr noundef %134, ptr noundef %135)
  %136 = getelementptr inbounds [6 x float], ptr %26, i64 0, i64 0
  %137 = load float, ptr %136, align 16, !tbaa !12
  %138 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %139 = getelementptr inbounds [2 x float], ptr %138, i64 0, i64 0
  store float %137, ptr %139, align 4, !tbaa !12
  %140 = load i32, ptr %25, align 4, !tbaa !19
  %141 = sub i32 %140, 1
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds [6 x float], ptr %26, i64 0, i64 %142
  %144 = load float, ptr %143, align 4, !tbaa !12
  %145 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %146 = getelementptr inbounds [2 x float], ptr %145, i64 0, i64 1
  store float %144, ptr %146, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #7
  %147 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %148 = getelementptr inbounds [2 x float], ptr %147, i64 0, i64 0
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %30, ptr noundef nonnull align 4 dereferenceable(4) %148, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %149)
  %150 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 2
  %151 = getelementptr inbounds [2 x %class.Vector3], ptr %150, i64 0, i64 0
  %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) %29)
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #7
  %153 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 3
  %154 = getelementptr inbounds [2 x float], ptr %153, i64 0, i64 1
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %32, ptr noundef nonnull align 4 dereferenceable(4) %154, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %155)
  %156 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 2
  %157 = getelementptr inbounds [2 x %class.Vector3], ptr %156, i64 0, i64 1
  %158 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %157, ptr noundef nonnull align 4 dereferenceable(12) %31)
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  br label %159

159:                                              ; preds = %133, %126
  %160 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 1
  %161 = load i32, ptr %160, align 4, !tbaa !21
  %162 = icmp ugt i32 %161, 0
  %163 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 0
  %164 = zext i1 %162 to i8
  store i8 %164, ptr %163, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #7
  ret void
}

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

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

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 nounwind willreturn memory(argmem: readwrite) }
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 4}
!10 = !{!"_ZTSN8geometry5types14shapeCapsule_tE", !11, i64 0, !11, i64 4}
!11 = !{!"float", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 4}
!14 = !{!"_ZTSN8geometry5types15shapeCylinder_tE", !11, i64 0, !11, i64 4}
!15 = !{!10, !11, i64 0}
!16 = !{!14, !11, i64 0}
!17 = !{!18, !11, i64 0}
!18 = !{!"_ZTSN8geometry5types13shapeSphere_tE", !11, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !20, i64 4}
!22 = !{!"_ZTSN8geometry5types15raycastResult_tE", !23, i64 0, !20, i64 4, !7, i64 8, !7, i64 32}
!23 = !{!"bool", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!22, !23, 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] }
%"struct.geometry::types::raycastResult_t" = type { i8, i32, [2 x %class.Vector3], [2 x float] }
%"struct.geometry::types::shapeCylinder_t" = type { float, float }
%"struct.geometry::types::shapeSphere_t" = type { float }
%"struct.geometry::types::isometricTransform_t" = type { %class.Matrix33, %class.Vector3 }
%class.Matrix33 = type { [9 x float] }

@__const._ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_tE.u_vals = external hidden unnamed_addr constant [6 x float], align 16

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress 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) #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 void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPfEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_15shapeCylinder_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::raycastResult_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_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(48) %3, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %4) local_unnamed_addr #1 {
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca %class.Vector3, align 4
  %9 = alloca %class.Vector3, align 4
  %10 = alloca float, align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca float, align 4
  %14 = alloca %"struct.geometry::types::shapeCylinder_t", align 8
  %15 = alloca %"struct.geometry::types::shapeSphere_t", align 4
  %16 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %17 = alloca %"struct.geometry::types::isometricTransform_t", align 4
  %18 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %19 = alloca %"struct.geometry::types::raycastResult_t", align 4
  %20 = alloca i32, align 4
  %21 = alloca [6 x float], align 16
  %22 = alloca i32, align 4
  %23 = alloca %class.Vector3, align 4
  %24 = alloca %class.Vector3, align 4
  %25 = alloca %class.Vector3, align 4
  %26 = 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 12, ptr nonnull %7) #7
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, 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 %8) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %27 = getelementptr inbounds i8, ptr %4, i64 4
  %28 = load float, ptr %27, align 4, !tbaa !5
  %29 = fmul float %28, -5.000000e-01
  store float %29, ptr %10, align 4, !tbaa !10
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @_ZN8geometry9transform12forwardBoundERKNS_5types20isometricTransform_tERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %8, ptr noundef nonnull align 4 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %30 = load float, ptr %27, align 4, !tbaa !5
  %31 = fmul float %30, 5.000000e-01
  store float %31, ptr %13, align 4, !tbaa !10
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @_ZN8geometry9transform12forwardBoundERKNS_5types20isometricTransform_tERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %32 = load <2 x float>, ptr %4, align 4, !tbaa !10
  store <2 x float> %32, ptr %14, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %33 = extractelement <2 x float> %32, i64 0
  store float %33, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #7
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_15shapeCylinder_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::raycastResult_t") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %17) #7
  call void @_ZN8geometry5types20isometricTransform_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(48) %17, ptr noundef nonnull align 4 dereferenceable(48) %3)
  %34 = getelementptr inbounds i8, ptr %17, i64 36
  %35 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #7
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::raycastResult_t") align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(48) %17, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %36 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %19) #7
  call void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_13shapeSphere_tE(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::raycastResult_t") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(48) %17, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  store i32 0, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %21, ptr noundef nonnull align 16 dereferenceable(24) @__const._ZN8geometry7raycastERK7Vector3S2_RKNS_5types20isometricTransform_tERKNS3_14shapeCapsule_tE.u_vals, i64 24, i1 false)
  %37 = getelementptr inbounds i8, ptr %16, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %18, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %19, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = getelementptr inbounds i8, ptr %18, i64 32
  %44 = getelementptr inbounds i8, ptr %19, i64 32
  %.not28 = icmp eq i32 %38, 0
  br i1 %.not28, label %48, label %45

45:                                               ; preds = %5
  %46 = getelementptr inbounds i8, ptr %16, i64 32
  %47 = load float, ptr %46, align 4, !tbaa !10
  store float %47, ptr %21, align 16, !tbaa !10
  br label %48

48:                                               ; preds = %45, %5
  %49 = phi i32 [ 1, %45 ], [ 0, %5 ]
  %.not29 = icmp eq i32 %40, 0
  br i1 %.not29, label %55, label %50

50:                                               ; preds = %48
  %51 = load float, ptr %43, align 4, !tbaa !10
  %52 = zext nneg i32 %49 to i64
  %53 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %52
  store float %51, ptr %53, align 4, !tbaa !10
  %54 = add nuw nsw i32 %49, 1
  br label %55

55:                                               ; preds = %50, %48
  %56 = phi i32 [ %54, %50 ], [ %49, %48 ]
  %.not30 = icmp eq i32 %42, 0
  br i1 %.not30, label %62, label %57

57:                                               ; preds = %55
  %58 = load float, ptr %44, align 4, !tbaa !10
  %59 = zext nneg i32 %56 to i64
  %60 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %59
  store float %58, ptr %60, align 4, !tbaa !10
  %61 = add nuw nsw i32 %56, 1
  br label %62

62:                                               ; preds = %55, %57
  %63 = phi i32 [ %56, %55 ], [ %61, %57 ]
  %64 = icmp ugt i32 %38, 1
  br i1 %64, label %65, label %71

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %16, i64 36
  %67 = load float, ptr %66, align 4, !tbaa !10
  %68 = zext nneg i32 %63 to i64
  %69 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %68
  store float %67, ptr %69, align 4, !tbaa !10
  %70 = add nuw nsw i32 %63, 1
  br label %71

71:                                               ; preds = %65, %62
  %72 = phi i32 [ %70, %65 ], [ %63, %62 ]
  %73 = icmp ugt i32 %40, 1
  br i1 %73, label %74, label %80

74:                                               ; preds = %71
  %75 = getelementptr inbounds i8, ptr %18, i64 36
  %76 = load float, ptr %75, align 4, !tbaa !10
  %77 = zext nneg i32 %72 to i64
  %78 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %77
  store float %76, ptr %78, align 4, !tbaa !10
  %79 = add nuw nsw i32 %72, 1
  br label %80

80:                                               ; preds = %74, %71
  %81 = phi i32 [ %79, %74 ], [ %72, %71 ]
  %82 = icmp ugt i32 %42, 1
  br i1 %82, label %83, label %89

83:                                               ; preds = %80
  %84 = getelementptr inbounds i8, ptr %19, i64 36
  %85 = load float, ptr %84, align 4, !tbaa !10
  %86 = zext nneg i32 %81 to i64
  %87 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %86
  store float %85, ptr %87, align 4, !tbaa !10
  %88 = add nuw nsw i32 %81, 1
  br label %89

89:                                               ; preds = %83, %80
  %90 = phi i32 [ %81, %80 ], [ %88, %83 ]
  store i32 %90, ptr %20, align 4, !tbaa !13
  call void @_ZN8geometry5types15raycastResult_tC2Ev(ptr noundef nonnull align 4 dereferenceable(40) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #7
  store i32 2, ptr %22, align 4, !tbaa !13
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %92 = load i32, ptr %91, align 4, !tbaa !13
  %93 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %92, ptr %93, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  %.not = icmp eq i32 %92, 0
  br i1 %.not, label %111, label %94

94:                                               ; preds = %89
  %95 = call noundef ptr @_ZSt5beginIfLm6EEPT_RAT0__S0_(ptr noundef nonnull align 4 dereferenceable(24) %21) #7
  %96 = call noundef ptr @_ZSt3endIfLm6EEPT_RAT0__S0_(ptr noundef nonnull align 4 dereferenceable(24) %21) #7
  call void @_ZSt4sortIPfEvT_S1_(ptr noundef %95, ptr noundef %96)
  %97 = load float, ptr %21, align 16, !tbaa !10
  %98 = getelementptr inbounds i8, ptr %0, i64 32
  store float %97, ptr %98, align 4, !tbaa !10
  %99 = load i32, ptr %20, align 4, !tbaa !13
  %100 = add i32 %99, -1
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [6 x float], ptr %21, i64 0, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !10
  %104 = getelementptr inbounds i8, ptr %0, i64 36
  store float %103, ptr %104, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %24, ptr noundef nonnull align 4 dereferenceable(4) %98, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %105 = getelementptr inbounds i8, ptr %0, i64 8
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %105, ptr noundef nonnull align 4 dereferenceable(12) %23)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #7
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %107 = getelementptr inbounds i8, ptr %0, i64 20
  %108 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %107, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #7
  %.pre = load i32, ptr %93, align 4, !tbaa !15
  %109 = icmp ne i32 %.pre, 0
  %110 = zext i1 %109 to i8
  br label %111

111:                                              ; preds = %94, %89
  %112 = phi i8 [ %110, %94 ], [ 0, %89 ]
  store i8 %112, ptr %0, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  ret void
}

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

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

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 nounwind willreturn memory(argmem: readwrite) }
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 4}
!6 = !{!"_ZTSN8geometry5types14shapeCapsule_tE", !7, i64 0, !7, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTSN8geometry5types13shapeSphere_tE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!16, !14, i64 4}
!16 = !{!"_ZTSN8geometry5types15raycastResult_tE", !17, i64 0, !14, i64 4, !8, i64 8, !8, i64 32}
!17 = !{!"bool", !8, i64 0}
!18 = !{!16, !17, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass