; LLVM IR from heroseh/cgm :: cgm (cgm_3d_aabb_vs_hoop)

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

%union.CgmVec3 = type { %struct.anon.0 }
%struct.anon.0 = type { float, float, float }
%struct.CgmSphere = type { %union.anon.7, float }
%union.anon.7 = type { %struct.anon.8 }
%struct.anon.8 = type { float, float, float }
%struct.CgmHoop3d = type { %union.CgmVec3, %union.CgmVec3, %union.CgmVec3, float, float }
%struct.anon.5 = type { float, float, float, float, float, float }

; Function Attrs: nounwind uwtable
declare dso_local float @cgm_max(float noundef, float noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmVec3_sub(<2 x float>, float, <2 x float>, float) #4

; Function Attrs: nounwind uwtable
declare dso_local float @CgmVec3_dot(<2 x float>, float, <2 x float>, float) #4

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_center(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef, <2 x float>, float) #4

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_closest_pt(ptr noundef, <2 x float>, float) #4

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @cgm_3d_aabb_vs_pt(ptr noundef, <2 x float>, float, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef, <2 x float>, float) #4

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @cgm_3d_aabb_vs_sphere(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @cgm_3d_aabb_vs_hoop(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 {
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %union.CgmVec3, align 4
  %11 = alloca { <2 x float>, float }, align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca %union.CgmVec3, align 4
  %14 = alloca { <2 x float>, float }, align 8
  %15 = alloca float, align 4
  %16 = alloca { <2 x float>, float }, align 4
  %17 = alloca i32, align 4
  %18 = alloca %union.CgmVec3, align 4
  %19 = alloca float, align 4
  %20 = alloca %union.CgmVec3, align 4
  %21 = alloca %union.CgmVec3, align 4
  %22 = alloca { <2 x float>, float }, align 8
  %23 = alloca { <2 x float>, float }, align 4
  %24 = alloca { <2 x float>, float }, align 8
  %25 = alloca %union.CgmVec3, align 4
  %26 = alloca { <2 x float>, float }, align 4
  %27 = alloca { <2 x float>, float }, align 4
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca %union.CgmVec3, align 4
  %30 = alloca %union.CgmVec3, align 4
  %31 = alloca %union.CgmVec3, align 4
  %32 = alloca %union.CgmVec3, align 4
  %33 = alloca { <2 x float>, float }, align 4
  %34 = alloca { <2 x float>, float }, align 8
  %35 = alloca %union.CgmVec3, align 4
  %36 = alloca { <2 x float>, float }, align 4
  %37 = alloca { <2 x float>, float }, align 4
  %38 = alloca { <2 x float>, float }, align 8
  %39 = alloca %union.CgmVec3, align 4
  %40 = alloca { <2 x float>, float }, align 4
  %41 = alloca { <2 x float>, float }, align 8
  %42 = alloca %union.CgmVec3, align 4
  %43 = alloca { <2 x float>, float }, align 4
  %44 = alloca { <2 x float>, float }, align 4
  %45 = alloca { <2 x float>, float }, align 8
  %46 = alloca { <2 x float>, float }, align 4
  %47 = alloca { <2 x float>, float }, align 4
  %48 = alloca [8 x %union.CgmVec3], align 16
  %49 = alloca float, align 4
  %50 = alloca { <2 x float>, float }, align 4
  %51 = alloca { <2 x float>, float }, align 4
  %52 = alloca i32, align 4
  %53 = alloca %union.CgmVec3, align 4
  %54 = alloca %union.CgmVec3, align 4
  %55 = alloca { <2 x float>, float }, align 4
  %56 = alloca { <2 x float>, float }, align 8
  %57 = alloca %union.CgmVec3, align 4
  %58 = alloca { <2 x float>, float }, align 4
  %59 = alloca { <2 x float>, float }, align 8
  %60 = alloca %union.CgmVec3, align 4
  %61 = alloca { <2 x float>, float }, align 4
  %62 = alloca { <2 x float>, float }, align 4
  %63 = alloca { <2 x float>, float }, align 8
  %64 = alloca float, align 4
  %65 = alloca { <2 x float>, float }, align 4
  %66 = alloca { <2 x float>, float }, align 4
  %67 = alloca %struct.CgmSphere, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.CgmHoop3d, ptr %69, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %70, i64 12, i1 false)
  %71 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 0
  %72 = load <2 x float>, ptr %71, align 4
  %73 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 1
  %74 = load float, ptr %73, align 4
  %75 = call { <2 x float>, float } @CgmAabb3d_closest_pt(ptr noundef %68, <2 x float> %72, float %74)
  %76 = getelementptr inbounds %union.CgmVec3, ptr %10, i32 0, i32 0
  store { <2 x float>, float } %75, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 8 %12, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = call { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef %77)
  %79 = getelementptr inbounds %union.CgmVec3, ptr %13, i32 0, i32 0
  store { <2 x float>, float } %78, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 8 %14, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %80 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 0
  %81 = load float, ptr %80, align 4, !tbaa !9
  %82 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 1
  %83 = load float, ptr %82, align 4, !tbaa !9
  %84 = call float @cgm_max(float noundef %81, float noundef %83)
  %85 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 2
  %86 = load float, ptr %85, align 4, !tbaa !9
  %87 = call float @cgm_max(float noundef %84, float noundef %86)
  store float %87, ptr %15, align 4, !tbaa !10
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.CgmHoop3d, ptr %89, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %90, i64 12, i1 false)
  %91 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 0
  %92 = load <2 x float>, ptr %91, align 4
  %93 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 1
  %94 = load float, ptr %93, align 4
  %95 = call zeroext i8 @cgm_3d_aabb_vs_pt(ptr noundef %88, <2 x float> %92, float %94, ptr noundef null, ptr noundef null)
  %96 = zext i8 %95 to i32
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %213

98:                                               ; preds = %4
  %99 = load float, ptr %15, align 4, !tbaa !10
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.CgmHoop3d, ptr %100, i32 0, i32 3
  %102 = load float, ptr %101, align 4, !tbaa !12
  %103 = fcmp ogt float %99, %102
  br i1 %103, label %104, label %213

104:                                              ; preds = %98
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %111, label %107

107:                                              ; preds = %104
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  store i8 1, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %434

111:                                              ; preds = %107, %104
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = call { <2 x float>, float } @CgmAabb3d_center(ptr noundef %113)
  %115 = getelementptr inbounds %union.CgmVec3, ptr %21, i32 0, i32 0
  store { <2 x float>, float } %114, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %115, ptr align 8 %22, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %21, i64 12, i1 false)
  %116 = getelementptr inbounds { <2 x float>, float }, ptr %23, i32 0, i32 0
  %117 = load <2 x float>, ptr %116, align 4
  %118 = getelementptr inbounds { <2 x float>, float }, ptr %23, i32 0, i32 1
  %119 = load float, ptr %118, align 4
  %120 = call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef %112, <2 x float> %117, float %119)
  %121 = getelementptr inbounds %union.CgmVec3, ptr %20, i32 0, i32 0
  store { <2 x float>, float } %120, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %121, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.CgmHoop3d, ptr %122, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %20, i64 12, i1 false)
  %124 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 0
  %125 = load <2 x float>, ptr %124, align 4
  %126 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 1
  %127 = load float, ptr %126, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %123, i64 12, i1 false)
  %128 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 0
  %129 = load <2 x float>, ptr %128, align 4
  %130 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 1
  %131 = load float, ptr %130, align 4
  %132 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %125, float %127, <2 x float> %129, float %131)
  %133 = getelementptr inbounds %union.CgmVec3, ptr %25, i32 0, i32 0
  store { <2 x float>, float } %132, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %133, ptr align 8 %28, i64 12, i1 false)
  %134 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !9
  %136 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 1
  %137 = load float, ptr %136, align 4, !tbaa !9
  %138 = fcmp ogt float %135, %137
  br i1 %138, label %139, label %158

139:                                              ; preds = %111
  %140 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 0
  %141 = load float, ptr %140, align 4, !tbaa !9
  %142 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 2
  %143 = load float, ptr %142, align 4, !tbaa !9
  %144 = fcmp ogt float %141, %143
  br i1 %144, label %145, label %158

145:                                              ; preds = %139
  %146 = getelementptr inbounds %struct.anon.0, ptr %29, i32 0, i32 0
  %147 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 0
  %148 = load float, ptr %147, align 4, !tbaa !9
  %149 = fneg float %148
  %150 = call float @llvm.copysign.f32(float 1.000000e+00, float %149)
  store float %150, ptr %146, align 4, !tbaa !14
  %151 = getelementptr inbounds %struct.anon.0, ptr %29, i32 0, i32 1
  store float 0.000000e+00, ptr %151, align 4, !tbaa !16
  %152 = getelementptr inbounds %struct.anon.0, ptr %29, i32 0, i32 2
  store float 0.000000e+00, ptr %152, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %29, i64 12, i1 false), !tbaa.struct !18
  %153 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !9
  %155 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 0
  %156 = load float, ptr %155, align 4, !tbaa !9
  %157 = fsub float %154, %156
  store float %157, ptr %19, align 4, !tbaa !10
  br label %197

158:                                              ; preds = %139, %111
  %159 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 1
  %160 = load float, ptr %159, align 4, !tbaa !9
  %161 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 0
  %162 = load float, ptr %161, align 4, !tbaa !9
  %163 = fcmp ogt float %160, %162
  br i1 %163, label %164, label %183

164:                                              ; preds = %158
  %165 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 1
  %166 = load float, ptr %165, align 4, !tbaa !9
  %167 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 2
  %168 = load float, ptr %167, align 4, !tbaa !9
  %169 = fcmp ogt float %166, %168
  br i1 %169, label %170, label %183

170:                                              ; preds = %164
  %171 = getelementptr inbounds %struct.anon.0, ptr %30, i32 0, i32 0
  store float 0.000000e+00, ptr %171, align 4, !tbaa !14
  %172 = getelementptr inbounds %struct.anon.0, ptr %30, i32 0, i32 1
  %173 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 1
  %174 = load float, ptr %173, align 4, !tbaa !9
  %175 = fneg float %174
  %176 = call float @llvm.copysign.f32(float 1.000000e+00, float %175)
  store float %176, ptr %172, align 4, !tbaa !16
  %177 = getelementptr inbounds %struct.anon.0, ptr %30, i32 0, i32 2
  store float 0.000000e+00, ptr %177, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !18
  %178 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 1
  %179 = load float, ptr %178, align 4, !tbaa !9
  %180 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 1
  %181 = load float, ptr %180, align 4, !tbaa !9
  %182 = fsub float %179, %181
  store float %182, ptr %19, align 4, !tbaa !10
  br label %196

183:                                              ; preds = %164, %158
  %184 = getelementptr inbounds %struct.anon.0, ptr %31, i32 0, i32 0
  store float 0.000000e+00, ptr %184, align 4, !tbaa !14
  %185 = getelementptr inbounds %struct.anon.0, ptr %31, i32 0, i32 1
  store float 0.000000e+00, ptr %185, align 4, !tbaa !16
  %186 = getelementptr inbounds %struct.anon.0, ptr %31, i32 0, i32 2
  %187 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 2
  %188 = load float, ptr %187, align 4, !tbaa !9
  %189 = fneg float %188
  %190 = call float @llvm.copysign.f32(float 1.000000e+00, float %189)
  store float %190, ptr %186, align 4, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %31, i64 12, i1 false), !tbaa.struct !18
  %191 = getelementptr inbounds %struct.anon.0, ptr %13, i32 0, i32 2
  %192 = load float, ptr %191, align 4, !tbaa !9
  %193 = getelementptr inbounds %struct.anon.0, ptr %25, i32 0, i32 2
  %194 = load float, ptr %193, align 4, !tbaa !9
  %195 = fsub float %192, %194
  store float %195, ptr %19, align 4, !tbaa !10
  br label %196

196:                                              ; preds = %183, %170
  br label %197

197:                                              ; preds = %196, %145
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = icmp ne ptr %198, null
  br i1 %199, label %200, label %207

200:                                              ; preds = %197
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.CgmHoop3d, ptr %201, i32 0, i32 4
  %203 = load float, ptr %202, align 4, !tbaa !19
  %204 = load float, ptr %19, align 4, !tbaa !10
  %205 = fadd float %203, %204
  %206 = load ptr, ptr %9, align 8, !tbaa !5
  store float %205, ptr %206, align 4, !tbaa !10
  br label %207

207:                                              ; preds = %200, %197
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = icmp ne ptr %208, null
  br i1 %209, label %210, label %212

210:                                              ; preds = %207
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %211, ptr align 4 %18, i64 12, i1 false), !tbaa.struct !18
  br label %212

212:                                              ; preds = %210, %207
  store i8 1, ptr %5, align 1
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #5
  br label %434

213:                                              ; preds = %98, %4
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #5
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %10, i64 12, i1 false)
  %215 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 0
  %216 = load <2 x float>, ptr %215, align 4
  %217 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 1
  %218 = load float, ptr %217, align 4
  %219 = call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef %214, <2 x float> %216, float %218)
  %220 = getelementptr inbounds %union.CgmVec3, ptr %32, i32 0, i32 0
  store { <2 x float>, float } %219, ptr %34, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %220, ptr align 8 %34, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #5
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.CgmHoop3d, ptr %221, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %32, i64 12, i1 false)
  %223 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 0
  %224 = load <2 x float>, ptr %223, align 4
  %225 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 1
  %226 = load float, ptr %225, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %222, i64 12, i1 false)
  %227 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 0
  %228 = load <2 x float>, ptr %227, align 4
  %229 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 1
  %230 = load float, ptr %229, align 4
  %231 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %224, float %226, <2 x float> %228, float %230)
  %232 = getelementptr inbounds %union.CgmVec3, ptr %35, i32 0, i32 0
  store { <2 x float>, float } %231, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %232, ptr align 8 %38, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #5
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %32, i64 12, i1 false)
  %234 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 0
  %235 = load <2 x float>, ptr %234, align 4
  %236 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 1
  %237 = load float, ptr %236, align 4
  %238 = call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef %233, <2 x float> %235, float %237)
  %239 = getelementptr inbounds %union.CgmVec3, ptr %39, i32 0, i32 0
  store { <2 x float>, float } %238, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %239, ptr align 8 %41, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %39, i64 12, i1 false)
  %240 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 0
  %241 = load <2 x float>, ptr %240, align 4
  %242 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 1
  %243 = load float, ptr %242, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %32, i64 12, i1 false)
  %244 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 0
  %245 = load <2 x float>, ptr %244, align 4
  %246 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 1
  %247 = load float, ptr %246, align 4
  %248 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %241, float %243, <2 x float> %245, float %247)
  %249 = getelementptr inbounds %union.CgmVec3, ptr %42, i32 0, i32 0
  store { <2 x float>, float } %248, ptr %45, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %249, ptr align 8 %45, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %42, i64 12, i1 false)
  %250 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 0
  %251 = load <2 x float>, ptr %250, align 4
  %252 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 1
  %253 = load float, ptr %252, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %35, i64 12, i1 false)
  %254 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 0
  %255 = load <2 x float>, ptr %254, align 4
  %256 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 1
  %257 = load float, ptr %256, align 4
  %258 = call float @CgmVec3_dot(<2 x float> %251, float %253, <2 x float> %255, float %257)
  %259 = fcmp olt float %258, 0.000000e+00
  br i1 %259, label %260, label %424

260:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 96, ptr %48) #5
  %261 = getelementptr inbounds %struct.anon.0, ptr %48, i32 0, i32 0
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.anon.5, ptr %262, i32 0, i32 0
  %264 = load float, ptr %263, align 4, !tbaa !9
  store float %264, ptr %261, align 4, !tbaa !14
  %265 = getelementptr inbounds %struct.anon.0, ptr %48, i32 0, i32 1
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.anon.5, ptr %266, i32 0, i32 1
  %268 = load float, ptr %267, align 4, !tbaa !9
  store float %268, ptr %265, align 4, !tbaa !16
  %269 = getelementptr inbounds %struct.anon.0, ptr %48, i32 0, i32 2
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.anon.5, ptr %270, i32 0, i32 2
  %272 = load float, ptr %271, align 4, !tbaa !9
  store float %272, ptr %269, align 4, !tbaa !17
  %273 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 1
  %274 = getelementptr inbounds %struct.anon.0, ptr %273, i32 0, i32 0
  %275 = load ptr, ptr %6, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.anon.5, ptr %275, i32 0, i32 3
  %277 = load float, ptr %276, align 4, !tbaa !9
  store float %277, ptr %274, align 4, !tbaa !14
  %278 = getelementptr inbounds %struct.anon.0, ptr %273, i32 0, i32 1
  %279 = load ptr, ptr %6, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.anon.5, ptr %279, i32 0, i32 1
  %281 = load float, ptr %280, align 4, !tbaa !9
  store float %281, ptr %278, align 4, !tbaa !16
  %282 = getelementptr inbounds %struct.anon.0, ptr %273, i32 0, i32 2
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.anon.5, ptr %283, i32 0, i32 2
  %285 = load float, ptr %284, align 4, !tbaa !9
  store float %285, ptr %282, align 4, !tbaa !17
  %286 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 2
  %287 = getelementptr inbounds %struct.anon.0, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.anon.5, ptr %288, i32 0, i32 0
  %290 = load float, ptr %289, align 4, !tbaa !9
  store float %290, ptr %287, align 4, !tbaa !14
  %291 = getelementptr inbounds %struct.anon.0, ptr %286, i32 0, i32 1
  %292 = load ptr, ptr %6, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.anon.5, ptr %292, i32 0, i32 4
  %294 = load float, ptr %293, align 4, !tbaa !9
  store float %294, ptr %291, align 4, !tbaa !16
  %295 = getelementptr inbounds %struct.anon.0, ptr %286, i32 0, i32 2
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.anon.5, ptr %296, i32 0, i32 2
  %298 = load float, ptr %297, align 4, !tbaa !9
  store float %298, ptr %295, align 4, !tbaa !17
  %299 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 3
  %300 = getelementptr inbounds %struct.anon.0, ptr %299, i32 0, i32 0
  %301 = load ptr, ptr %6, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.anon.5, ptr %301, i32 0, i32 0
  %303 = load float, ptr %302, align 4, !tbaa !9
  store float %303, ptr %300, align 4, !tbaa !14
  %304 = getelementptr inbounds %struct.anon.0, ptr %299, i32 0, i32 1
  %305 = load ptr, ptr %6, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.anon.5, ptr %305, i32 0, i32 1
  %307 = load float, ptr %306, align 4, !tbaa !9
  store float %307, ptr %304, align 4, !tbaa !16
  %308 = getelementptr inbounds %struct.anon.0, ptr %299, i32 0, i32 2
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.anon.5, ptr %309, i32 0, i32 5
  %311 = load float, ptr %310, align 4, !tbaa !9
  store float %311, ptr %308, align 4, !tbaa !17
  %312 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 4
  %313 = getelementptr inbounds %struct.anon.0, ptr %312, i32 0, i32 0
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.anon.5, ptr %314, i32 0, i32 3
  %316 = load float, ptr %315, align 4, !tbaa !9
  store float %316, ptr %313, align 4, !tbaa !14
  %317 = getelementptr inbounds %struct.anon.0, ptr %312, i32 0, i32 1
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.anon.5, ptr %318, i32 0, i32 4
  %320 = load float, ptr %319, align 4, !tbaa !9
  store float %320, ptr %317, align 4, !tbaa !16
  %321 = getelementptr inbounds %struct.anon.0, ptr %312, i32 0, i32 2
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.anon.5, ptr %322, i32 0, i32 2
  %324 = load float, ptr %323, align 4, !tbaa !9
  store float %324, ptr %321, align 4, !tbaa !17
  %325 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 5
  %326 = getelementptr inbounds %struct.anon.0, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %6, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.anon.5, ptr %327, i32 0, i32 0
  %329 = load float, ptr %328, align 4, !tbaa !9
  store float %329, ptr %326, align 4, !tbaa !14
  %330 = getelementptr inbounds %struct.anon.0, ptr %325, i32 0, i32 1
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.anon.5, ptr %331, i32 0, i32 4
  %333 = load float, ptr %332, align 4, !tbaa !9
  store float %333, ptr %330, align 4, !tbaa !16
  %334 = getelementptr inbounds %struct.anon.0, ptr %325, i32 0, i32 2
  %335 = load ptr, ptr %6, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.anon.5, ptr %335, i32 0, i32 5
  %337 = load float, ptr %336, align 4, !tbaa !9
  store float %337, ptr %334, align 4, !tbaa !17
  %338 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 6
  %339 = getelementptr inbounds %struct.anon.0, ptr %338, i32 0, i32 0
  %340 = load ptr, ptr %6, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.anon.5, ptr %340, i32 0, i32 3
  %342 = load float, ptr %341, align 4, !tbaa !9
  store float %342, ptr %339, align 4, !tbaa !14
  %343 = getelementptr inbounds %struct.anon.0, ptr %338, i32 0, i32 1
  %344 = load ptr, ptr %6, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.anon.5, ptr %344, i32 0, i32 1
  %346 = load float, ptr %345, align 4, !tbaa !9
  store float %346, ptr %343, align 4, !tbaa !16
  %347 = getelementptr inbounds %struct.anon.0, ptr %338, i32 0, i32 2
  %348 = load ptr, ptr %6, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.anon.5, ptr %348, i32 0, i32 5
  %350 = load float, ptr %349, align 4, !tbaa !9
  store float %350, ptr %347, align 4, !tbaa !17
  %351 = getelementptr inbounds %union.CgmVec3, ptr %48, i64 7
  %352 = getelementptr inbounds %struct.anon.0, ptr %351, i32 0, i32 0
  %353 = load ptr, ptr %6, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.anon.5, ptr %353, i32 0, i32 3
  %355 = load float, ptr %354, align 4, !tbaa !9
  store float %355, ptr %352, align 4, !tbaa !14
  %356 = getelementptr inbounds %struct.anon.0, ptr %351, i32 0, i32 1
  %357 = load ptr, ptr %6, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.anon.5, ptr %357, i32 0, i32 4
  %359 = load float, ptr %358, align 4, !tbaa !9
  store float %359, ptr %356, align 4, !tbaa !16
  %360 = getelementptr inbounds %struct.anon.0, ptr %351, i32 0, i32 2
  %361 = load ptr, ptr %6, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.anon.5, ptr %361, i32 0, i32 5
  %363 = load float, ptr %362, align 4, !tbaa !9
  store float %363, ptr %360, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %42, i64 12, i1 false)
  %364 = getelementptr inbounds { <2 x float>, float }, ptr %50, i32 0, i32 0
  %365 = load <2 x float>, ptr %364, align 4
  %366 = getelementptr inbounds { <2 x float>, float }, ptr %50, i32 0, i32 1
  %367 = load float, ptr %366, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %42, i64 12, i1 false)
  %368 = getelementptr inbounds { <2 x float>, float }, ptr %51, i32 0, i32 0
  %369 = load <2 x float>, ptr %368, align 4
  %370 = getelementptr inbounds { <2 x float>, float }, ptr %51, i32 0, i32 1
  %371 = load float, ptr %370, align 4
  %372 = call float @CgmVec3_dot(<2 x float> %365, float %367, <2 x float> %369, float %371)
  store float %372, ptr %49, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #5
  store i32 0, ptr %52, align 4, !tbaa !20
  br label %373

373:                                              ; preds = %420, %260
  %374 = load i32, ptr %52, align 4, !tbaa !20
  %375 = icmp ult i32 %374, 8
  br i1 %375, label %377, label %376

376:                                              ; preds = %373
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #5
  br label %423

377:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 12, ptr %53) #5
  %378 = load i32, ptr %52, align 4, !tbaa !20
  %379 = zext i32 %378 to i64
  %380 = getelementptr inbounds [8 x %union.CgmVec3], ptr %48, i64 0, i64 %379
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %380, i64 12, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %54) #5
  %381 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %53, i64 12, i1 false)
  %382 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 0
  %383 = load <2 x float>, ptr %382, align 4
  %384 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 1
  %385 = load float, ptr %384, align 4
  %386 = call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef %381, <2 x float> %383, float %385)
  %387 = getelementptr inbounds %union.CgmVec3, ptr %54, i32 0, i32 0
  store { <2 x float>, float } %386, ptr %56, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %387, ptr align 8 %56, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %57) #5
  %388 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %54, i64 12, i1 false)
  %389 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 0
  %390 = load <2 x float>, ptr %389, align 4
  %391 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 1
  %392 = load float, ptr %391, align 4
  %393 = call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef %388, <2 x float> %390, float %392)
  %394 = getelementptr inbounds %union.CgmVec3, ptr %57, i32 0, i32 0
  store { <2 x float>, float } %393, ptr %59, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %394, ptr align 8 %59, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %60) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %57, i64 12, i1 false)
  %395 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 0
  %396 = load <2 x float>, ptr %395, align 4
  %397 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 1
  %398 = load float, ptr %397, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %54, i64 12, i1 false)
  %399 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 0
  %400 = load <2 x float>, ptr %399, align 4
  %401 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 1
  %402 = load float, ptr %401, align 4
  %403 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %396, float %398, <2 x float> %400, float %402)
  %404 = getelementptr inbounds %union.CgmVec3, ptr %60, i32 0, i32 0
  store { <2 x float>, float } %403, ptr %63, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %404, ptr align 8 %63, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %60, i64 12, i1 false)
  %405 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 0
  %406 = load <2 x float>, ptr %405, align 4
  %407 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 1
  %408 = load float, ptr %407, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 4 %60, i64 12, i1 false)
  %409 = getelementptr inbounds { <2 x float>, float }, ptr %66, i32 0, i32 0
  %410 = load <2 x float>, ptr %409, align 4
  %411 = getelementptr inbounds { <2 x float>, float }, ptr %66, i32 0, i32 1
  %412 = load float, ptr %411, align 4
  %413 = call float @CgmVec3_dot(<2 x float> %406, float %408, <2 x float> %410, float %412)
  store float %413, ptr %64, align 4, !tbaa !10
  %414 = load float, ptr %64, align 4, !tbaa !10
  %415 = load float, ptr %49, align 4, !tbaa !10
  %416 = fcmp olt float %414, %415
  br i1 %416, label %417, label %419

417:                                              ; preds = %377
  %418 = load float, ptr %64, align 4, !tbaa !10
  store float %418, ptr %49, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %54, i64 12, i1 false), !tbaa.struct !18
  br label %419

419:                                              ; preds = %417, %377
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %60) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %53) #5
  br label %420

420:                                              ; preds = %419
  %421 = load i32, ptr %52, align 4, !tbaa !20
  %422 = add i32 %421, 1
  store i32 %422, ptr %52, align 4, !tbaa !20
  br label %373, !llvm.loop !22

423:                                              ; preds = %376
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %48) #5
  br label %424

424:                                              ; preds = %423, %213
  call void @llvm.lifetime.start.p0(i64 16, ptr %67) #5
  %425 = getelementptr inbounds %struct.CgmSphere, ptr %67, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %425, ptr align 4 %32, i64 12, i1 false), !tbaa.struct !18
  %426 = getelementptr inbounds %struct.CgmSphere, ptr %67, i32 0, i32 1
  %427 = load ptr, ptr %7, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.CgmHoop3d, ptr %427, i32 0, i32 4
  %429 = load float, ptr %428, align 4, !tbaa !19
  store float %429, ptr %426, align 4, !tbaa !24
  %430 = load ptr, ptr %6, align 8, !tbaa !5
  %431 = load ptr, ptr %8, align 8, !tbaa !5
  %432 = load ptr, ptr %9, align 8, !tbaa !5
  %433 = call zeroext i8 @cgm_3d_aabb_vs_sphere(ptr noundef %430, ptr noundef %67, ptr noundef %431, ptr noundef %432)
  store i8 %433, ptr %5, align 1
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %67) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #5
  br label %434

434:                                              ; preds = %424, %212, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  %435 = load i8, ptr %5, align 1
  ret i8 %435
}

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


; 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.CgmSphere = type { %union.anon.7, float }
%union.anon.7 = type { %struct.anon.8 }
%struct.anon.8 = type { float, float, float }

; Function Attrs: nounwind uwtable
declare dso_local float @cgm_max(float noundef, float noundef) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmVec3_sub(<2 x float>, float, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local float @CgmVec3_dot(<2 x float>, float, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_center(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmAabb3d_closest_pt(ptr noundef, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @cgm_3d_aabb_vs_pt(ptr noundef, <2 x float>, float, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @cgm_3d_aabb_vs_sphere(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @cgm_3d_aabb_vs_hoop(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %struct.CgmSphere, align 8
  %.sroa.0150.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2151.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.2151.0.copyload = load float, ptr %.sroa.2151.0..sroa_idx, align 4
  %6 = tail call { <2 x float>, float } @CgmAabb3d_closest_pt(ptr noundef %0, <2 x float> %.sroa.0150.0.copyload, float %.sroa.2151.0.copyload)
  %.fca.0.extract146 = extractvalue { <2 x float>, float } %6, 0
  %.fca.1.extract147 = extractvalue { <2 x float>, float } %6, 1
  %7 = tail call { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef %0)
  %.fca.0.extract136 = extractvalue { <2 x float>, float } %7, 0
  %.fca.1.extract137 = extractvalue { <2 x float>, float } %7, 1
  %.sroa.0140.0.vec.extract = extractelement <2 x float> %.fca.0.extract136, i64 0
  %.sroa.0140.4.vec.extract = extractelement <2 x float> %.fca.0.extract136, i64 1
  %8 = tail call float @cgm_max(float noundef %.sroa.0140.0.vec.extract, float noundef %.sroa.0140.4.vec.extract)
  %9 = tail call float @cgm_max(float noundef %8, float noundef %.fca.1.extract137)
  %.sroa.0133.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2134.0.copyload = load float, ptr %.sroa.2151.0..sroa_idx, align 4
  %10 = tail call zeroext i8 @cgm_3d_aabb_vs_pt(ptr noundef %0, <2 x float> %.sroa.0133.0.copyload, float %.sroa.2134.0.copyload, ptr noundef null, ptr noundef null)
  %.not = icmp eq i8 %10, 0
  br i1 %.not, label %47, label %11

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %1, i64 36
  %13 = load float, ptr %12, align 4, !tbaa !5
  %14 = fcmp ogt float %9, %13
  br i1 %14, label %15, label %47

15:                                               ; preds = %11
  %16 = icmp ne ptr %3, null
  %17 = icmp ne ptr %2, null
  %or.cond = or i1 %17, %16
  br i1 %or.cond, label %18, label %112

18:                                               ; preds = %15
  %19 = tail call { <2 x float>, float } @CgmAabb3d_center(ptr noundef %0)
  %.fca.0.extract122 = extractvalue { <2 x float>, float } %19, 0
  %.fca.1.extract123 = extractvalue { <2 x float>, float } %19, 1
  %20 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.fca.0.extract122, float %.fca.1.extract123)
  %.fca.0.extract116 = extractvalue { <2 x float>, float } %20, 0
  %.fca.1.extract117 = extractvalue { <2 x float>, float } %20, 1
  %.sroa.092.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.293.0.copyload = load float, ptr %.sroa.2151.0..sroa_idx, align 4
  %21 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract116, float %.fca.1.extract117, <2 x float> %.sroa.092.0.copyload, float %.sroa.293.0.copyload)
  %.fca.0.extract88 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract89 = extractvalue { <2 x float>, float } %21, 1
  %.sroa.096.0.vec.extract = extractelement <2 x float> %.fca.0.extract88, i64 0
  %.sroa.096.4.vec.extract = extractelement <2 x float> %.fca.0.extract88, i64 1
  %22 = fcmp ogt float %.sroa.096.0.vec.extract, %.sroa.096.4.vec.extract
  %23 = fcmp ogt float %.sroa.096.0.vec.extract, %.fca.1.extract89
  %or.cond210 = select i1 %22, i1 %23, i1 false
  br i1 %or.cond210, label %24, label %29

24:                                               ; preds = %18
  %25 = fneg float %.sroa.096.0.vec.extract
  %26 = tail call float @llvm.copysign.f32(float 1.000000e+00, float %25)
  %27 = fsub <2 x float> %.fca.0.extract136, %.fca.0.extract88
  %28 = extractelement <2 x float> %27, i64 0
  br label %40

29:                                               ; preds = %18
  %30 = fcmp ogt float %.sroa.096.4.vec.extract, %.sroa.096.0.vec.extract
  %31 = fcmp ogt float %.sroa.096.4.vec.extract, %.fca.1.extract89
  %or.cond211 = select i1 %30, i1 %31, i1 false
  br i1 %or.cond211, label %32, label %36

32:                                               ; preds = %29
  %33 = fneg float %.sroa.096.4.vec.extract
  %34 = tail call float @llvm.copysign.f32(float 1.000000e+00, float %33)
  %35 = fsub float %.sroa.0140.4.vec.extract, %.sroa.096.4.vec.extract
  br label %40

36:                                               ; preds = %29
  %37 = fneg float %.fca.1.extract89
  %38 = tail call float @llvm.copysign.f32(float 1.000000e+00, float %37)
  %39 = fsub float %.fca.1.extract137, %.fca.1.extract89
  br label %40

40:                                               ; preds = %32, %36, %24
  %.0204 = phi float [ %28, %24 ], [ %35, %32 ], [ %39, %36 ]
  %.sroa.0131.0 = phi float [ %26, %24 ], [ 0.000000e+00, %32 ], [ 0.000000e+00, %36 ]
  %.sroa.6132.0 = phi float [ 0.000000e+00, %24 ], [ %34, %32 ], [ 0.000000e+00, %36 ]
  %.sroa.9.0 = phi float [ 0.000000e+00, %24 ], [ 0.000000e+00, %32 ], [ %38, %36 ]
  br i1 %16, label %41, label %45

41:                                               ; preds = %40
  %42 = getelementptr inbounds i8, ptr %1, i64 40
  %43 = load float, ptr %42, align 4, !tbaa !10
  %44 = fadd float %.0204, %43
  store float %44, ptr %3, align 4, !tbaa !11
  br label %45

45:                                               ; preds = %41, %40
  br i1 %17, label %46, label %112

46:                                               ; preds = %45
  store float %.sroa.0131.0, ptr %2, align 4
  %.sroa.6132.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 4
  store float %.sroa.6132.0, ptr %.sroa.6132.0..sroa_idx, align 4
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store float %.sroa.9.0, ptr %.sroa.9.0..sroa_idx, align 4, !tbaa !12
  br label %112

47:                                               ; preds = %11, %4
  %48 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.fca.0.extract146, float %.fca.1.extract147)
  %.fca.0.extract71 = extractvalue { <2 x float>, float } %48, 0
  %.fca.1.extract72 = extractvalue { <2 x float>, float } %48, 1
  %.sroa.065.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.266.0.copyload = load float, ptr %.sroa.2151.0..sroa_idx, align 4
  %49 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract71, float %.fca.1.extract72, <2 x float> %.sroa.065.0.copyload, float %.sroa.266.0.copyload)
  %.fca.0.extract61 = extractvalue { <2 x float>, float } %49, 0
  %.fca.1.extract62 = extractvalue { <2 x float>, float } %49, 1
  %50 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef %0, <2 x float> %.fca.0.extract71, float %.fca.1.extract72)
  %.fca.0.extract53 = extractvalue { <2 x float>, float } %50, 0
  %.fca.1.extract54 = extractvalue { <2 x float>, float } %50, 1
  %51 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract53, float %.fca.1.extract54, <2 x float> %.fca.0.extract71, float %.fca.1.extract72)
  %.fca.0.extract41 = extractvalue { <2 x float>, float } %51, 0
  %.fca.1.extract42 = extractvalue { <2 x float>, float } %51, 1
  %52 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract41, float %.fca.1.extract42, <2 x float> %.fca.0.extract61, float %.fca.1.extract62)
  %53 = fcmp olt float %52, 0.000000e+00
  br i1 %53, label %54, label %107

54:                                               ; preds = %47
  %55 = load float, ptr %0, align 4, !tbaa !12
  %.sroa.0.0.vec.insert = insertelement <2 x float> <float poison, float undef>, float %55, i64 0
  %56 = getelementptr inbounds i8, ptr %0, i64 4
  %57 = load float, ptr %56, align 4, !tbaa !12
  %.sroa.0.4.vec.insert = insertelement <2 x float> %.sroa.0.0.vec.insert, float %57, i64 1
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  %59 = load float, ptr %58, align 4, !tbaa !12
  %60 = getelementptr inbounds i8, ptr %0, i64 12
  %61 = load float, ptr %60, align 4, !tbaa !12
  %.sroa.7.12.vec.insert = insertelement <2 x float> <float poison, float undef>, float %61, i64 0
  %.sroa.7.16.vec.insert = insertelement <2 x float> %.sroa.7.12.vec.insert, float %57, i64 1
  %62 = getelementptr inbounds i8, ptr %0, i64 16
  %63 = load float, ptr %62, align 4, !tbaa !12
  %.sroa.12.28.vec.insert = insertelement <2 x float> %.sroa.0.0.vec.insert, float %63, i64 1
  %64 = getelementptr inbounds i8, ptr %0, i64 20
  %65 = load float, ptr %64, align 4, !tbaa !12
  %.sroa.22.52.vec.insert = insertelement <2 x float> %.sroa.7.12.vec.insert, float %63, i64 1
  %66 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract41, float %.fca.1.extract42, <2 x float> %.fca.0.extract41, float %.fca.1.extract42)
  %67 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.0.4.vec.insert, float %59)
  %.fca.0.extract20 = extractvalue { <2 x float>, float } %67, 0
  %.fca.1.extract21 = extractvalue { <2 x float>, float } %67, 1
  %68 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20, float %.fca.1.extract21)
  %.fca.0.extract13 = extractvalue { <2 x float>, float } %68, 0
  %.fca.1.extract14 = extractvalue { <2 x float>, float } %68, 1
  %69 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13, float %.fca.1.extract14, <2 x float> %.fca.0.extract20, float %.fca.1.extract21)
  %.fca.0.extract = extractvalue { <2 x float>, float } %69, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %69, 1
  %70 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract, float %.fca.1.extract, <2 x float> %.fca.0.extract, float %.fca.1.extract)
  %71 = fcmp olt float %70, %66
  %.1 = select i1 %71, float %70, float %66
  %.sroa.077.1 = select i1 %71, <2 x float> %.fca.0.extract20, <2 x float> %.fca.0.extract71
  %.sroa.8.1 = select i1 %71, float %.fca.1.extract21, float %.fca.1.extract72
  %72 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.7.16.vec.insert, float %59)
  %.fca.0.extract20.1 = extractvalue { <2 x float>, float } %72, 0
  %.fca.1.extract21.1 = extractvalue { <2 x float>, float } %72, 1
  %73 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.1, float %.fca.1.extract21.1)
  %.fca.0.extract13.1 = extractvalue { <2 x float>, float } %73, 0
  %.fca.1.extract14.1 = extractvalue { <2 x float>, float } %73, 1
  %74 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.1, float %.fca.1.extract14.1, <2 x float> %.fca.0.extract20.1, float %.fca.1.extract21.1)
  %.fca.0.extract.1 = extractvalue { <2 x float>, float } %74, 0
  %.fca.1.extract.1 = extractvalue { <2 x float>, float } %74, 1
  %75 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.1, float %.fca.1.extract.1, <2 x float> %.fca.0.extract.1, float %.fca.1.extract.1)
  %76 = fcmp olt float %75, %.1
  %.1.1 = select i1 %76, float %75, float %.1
  %.sroa.077.1.1 = select i1 %76, <2 x float> %.fca.0.extract20.1, <2 x float> %.sroa.077.1
  %.sroa.8.1.1 = select i1 %76, float %.fca.1.extract21.1, float %.sroa.8.1
  %77 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.12.28.vec.insert, float %59)
  %.fca.0.extract20.2 = extractvalue { <2 x float>, float } %77, 0
  %.fca.1.extract21.2 = extractvalue { <2 x float>, float } %77, 1
  %78 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.2, float %.fca.1.extract21.2)
  %.fca.0.extract13.2 = extractvalue { <2 x float>, float } %78, 0
  %.fca.1.extract14.2 = extractvalue { <2 x float>, float } %78, 1
  %79 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.2, float %.fca.1.extract14.2, <2 x float> %.fca.0.extract20.2, float %.fca.1.extract21.2)
  %.fca.0.extract.2 = extractvalue { <2 x float>, float } %79, 0
  %.fca.1.extract.2 = extractvalue { <2 x float>, float } %79, 1
  %80 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.2, float %.fca.1.extract.2, <2 x float> %.fca.0.extract.2, float %.fca.1.extract.2)
  %81 = fcmp olt float %80, %.1.1
  %.1.2 = select i1 %81, float %80, float %.1.1
  %.sroa.077.1.2 = select i1 %81, <2 x float> %.fca.0.extract20.2, <2 x float> %.sroa.077.1.1
  %.sroa.8.1.2 = select i1 %81, float %.fca.1.extract21.2, float %.sroa.8.1.1
  %82 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.0.4.vec.insert, float %65)
  %.fca.0.extract20.3 = extractvalue { <2 x float>, float } %82, 0
  %.fca.1.extract21.3 = extractvalue { <2 x float>, float } %82, 1
  %83 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.3, float %.fca.1.extract21.3)
  %.fca.0.extract13.3 = extractvalue { <2 x float>, float } %83, 0
  %.fca.1.extract14.3 = extractvalue { <2 x float>, float } %83, 1
  %84 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.3, float %.fca.1.extract14.3, <2 x float> %.fca.0.extract20.3, float %.fca.1.extract21.3)
  %.fca.0.extract.3 = extractvalue { <2 x float>, float } %84, 0
  %.fca.1.extract.3 = extractvalue { <2 x float>, float } %84, 1
  %85 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.3, float %.fca.1.extract.3, <2 x float> %.fca.0.extract.3, float %.fca.1.extract.3)
  %86 = fcmp olt float %85, %.1.2
  %.1.3 = select i1 %86, float %85, float %.1.2
  %.sroa.077.1.3 = select i1 %86, <2 x float> %.fca.0.extract20.3, <2 x float> %.sroa.077.1.2
  %.sroa.8.1.3 = select i1 %86, float %.fca.1.extract21.3, float %.sroa.8.1.2
  %87 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.22.52.vec.insert, float %59)
  %.fca.0.extract20.4 = extractvalue { <2 x float>, float } %87, 0
  %.fca.1.extract21.4 = extractvalue { <2 x float>, float } %87, 1
  %88 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.4, float %.fca.1.extract21.4)
  %.fca.0.extract13.4 = extractvalue { <2 x float>, float } %88, 0
  %.fca.1.extract14.4 = extractvalue { <2 x float>, float } %88, 1
  %89 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.4, float %.fca.1.extract14.4, <2 x float> %.fca.0.extract20.4, float %.fca.1.extract21.4)
  %.fca.0.extract.4 = extractvalue { <2 x float>, float } %89, 0
  %.fca.1.extract.4 = extractvalue { <2 x float>, float } %89, 1
  %90 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.4, float %.fca.1.extract.4, <2 x float> %.fca.0.extract.4, float %.fca.1.extract.4)
  %91 = fcmp olt float %90, %.1.3
  %.1.4 = select i1 %91, float %90, float %.1.3
  %.sroa.077.1.4 = select i1 %91, <2 x float> %.fca.0.extract20.4, <2 x float> %.sroa.077.1.3
  %.sroa.8.1.4 = select i1 %91, float %.fca.1.extract21.4, float %.sroa.8.1.3
  %92 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.12.28.vec.insert, float %65)
  %.fca.0.extract20.5 = extractvalue { <2 x float>, float } %92, 0
  %.fca.1.extract21.5 = extractvalue { <2 x float>, float } %92, 1
  %93 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.5, float %.fca.1.extract21.5)
  %.fca.0.extract13.5 = extractvalue { <2 x float>, float } %93, 0
  %.fca.1.extract14.5 = extractvalue { <2 x float>, float } %93, 1
  %94 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.5, float %.fca.1.extract14.5, <2 x float> %.fca.0.extract20.5, float %.fca.1.extract21.5)
  %.fca.0.extract.5 = extractvalue { <2 x float>, float } %94, 0
  %.fca.1.extract.5 = extractvalue { <2 x float>, float } %94, 1
  %95 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.5, float %.fca.1.extract.5, <2 x float> %.fca.0.extract.5, float %.fca.1.extract.5)
  %96 = fcmp olt float %95, %.1.4
  %.1.5 = select i1 %96, float %95, float %.1.4
  %.sroa.077.1.5 = select i1 %96, <2 x float> %.fca.0.extract20.5, <2 x float> %.sroa.077.1.4
  %.sroa.8.1.5 = select i1 %96, float %.fca.1.extract21.5, float %.sroa.8.1.4
  %97 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.7.16.vec.insert, float %65)
  %.fca.0.extract20.6 = extractvalue { <2 x float>, float } %97, 0
  %.fca.1.extract21.6 = extractvalue { <2 x float>, float } %97, 1
  %98 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.6, float %.fca.1.extract21.6)
  %.fca.0.extract13.6 = extractvalue { <2 x float>, float } %98, 0
  %.fca.1.extract14.6 = extractvalue { <2 x float>, float } %98, 1
  %99 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.6, float %.fca.1.extract14.6, <2 x float> %.fca.0.extract20.6, float %.fca.1.extract21.6)
  %.fca.0.extract.6 = extractvalue { <2 x float>, float } %99, 0
  %.fca.1.extract.6 = extractvalue { <2 x float>, float } %99, 1
  %100 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.6, float %.fca.1.extract.6, <2 x float> %.fca.0.extract.6, float %.fca.1.extract.6)
  %101 = fcmp olt float %100, %.1.5
  %.1.6 = select i1 %101, float %100, float %.1.5
  %.sroa.077.1.6 = select i1 %101, <2 x float> %.fca.0.extract20.6, <2 x float> %.sroa.077.1.5
  %.sroa.8.1.6 = select i1 %101, float %.fca.1.extract21.6, float %.sroa.8.1.5
  %102 = tail call { <2 x float>, float } @CgmHoop3d_closest_pt(ptr noundef nonnull %1, <2 x float> %.sroa.22.52.vec.insert, float %65)
  %.fca.0.extract20.7 = extractvalue { <2 x float>, float } %102, 0
  %.fca.1.extract21.7 = extractvalue { <2 x float>, float } %102, 1
  %103 = tail call { <2 x float>, float } @CgmAabb3d_clamp_pt(ptr noundef nonnull %0, <2 x float> %.fca.0.extract20.7, float %.fca.1.extract21.7)
  %.fca.0.extract13.7 = extractvalue { <2 x float>, float } %103, 0
  %.fca.1.extract14.7 = extractvalue { <2 x float>, float } %103, 1
  %104 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract13.7, float %.fca.1.extract14.7, <2 x float> %.fca.0.extract20.7, float %.fca.1.extract21.7)
  %.fca.0.extract.7 = extractvalue { <2 x float>, float } %104, 0
  %.fca.1.extract.7 = extractvalue { <2 x float>, float } %104, 1
  %105 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract.7, float %.fca.1.extract.7, <2 x float> %.fca.0.extract.7, float %.fca.1.extract.7)
  %106 = fcmp olt float %105, %.1.6
  %.sroa.077.1.7 = select i1 %106, <2 x float> %.fca.0.extract20.7, <2 x float> %.sroa.077.1.6
  %.sroa.8.1.7 = select i1 %106, float %.fca.1.extract21.7, float %.sroa.8.1.6
  br label %107

107:                                              ; preds = %54, %47
  %.sroa.077.2 = phi <2 x float> [ %.sroa.077.1.7, %54 ], [ %.fca.0.extract71, %47 ]
  %.sroa.8.2 = phi float [ %.sroa.8.1.7, %54 ], [ %.fca.1.extract72, %47 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  store <2 x float> %.sroa.077.2, ptr %5, align 8
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store float %.sroa.8.2, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !12
  %108 = getelementptr inbounds i8, ptr %5, i64 12
  %109 = getelementptr inbounds i8, ptr %1, i64 40
  %110 = load float, ptr %109, align 4, !tbaa !10
  store float %110, ptr %108, align 4, !tbaa !13
  %111 = call zeroext i8 @cgm_3d_aabb_vs_sphere(ptr noundef %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %112

112:                                              ; preds = %45, %46, %15, %107
  %.0 = phi i8 [ %111, %107 ], [ 1, %15 ], [ 1, %46 ], [ 1, %45 ]
  ret i8 %.0
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 36}
!6 = !{!"CgmHoop3d", !7, i64 0, !7, i64 12, !7, i64 24, !9, i64 36, !9, i64 40}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"float", !7, i64 0}
!10 = !{!6, !9, i64 40}
!11 = !{!9, !9, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !9, i64 12}
!14 = !{!"CgmSphere", !7, i64 0, !9, i64 12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass