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

%"struct.geometry::types::raycastResult_t" = type { i8, i32, [2 x %class.Vector3], [2 x float] }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::shapeCylinder_t" = type { float, float }
%"struct.geometry::types::shapeSphere_t" = type { float }
%"struct.geometry::types::transform_t" = type { %class.Matrix33, %class.Matrix33, %class.Vector3 }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::shapeCapsule_t" = type { float, float }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_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(84), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

; 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)) #0 align 2

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

; 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)) #0 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)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_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(84), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

72:                                               ; preds = %125, %5
  %73 = load i32, ptr %28, align 4, !tbaa !19
  %74 = icmp ult i32 %73, 2
  br i1 %74, label %76, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %128

76:                                               ; preds = %72
  %77 = load i32, ptr %28, align 4, !tbaa !19
  %78 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %21, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !21
  %80 = icmp ult i32 %77, %79
  br i1 %80, label %81, label %92

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

92:                                               ; preds = %81, %76
  %93 = load i32, ptr %28, align 4, !tbaa !19
  %94 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %23, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !21
  %96 = icmp ult i32 %93, %95
  br i1 %96, label %97, label %108

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

108:                                              ; preds = %97, %92
  %109 = load i32, ptr %28, align 4, !tbaa !19
  %110 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %25, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !21
  %112 = icmp ult i32 %109, %111
  br i1 %112, label %113, label %124

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

124:                                              ; preds = %113, %108
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %28, align 4, !tbaa !19
  %127 = add i32 %126, 1
  store i32 %127, ptr %28, align 4, !tbaa !19
  br label %72, !llvm.loop !24

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

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

161:                                              ; preds = %135, %128
  %162 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !21
  %164 = icmp ugt i32 %163, 0
  %165 = getelementptr inbounds %"struct.geometry::types::raycastResult_t", ptr %0, i32 0, i32 0
  %166 = zext i1 %164 to i8
  store i8 %166, ptr %165, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 84, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 84, 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
}

; 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types11transform_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) unnamed_addr #3 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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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"

%"struct.geometry::types::raycastResult_t" = type { i8, i32, [2 x %class.Vector3], [2 x float] }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::shapeCylinder_t" = type { float, float }
%"struct.geometry::types::shapeSphere_t" = type { float }
%"struct.geometry::types::transform_t" = type { %class.Matrix33, %class.Matrix33, %class.Vector3 }
%class.Matrix33 = type { [9 x float] }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_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(84), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

; 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 #0 align 2

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

; 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 #0 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7raycastERK7Vector3S2_RKNS_5types11transform_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(84), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

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

50:                                               ; preds = %47, %5
  %51 = phi i32 [ 1, %47 ], [ 0, %5 ]
  %.not30 = icmp eq i32 %42, 0
  br i1 %.not30, label %57, label %52

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

57:                                               ; preds = %52, %50
  %58 = phi i32 [ %56, %52 ], [ %51, %50 ]
  %.not31 = icmp eq i32 %44, 0
  br i1 %.not31, label %64, label %59

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

64:                                               ; preds = %57, %59
  %65 = phi i32 [ %58, %57 ], [ %63, %59 ]
  %66 = icmp ugt i32 %40, 1
  br i1 %66, label %67, label %73

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

73:                                               ; preds = %67, %64
  %74 = phi i32 [ %72, %67 ], [ %65, %64 ]
  %75 = icmp ugt i32 %42, 1
  br i1 %75, label %76, label %82

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

82:                                               ; preds = %76, %73
  %83 = phi i32 [ %81, %76 ], [ %74, %73 ]
  %84 = icmp ugt i32 %44, 1
  br i1 %84, label %85, label %91

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

91:                                               ; preds = %85, %82
  %92 = phi i32 [ %83, %82 ], [ %90, %85 ]
  store i32 %92, ptr %21, 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 %23) #7
  store i32 2, ptr %23, align 4, !tbaa !13
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %94, ptr %95, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  %.not = icmp eq i32 %94, 0
  br i1 %.not, label %113, label %96

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

113:                                              ; preds = %96, %91
  %114 = phi i8 [ %112, %96 ], [ 0, %91 ]
  store i8 %114, ptr %0, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 84, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 84, 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
}

; 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types11transform_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(84), ptr noundef nonnull align 4 dereferenceable(84)) unnamed_addr #3 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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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