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

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

@stderr = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@__const.cgm_3d_aabb_vs_swept_sphere.u0 = external hidden unnamed_addr constant %union.CgmVec3, align 4
@__const.cgm_3d_aabb_vs_swept_sphere.u1 = external hidden unnamed_addr constant %union.CgmVec3, align 4
@__const.cgm_3d_aabb_vs_swept_sphere.u2 = external hidden unnamed_addr constant %union.CgmVec3, align 4

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

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

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

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

; 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) #3

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

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

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

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

; 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 { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float>, float, float noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmVec3_norm(<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 } @CgmVec3_mul_cross(<2 x float>, float, <2 x float>, float) #4

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

; Function Attrs: noreturn nounwind
declare void @abort() #6

; 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
define dso_local zeroext i8 @cgm_3d_aabb_vs_swept_sphere(ptr noundef %0, ptr noundef %1, <2 x float> %2, float %3, float noundef %4, ptr noundef %5, ptr noundef %6) #4 {
  %8 = alloca i8, align 1
  %9 = alloca %union.CgmVec3, align 4
  %10 = alloca { <2 x float>, float }, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %union.CgmVec3, align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca %union.CgmVec3, align 4
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca %union.CgmVec3, align 4
  %21 = alloca { <2 x float>, float }, align 4
  %22 = alloca { <2 x float>, float }, align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca %union.CgmVec3, align 4
  %25 = alloca %union.CgmVec3, align 4
  %26 = alloca %union.CgmVec3, align 4
  %27 = alloca { <2 x float>, float }, align 4
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca { <2 x float>, float }, align 4
  %30 = alloca { <2 x float>, float }, align 4
  %31 = alloca { <2 x float>, float }, align 8
  %32 = alloca %union.CgmVec3, align 4
  %33 = alloca { <2 x float>, float }, align 4
  %34 = alloca { <2 x float>, float }, align 4
  %35 = alloca { <2 x float>, float }, align 8
  %36 = alloca %union.CgmVec3, align 4
  %37 = alloca %union.CgmVec3, align 4
  %38 = alloca %union.CgmVec3, align 4
  %39 = alloca [3 x [2 x %union.CgmVec3]], align 16
  %40 = alloca %union.CgmVec3, align 4
  %41 = alloca %union.CgmVec3, align 4
  %42 = alloca %union.CgmVec3, align 4
  %43 = alloca %union.CgmVec3, 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 { <2 x float>, float }, align 4
  %49 = alloca { <2 x float>, float }, align 8
  %50 = alloca { <2 x float>, float }, align 4
  %51 = alloca { <2 x float>, float }, align 4
  %52 = alloca { <2 x float>, float }, align 8
  %53 = alloca { <2 x float>, float }, align 4
  %54 = alloca { <2 x float>, float }, align 8
  %55 = alloca %union.CgmVec3, align 4
  %56 = alloca %union.CgmVec3, align 4
  %57 = alloca %union.CgmVec3, align 4
  %58 = alloca %union.CgmVec3, align 4
  %59 = alloca { <2 x float>, float }, align 4
  %60 = alloca { <2 x float>, float }, align 8
  %61 = alloca { <2 x float>, float }, align 4
  %62 = alloca { <2 x float>, float }, align 4
  %63 = alloca { <2 x float>, float }, align 4
  %64 = alloca { <2 x float>, float }, align 8
  %65 = alloca { <2 x float>, float }, align 4
  %66 = alloca { <2 x float>, float }, align 4
  %67 = alloca { <2 x float>, float }, align 8
  %68 = alloca { <2 x float>, float }, align 4
  %69 = alloca { <2 x float>, float }, align 8
  %70 = alloca [5 x %union.CgmVec3], align 16
  %71 = alloca %union.CgmVec3, align 4
  %72 = alloca float, align 4
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca %union.CgmVec3, align 4
  %76 = alloca %union.CgmVec3, align 4
  %77 = alloca { <2 x float>, float }, align 4
  %78 = alloca { <2 x float>, float }, align 4
  %79 = alloca { <2 x float>, float }, align 8
  %80 = alloca float, align 4
  %81 = alloca { <2 x float>, float }, align 4
  %82 = alloca { <2 x float>, float }, align 4
  %83 = alloca %union.CgmVec3, align 4
  %84 = alloca { <2 x float>, float }, align 4
  %85 = alloca { <2 x float>, float }, align 8
  %86 = alloca float, align 4
  %87 = alloca { <2 x float>, float }, align 4
  %88 = alloca { <2 x float>, float }, align 4
  %89 = alloca float, align 4
  %90 = alloca { <2 x float>, float }, align 4
  %91 = alloca { <2 x float>, float }, align 4
  %92 = alloca float, align 4
  %93 = alloca { <2 x float>, float }, align 4
  %94 = alloca { <2 x float>, float }, align 4
  %95 = alloca { <2 x float>, float }, align 4
  %96 = alloca { <2 x float>, float }, align 4
  %97 = alloca { <2 x float>, float }, align 4
  %98 = alloca { <2 x float>, float }, align 4
  %99 = alloca float, align 4
  %100 = alloca float, align 4
  %101 = alloca float, align 4
  %102 = alloca { <2 x float>, float }, align 4
  %103 = alloca { <2 x float>, float }, align 4
  %104 = alloca float, align 4
  %105 = alloca %union.CgmVec3, align 4
  %106 = alloca { <2 x float>, float }, align 4
  %107 = alloca { <2 x float>, float }, align 8
  %108 = alloca float, align 4
  %109 = alloca { <2 x float>, float }, align 4
  %110 = alloca { <2 x float>, float }, align 4
  %111 = alloca %union.CgmVec3, align 4
  %112 = alloca i1, align 1
  %113 = alloca { <2 x float>, float }, align 4
  %114 = alloca { <2 x float>, float }, align 8
  %115 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 0
  store <2 x float> %2, ptr %115, align 4
  %116 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 1
  store float %3, ptr %116, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %10, i64 12, i1 false)
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store float %4, ptr %13, align 4, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %117 = load float, ptr %13, align 4, !tbaa !9
  %118 = call float @llvm.fabs.f32(float %117) #7
  %119 = fcmp oeq float %118, 0x7FF0000000000000
  %120 = bitcast float %117 to i32
  %121 = icmp slt i32 %120, 0
  %122 = select i1 %121, i32 -1, i32 1
  %123 = select i1 %119, i32 %122, i32 0
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %128

125:                                              ; preds = %7
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.12) #8
  call void @abort() #9
  unreachable

128:                                              ; preds = %7
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #8
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = call { <2 x float>, float } @CgmAabb3d_center(ptr noundef %129)
  %131 = getelementptr inbounds %union.CgmVec3, ptr %16, i32 0, i32 0
  store { <2 x float>, float } %130, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %131, ptr align 8 %17, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #8
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = call { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef %132)
  %134 = getelementptr inbounds %union.CgmVec3, ptr %18, i32 0, i32 0
  store { <2 x float>, float } %133, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 8 %19, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #8
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.CgmSphere, ptr %135, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %136, i64 12, i1 false)
  %137 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %138 = load <2 x float>, ptr %137, align 4
  %139 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %140 = load float, ptr %139, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %16, i64 12, i1 false)
  %141 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %142 = load <2 x float>, ptr %141, align 4
  %143 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %144 = load float, ptr %143, align 4
  %145 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %138, float %140, <2 x float> %142, float %144)
  %146 = getelementptr inbounds %union.CgmVec3, ptr %20, i32 0, i32 0
  store { <2 x float>, float } %145, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %146, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #8
  %147 = load float, ptr %13, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %9, i64 12, i1 false)
  %148 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 0
  %149 = load <2 x float>, ptr %148, align 4
  %150 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 1
  %151 = load float, ptr %150, align 4
  %152 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %149, float %151, float noundef %147)
  %153 = getelementptr inbounds %union.CgmVec3, ptr %26, i32 0, i32 0
  store { <2 x float>, float } %152, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %153, ptr align 8 %28, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %20, i64 12, i1 false)
  %154 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 0
  %155 = load <2 x float>, ptr %154, align 4
  %156 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 1
  %157 = load float, ptr %156, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %26, i64 12, i1 false)
  %158 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 0
  %159 = load <2 x float>, ptr %158, align 4
  %160 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 1
  %161 = load float, ptr %160, align 4
  %162 = call { <2 x float>, float } @CgmVec3_add(<2 x float> %155, float %157, <2 x float> %159, float %161)
  %163 = getelementptr inbounds %union.CgmVec3, ptr %25, i32 0, i32 0
  store { <2 x float>, float } %162, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %163, ptr align 8 %31, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %25, i64 12, i1 false)
  %164 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 0
  %165 = load <2 x float>, ptr %164, align 4
  %166 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 1
  %167 = load float, ptr %166, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %24, i64 12, i1 false)
  %168 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 0
  %169 = load <2 x float>, ptr %168, align 4
  %170 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 1
  %171 = load float, ptr %170, align 4
  %172 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %165, float %167, <2 x float> %169, float %171)
  %173 = getelementptr inbounds %union.CgmVec3, ptr %32, i32 0, i32 0
  store { <2 x float>, float } %172, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %173, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 @__const.cgm_3d_aabb_vs_swept_sphere.u0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 @__const.cgm_3d_aabb_vs_swept_sphere.u1, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %38) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 @__const.cgm_3d_aabb_vs_swept_sphere.u2, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr %39) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %36, i64 12, i1 false), !tbaa.struct !11
  %174 = getelementptr inbounds %union.CgmVec3, ptr %39, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %174, ptr align 4 %32, i64 12, i1 false), !tbaa.struct !11
  %175 = getelementptr inbounds [2 x %union.CgmVec3], ptr %39, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %175, ptr align 4 %37, i64 12, i1 false), !tbaa.struct !11
  %176 = getelementptr inbounds %union.CgmVec3, ptr %175, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %176, ptr align 4 %32, i64 12, i1 false), !tbaa.struct !11
  %177 = getelementptr inbounds [2 x %union.CgmVec3], ptr %39, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %177, ptr align 4 %38, i64 12, i1 false), !tbaa.struct !11
  %178 = getelementptr inbounds %union.CgmVec3, ptr %177, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %178, ptr align 4 %32, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %18, i64 12, i1 false)
  %179 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 0
  %180 = load <2 x float>, ptr %179, align 4
  %181 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 1
  %182 = load float, ptr %181, align 4
  %183 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %180, float %182)
  %184 = getelementptr inbounds %union.CgmVec3, ptr %43, i32 0, i32 0
  store { <2 x float>, float } %183, ptr %45, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %184, ptr align 8 %45, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %24, i64 12, i1 false)
  %185 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 0
  %186 = load <2 x float>, ptr %185, align 4
  %187 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 1
  %188 = load float, ptr %187, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %43, i64 12, i1 false)
  %189 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 0
  %190 = load <2 x float>, ptr %189, align 4
  %191 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 1
  %192 = load float, ptr %191, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %18, i64 12, i1 false)
  %193 = getelementptr inbounds { <2 x float>, float }, ptr %48, i32 0, i32 0
  %194 = load <2 x float>, ptr %193, align 4
  %195 = getelementptr inbounds { <2 x float>, float }, ptr %48, i32 0, i32 1
  %196 = load float, ptr %195, align 4
  %197 = call { <2 x float>, float } @CgmVec3_clamp(<2 x float> %186, float %188, <2 x float> %190, float %192, <2 x float> %194, float %196)
  %198 = getelementptr inbounds %union.CgmVec3, ptr %42, i32 0, i32 0
  store { <2 x float>, float } %197, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %198, ptr align 8 %49, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %24, i64 12, i1 false)
  %199 = getelementptr inbounds { <2 x float>, float }, ptr %50, i32 0, i32 0
  %200 = load <2 x float>, ptr %199, align 4
  %201 = getelementptr inbounds { <2 x float>, float }, ptr %50, i32 0, i32 1
  %202 = load float, ptr %201, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 4 %42, i64 12, i1 false)
  %203 = getelementptr inbounds { <2 x float>, float }, ptr %51, i32 0, i32 0
  %204 = load <2 x float>, ptr %203, align 4
  %205 = getelementptr inbounds { <2 x float>, float }, ptr %51, i32 0, i32 1
  %206 = load float, ptr %205, align 4
  %207 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %200, float %202, <2 x float> %204, float %206)
  %208 = getelementptr inbounds %union.CgmVec3, ptr %41, i32 0, i32 0
  store { <2 x float>, float } %207, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %208, ptr align 8 %52, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %41, i64 12, i1 false)
  %209 = getelementptr inbounds { <2 x float>, float }, ptr %53, i32 0, i32 0
  %210 = load <2 x float>, ptr %209, align 4
  %211 = getelementptr inbounds { <2 x float>, float }, ptr %53, i32 0, i32 1
  %212 = load float, ptr %211, align 4
  %213 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %210, float %212)
  %214 = getelementptr inbounds %union.CgmVec3, ptr %40, i32 0, i32 0
  store { <2 x float>, float } %213, ptr %54, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %214, ptr align 8 %54, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %18, i64 12, i1 false)
  %215 = getelementptr inbounds { <2 x float>, float }, ptr %59, i32 0, i32 0
  %216 = load <2 x float>, ptr %215, align 4
  %217 = getelementptr inbounds { <2 x float>, float }, ptr %59, i32 0, i32 1
  %218 = load float, ptr %217, align 4
  %219 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %216, float %218)
  %220 = getelementptr inbounds %union.CgmVec3, ptr %58, i32 0, i32 0
  store { <2 x float>, float } %219, ptr %60, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %220, ptr align 8 %60, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %25, i64 12, i1 false)
  %221 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 0
  %222 = load <2 x float>, ptr %221, align 4
  %223 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 1
  %224 = load float, ptr %223, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %58, i64 12, i1 false)
  %225 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 0
  %226 = load <2 x float>, ptr %225, align 4
  %227 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 1
  %228 = load float, ptr %227, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %18, i64 12, i1 false)
  %229 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 0
  %230 = load <2 x float>, ptr %229, align 4
  %231 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 1
  %232 = load float, ptr %231, align 4
  %233 = call { <2 x float>, float } @CgmVec3_clamp(<2 x float> %222, float %224, <2 x float> %226, float %228, <2 x float> %230, float %232)
  %234 = getelementptr inbounds %union.CgmVec3, ptr %57, i32 0, i32 0
  store { <2 x float>, float } %233, ptr %64, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %234, ptr align 8 %64, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %25, i64 12, i1 false)
  %235 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 0
  %236 = load <2 x float>, ptr %235, align 4
  %237 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 1
  %238 = load float, ptr %237, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 4 %57, i64 12, i1 false)
  %239 = getelementptr inbounds { <2 x float>, float }, ptr %66, i32 0, i32 0
  %240 = load <2 x float>, ptr %239, align 4
  %241 = getelementptr inbounds { <2 x float>, float }, ptr %66, i32 0, i32 1
  %242 = load float, ptr %241, align 4
  %243 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %236, float %238, <2 x float> %240, float %242)
  %244 = getelementptr inbounds %union.CgmVec3, ptr %56, i32 0, i32 0
  store { <2 x float>, float } %243, ptr %67, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %244, ptr align 8 %67, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 4 %56, i64 12, i1 false)
  %245 = getelementptr inbounds { <2 x float>, float }, ptr %68, i32 0, i32 0
  %246 = load <2 x float>, ptr %245, align 4
  %247 = getelementptr inbounds { <2 x float>, float }, ptr %68, i32 0, i32 1
  %248 = load float, ptr %247, align 4
  %249 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %246, float %248)
  %250 = getelementptr inbounds %union.CgmVec3, ptr %55, i32 0, i32 0
  store { <2 x float>, float } %249, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %250, ptr align 8 %69, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 60, ptr %70) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %36, i64 12, i1 false), !tbaa.struct !11
  %251 = getelementptr inbounds %union.CgmVec3, ptr %70, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %251, ptr align 4 %37, i64 12, i1 false), !tbaa.struct !11
  %252 = getelementptr inbounds %union.CgmVec3, ptr %70, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %252, ptr align 4 %38, i64 12, i1 false), !tbaa.struct !11
  %253 = getelementptr inbounds %union.CgmVec3, ptr %70, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %253, ptr align 4 %40, i64 12, i1 false), !tbaa.struct !11
  %254 = getelementptr inbounds %union.CgmVec3, ptr %70, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %254, ptr align 4 %55, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %71) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #8
  store float 0x7FF0000000000000, ptr %72, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #8
  store i32 0, ptr %73, align 4, !tbaa !13
  br label %255

255:                                              ; preds = %457, %128
  %256 = load i32, ptr %73, align 4, !tbaa !13
  %257 = icmp ult i32 %256, 8
  br i1 %257, label %259, label %258

258:                                              ; preds = %255
  store i32 2, ptr %74, align 4
  br label %460

259:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 12, ptr %75) #8
  %260 = load i32, ptr %73, align 4, !tbaa !13
  %261 = icmp ult i32 %260, 3
  br i1 %261, label %262, label %304

262:                                              ; preds = %259
  %263 = load i32, ptr %73, align 4, !tbaa !13
  %264 = zext i32 %263 to i64
  %265 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %39, i64 0, i64 %264
  %266 = getelementptr inbounds [2 x %union.CgmVec3], ptr %265, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 8 %266, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %76) #8
  %267 = load i32, ptr %73, align 4, !tbaa !13
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %39, i64 0, i64 %268
  %270 = getelementptr inbounds [2 x %union.CgmVec3], ptr %269, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %75, i64 12, i1 false)
  %271 = getelementptr inbounds { <2 x float>, float }, ptr %77, i32 0, i32 0
  %272 = load <2 x float>, ptr %271, align 4
  %273 = getelementptr inbounds { <2 x float>, float }, ptr %77, i32 0, i32 1
  %274 = load float, ptr %273, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %270, i64 12, i1 false)
  %275 = getelementptr inbounds { <2 x float>, float }, ptr %78, i32 0, i32 0
  %276 = load <2 x float>, ptr %275, align 4
  %277 = getelementptr inbounds { <2 x float>, float }, ptr %78, i32 0, i32 1
  %278 = load float, ptr %277, align 4
  %279 = call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %272, float %274, <2 x float> %276, float %278)
  %280 = getelementptr inbounds %union.CgmVec3, ptr %76, i32 0, i32 0
  store { <2 x float>, float } %279, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %280, ptr align 8 %79, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 4 %76, i64 12, i1 false)
  %281 = getelementptr inbounds { <2 x float>, float }, ptr %81, i32 0, i32 0
  %282 = load <2 x float>, ptr %281, align 4
  %283 = getelementptr inbounds { <2 x float>, float }, ptr %81, i32 0, i32 1
  %284 = load float, ptr %283, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %76, i64 12, i1 false)
  %285 = getelementptr inbounds { <2 x float>, float }, ptr %82, i32 0, i32 0
  %286 = load <2 x float>, ptr %285, align 4
  %287 = getelementptr inbounds { <2 x float>, float }, ptr %82, i32 0, i32 1
  %288 = load float, ptr %287, align 4
  %289 = call float @CgmVec3_dot(<2 x float> %282, float %284, <2 x float> %286, float %288)
  store float %289, ptr %80, align 4, !tbaa !9
  %290 = load float, ptr %80, align 4, !tbaa !9
  %291 = call zeroext i8 @cgm_approx_eq(float noundef %290, float noundef 0.000000e+00)
  %292 = icmp ne i8 %291, 0
  br i1 %292, label %293, label %294

293:                                              ; preds = %262
  store i32 4, ptr %74, align 4
  br label %301

294:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 12, ptr %83) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %84, ptr align 4 %76, i64 12, i1 false)
  %295 = getelementptr inbounds { <2 x float>, float }, ptr %84, i32 0, i32 0
  %296 = load <2 x float>, ptr %295, align 4
  %297 = getelementptr inbounds { <2 x float>, float }, ptr %84, i32 0, i32 1
  %298 = load float, ptr %297, align 4
  %299 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %296, float %298)
  %300 = getelementptr inbounds %union.CgmVec3, ptr %83, i32 0, i32 0
  store { <2 x float>, float } %299, ptr %85, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %300, ptr align 8 %85, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %83, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %83) #8
  store i32 0, ptr %74, align 4
  br label %301

301:                                              ; preds = %294, %293
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %76) #8
  %302 = load i32, ptr %74, align 4
  switch i32 %302, label %454 [
    i32 0, label %303
  ]

303:                                              ; preds = %301
  br label %309

304:                                              ; preds = %259
  %305 = load i32, ptr %73, align 4, !tbaa !13
  %306 = sub i32 %305, 3
  %307 = zext i32 %306 to i64
  %308 = getelementptr inbounds [5 x %union.CgmVec3], ptr %70, i64 0, i64 %307
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %308, i64 12, i1 false), !tbaa.struct !11
  br label %309

309:                                              ; preds = %304, %303
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 4 %24, i64 12, i1 false)
  %310 = getelementptr inbounds { <2 x float>, float }, ptr %87, i32 0, i32 0
  %311 = load <2 x float>, ptr %310, align 4
  %312 = getelementptr inbounds { <2 x float>, float }, ptr %87, i32 0, i32 1
  %313 = load float, ptr %312, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %75, i64 12, i1 false)
  %314 = getelementptr inbounds { <2 x float>, float }, ptr %88, i32 0, i32 0
  %315 = load <2 x float>, ptr %314, align 4
  %316 = getelementptr inbounds { <2 x float>, float }, ptr %88, i32 0, i32 1
  %317 = load float, ptr %316, align 4
  %318 = call float @CgmVec3_dot(<2 x float> %311, float %313, <2 x float> %315, float %317)
  store float %318, ptr %86, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %90, ptr align 4 %25, i64 12, i1 false)
  %319 = getelementptr inbounds { <2 x float>, float }, ptr %90, i32 0, i32 0
  %320 = load <2 x float>, ptr %319, align 4
  %321 = getelementptr inbounds { <2 x float>, float }, ptr %90, i32 0, i32 1
  %322 = load float, ptr %321, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 4 %75, i64 12, i1 false)
  %323 = getelementptr inbounds { <2 x float>, float }, ptr %91, i32 0, i32 0
  %324 = load <2 x float>, ptr %323, align 4
  %325 = getelementptr inbounds { <2 x float>, float }, ptr %91, i32 0, i32 1
  %326 = load float, ptr %325, align 4
  %327 = call float @CgmVec3_dot(<2 x float> %320, float %322, <2 x float> %324, float %326)
  store float %327, ptr %89, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #8
  %328 = getelementptr inbounds %struct.anon.0, ptr %18, i32 0, i32 0
  %329 = load float, ptr %328, align 4, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 4 %36, i64 12, i1 false)
  %330 = getelementptr inbounds { <2 x float>, float }, ptr %93, i32 0, i32 0
  %331 = load <2 x float>, ptr %330, align 4
  %332 = getelementptr inbounds { <2 x float>, float }, ptr %93, i32 0, i32 1
  %333 = load float, ptr %332, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %94, ptr align 4 %75, i64 12, i1 false)
  %334 = getelementptr inbounds { <2 x float>, float }, ptr %94, i32 0, i32 0
  %335 = load <2 x float>, ptr %334, align 4
  %336 = getelementptr inbounds { <2 x float>, float }, ptr %94, i32 0, i32 1
  %337 = load float, ptr %336, align 4
  %338 = call float @CgmVec3_dot(<2 x float> %331, float %333, <2 x float> %335, float %337)
  %339 = call float @llvm.fabs.f32(float %338)
  %340 = getelementptr inbounds %struct.anon.0, ptr %18, i32 0, i32 1
  %341 = load float, ptr %340, align 4, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %37, i64 12, i1 false)
  %342 = getelementptr inbounds { <2 x float>, float }, ptr %95, i32 0, i32 0
  %343 = load <2 x float>, ptr %342, align 4
  %344 = getelementptr inbounds { <2 x float>, float }, ptr %95, i32 0, i32 1
  %345 = load float, ptr %344, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %96, ptr align 4 %75, i64 12, i1 false)
  %346 = getelementptr inbounds { <2 x float>, float }, ptr %96, i32 0, i32 0
  %347 = load <2 x float>, ptr %346, align 4
  %348 = getelementptr inbounds { <2 x float>, float }, ptr %96, i32 0, i32 1
  %349 = load float, ptr %348, align 4
  %350 = call float @CgmVec3_dot(<2 x float> %343, float %345, <2 x float> %347, float %349)
  %351 = call float @llvm.fabs.f32(float %350)
  %352 = fmul float %341, %351
  %353 = call float @llvm.fmuladd.f32(float %329, float %339, float %352)
  %354 = getelementptr inbounds %struct.anon.0, ptr %18, i32 0, i32 2
  %355 = load float, ptr %354, align 4, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 4 %38, i64 12, i1 false)
  %356 = getelementptr inbounds { <2 x float>, float }, ptr %97, i32 0, i32 0
  %357 = load <2 x float>, ptr %356, align 4
  %358 = getelementptr inbounds { <2 x float>, float }, ptr %97, i32 0, i32 1
  %359 = load float, ptr %358, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 4 %75, i64 12, i1 false)
  %360 = getelementptr inbounds { <2 x float>, float }, ptr %98, i32 0, i32 0
  %361 = load <2 x float>, ptr %360, align 4
  %362 = getelementptr inbounds { <2 x float>, float }, ptr %98, i32 0, i32 1
  %363 = load float, ptr %362, align 4
  %364 = call float @CgmVec3_dot(<2 x float> %357, float %359, <2 x float> %361, float %363)
  %365 = call float @llvm.fabs.f32(float %364)
  %366 = call float @llvm.fmuladd.f32(float %355, float %365, float %353)
  store float %366, ptr %92, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #8
  %367 = load float, ptr %86, align 4, !tbaa !9
  %368 = load float, ptr %89, align 4, !tbaa !9
  %369 = call float @cgm_max(float noundef %367, float noundef %368)
  %370 = load ptr, ptr %12, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.CgmSphere, ptr %370, i32 0, i32 1
  %372 = load float, ptr %371, align 4, !tbaa !15
  %373 = fadd float %369, %372
  store float %373, ptr %99, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %100) #8
  %374 = load float, ptr %86, align 4, !tbaa !9
  %375 = load float, ptr %89, align 4, !tbaa !9
  %376 = call float @cgm_min(float noundef %374, float noundef %375)
  %377 = load ptr, ptr %12, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.CgmSphere, ptr %377, i32 0, i32 1
  %379 = load float, ptr %378, align 4, !tbaa !15
  %380 = fsub float %376, %379
  store float %380, ptr %100, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #8
  %381 = load float, ptr %99, align 4, !tbaa !9
  %382 = fneg float %381
  %383 = load float, ptr %100, align 4, !tbaa !9
  %384 = call float @cgm_max(float noundef %382, float noundef %383)
  store float %384, ptr %101, align 4, !tbaa !9
  %385 = load float, ptr %101, align 4, !tbaa !9
  %386 = load float, ptr %92, align 4, !tbaa !9
  %387 = fcmp ogt float %385, %386
  br i1 %387, label %388, label %389

388:                                              ; preds = %309
  store i8 0, ptr %8, align 1
  store i32 1, ptr %74, align 4
  br label %453

389:                                              ; preds = %309
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 4 %9, i64 12, i1 false)
  %390 = getelementptr inbounds { <2 x float>, float }, ptr %102, i32 0, i32 0
  %391 = load <2 x float>, ptr %390, align 4
  %392 = getelementptr inbounds { <2 x float>, float }, ptr %102, i32 0, i32 1
  %393 = load float, ptr %392, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %103, ptr align 4 %75, i64 12, i1 false)
  %394 = getelementptr inbounds { <2 x float>, float }, ptr %103, i32 0, i32 0
  %395 = load <2 x float>, ptr %394, align 4
  %396 = getelementptr inbounds { <2 x float>, float }, ptr %103, i32 0, i32 1
  %397 = load float, ptr %396, align 4
  %398 = call float @CgmVec3_dot(<2 x float> %391, float %393, <2 x float> %395, float %397)
  %399 = call zeroext i8 @cgm_approx_eq(float noundef %398, float noundef 0.000000e+00)
  %400 = icmp ne i8 %399, 0
  br i1 %400, label %401, label %402

401:                                              ; preds = %389
  store i32 4, ptr %74, align 4
  br label %453

402:                                              ; preds = %389
  %403 = load float, ptr %86, align 4, !tbaa !9
  %404 = call float @llvm.fabs.f32(float %403)
  %405 = load float, ptr %92, align 4, !tbaa !9
  %406 = fcmp olt float %404, %405
  br i1 %406, label %407, label %408

407:                                              ; preds = %402
  store i32 4, ptr %74, align 4
  br label %453

408:                                              ; preds = %402
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #8
  %409 = load float, ptr %86, align 4, !tbaa !9
  %410 = call float @llvm.fabs.f32(float %409)
  %411 = load float, ptr %92, align 4, !tbaa !9
  %412 = fsub float %410, %411
  %413 = call float @llvm.fabs.f32(float %412)
  store float %413, ptr %104, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %105) #8
  %414 = load float, ptr %104, align 4, !tbaa !9
  %415 = fneg float %414
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 4 %75, i64 12, i1 false)
  %416 = getelementptr inbounds { <2 x float>, float }, ptr %106, i32 0, i32 0
  %417 = load <2 x float>, ptr %416, align 4
  %418 = getelementptr inbounds { <2 x float>, float }, ptr %106, i32 0, i32 1
  %419 = load float, ptr %418, align 4
  %420 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %417, float %419, float noundef %415)
  %421 = getelementptr inbounds %union.CgmVec3, ptr %105, i32 0, i32 0
  store { <2 x float>, float } %420, ptr %107, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %421, ptr align 8 %107, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %108) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %109, ptr align 4 %9, i64 12, i1 false)
  %422 = getelementptr inbounds { <2 x float>, float }, ptr %109, i32 0, i32 0
  %423 = load <2 x float>, ptr %422, align 4
  %424 = getelementptr inbounds { <2 x float>, float }, ptr %109, i32 0, i32 1
  %425 = load float, ptr %424, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %110, ptr align 4 %105, i64 12, i1 false)
  %426 = getelementptr inbounds { <2 x float>, float }, ptr %110, i32 0, i32 0
  %427 = load <2 x float>, ptr %426, align 4
  %428 = getelementptr inbounds { <2 x float>, float }, ptr %110, i32 0, i32 1
  %429 = load float, ptr %428, align 4
  %430 = call float @CgmVec3_dot(<2 x float> %423, float %425, <2 x float> %427, float %429)
  store float %430, ptr %108, align 4, !tbaa !9
  %431 = load float, ptr %108, align 4, !tbaa !9
  %432 = fcmp olt float %431, 0.000000e+00
  br i1 %432, label %433, label %434

433:                                              ; preds = %408
  store i32 4, ptr %74, align 4
  br label %452

434:                                              ; preds = %408
  %435 = load float, ptr %108, align 4, !tbaa !9
  %436 = load float, ptr %72, align 4, !tbaa !9
  %437 = fcmp olt float %435, %436
  br i1 %437, label %438, label %451

438:                                              ; preds = %434
  %439 = load float, ptr %104, align 4, !tbaa !9
  store float %439, ptr %72, align 4, !tbaa !9
  %440 = load float, ptr %86, align 4, !tbaa !9
  %441 = fcmp ogt float %440, 0.000000e+00
  store i1 false, ptr %112, align 1
  br i1 %441, label %442, label %449

442:                                              ; preds = %438
  call void @llvm.lifetime.start.p0(i64 12, ptr %111) #8
  store i1 true, ptr %112, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 4 %75, i64 12, i1 false)
  %443 = getelementptr inbounds { <2 x float>, float }, ptr %113, i32 0, i32 0
  %444 = load <2 x float>, ptr %443, align 4
  %445 = getelementptr inbounds { <2 x float>, float }, ptr %113, i32 0, i32 1
  %446 = load float, ptr %445, align 4
  %447 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %444, float %446)
  %448 = getelementptr inbounds %union.CgmVec3, ptr %111, i32 0, i32 0
  store { <2 x float>, float } %447, ptr %114, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %448, ptr align 8 %114, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %111, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %111) #8
  br label %450

449:                                              ; preds = %438
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %75, i64 12, i1 false), !tbaa.struct !11
  br label %450

450:                                              ; preds = %449, %442
  br label %451

451:                                              ; preds = %450, %434
  store i32 0, ptr %74, align 4
  br label %452

452:                                              ; preds = %451, %433
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %105) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #8
  br label %453

453:                                              ; preds = %452, %407, %401, %388
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #8
  br label %454

454:                                              ; preds = %453, %301
  call void @llvm.lifetime.end.p0(i64 12, ptr %75) #8
  %455 = load i32, ptr %74, align 4
  switch i32 %455, label %460 [
    i32 0, label %456
    i32 4, label %457
  ]

456:                                              ; preds = %454
  br label %457

457:                                              ; preds = %456, %454
  %458 = load i32, ptr %73, align 4, !tbaa !13
  %459 = add i32 %458, 1
  store i32 %459, ptr %73, align 4, !tbaa !13
  br label %255, !llvm.loop !17

460:                                              ; preds = %454, %258
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #8
  %461 = load i32, ptr %74, align 4
  switch i32 %461, label %474 [
    i32 2, label %462
  ]

462:                                              ; preds = %460
  %463 = load ptr, ptr %14, align 8, !tbaa !5
  %464 = icmp ne ptr %463, null
  br i1 %464, label %465, label %467

465:                                              ; preds = %462
  %466 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %466, ptr align 4 %71, i64 12, i1 false), !tbaa.struct !11
  br label %467

467:                                              ; preds = %465, %462
  %468 = load ptr, ptr %15, align 8, !tbaa !5
  %469 = icmp ne ptr %468, null
  br i1 %469, label %470, label %473

470:                                              ; preds = %467
  %471 = load float, ptr %72, align 4, !tbaa !9
  %472 = load ptr, ptr %15, align 8, !tbaa !5
  store float %471, ptr %472, align 4, !tbaa !9
  br label %473

473:                                              ; preds = %470, %467
  store i8 1, ptr %8, align 1
  store i32 1, ptr %74, align 4
  br label %474

474:                                              ; preds = %473, %460
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %71) #8
  call void @llvm.lifetime.end.p0(i64 60, ptr %70) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  %475 = load i8, ptr %8, align 1
  ret i8 %475
}

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


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

%union.CgmVec3 = type { %struct.anon.0 }
%struct.anon.0 = type { float, float, float }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@__const.cgm_3d_aabb_vs_swept_sphere.u0 = external hidden unnamed_addr constant %union.CgmVec3, align 4
@__const.cgm_3d_aabb_vs_swept_sphere.u1 = external hidden unnamed_addr constant %union.CgmVec3, align 4
@__const.cgm_3d_aabb_vs_swept_sphere.u2 = external hidden unnamed_addr constant %union.CgmVec3, align 4

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

; 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 speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @cgm_approx_eq(float noundef, float noundef) local_unnamed_addr #0

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

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

; 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 { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float>, float, float noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @CgmVec3_norm(<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 } @CgmVec3_mul_cross(<2 x float>, float, <2 x float>, float) local_unnamed_addr #3

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

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #5

; 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
define dso_local noundef zeroext i8 @cgm_3d_aabb_vs_swept_sphere(ptr noundef %0, ptr nocapture noundef readonly %1, <2 x float> %2, float %3, float noundef %4, ptr noundef writeonly %5, ptr noundef writeonly %6) local_unnamed_addr #3 {
  %8 = alloca [3 x [2 x %union.CgmVec3]], align 16
  %9 = alloca [5 x %union.CgmVec3], align 16
  %10 = tail call float @llvm.fabs.f32(float %4) #6
  %11 = fcmp oeq float %10, 0x7FF0000000000000
  br i1 %11, label %12, label %15

12:                                               ; preds = %7
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.12) #7
  tail call void @abort() #8
  unreachable

15:                                               ; preds = %7
  %16 = tail call { <2 x float>, float } @CgmAabb3d_center(ptr noundef %0)
  %.fca.0.extract265 = extractvalue { <2 x float>, float } %16, 0
  %.fca.1.extract266 = extractvalue { <2 x float>, float } %16, 1
  %17 = tail call { <2 x float>, float } @CgmAabb3d_half_size(ptr noundef %0)
  %.fca.0.extract256 = extractvalue { <2 x float>, float } %17, 0
  %.fca.1.extract257 = extractvalue { <2 x float>, float } %17, 1
  %.sroa.0251.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2252.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.2252.0.copyload = load float, ptr %.sroa.2252.0..sroa_idx, align 4
  %18 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0251.0.copyload, float %.sroa.2252.0.copyload, <2 x float> %.fca.0.extract265, float %.fca.1.extract266)
  %.fca.0.extract245 = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract246 = extractvalue { <2 x float>, float } %18, 1
  %19 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %2, float %3, float noundef %4)
  %.fca.0.extract228 = extractvalue { <2 x float>, float } %19, 0
  %.fca.1.extract229 = extractvalue { <2 x float>, float } %19, 1
  %20 = tail call { <2 x float>, float } @CgmVec3_add(<2 x float> %.fca.0.extract245, float %.fca.1.extract246, <2 x float> %.fca.0.extract228, float %.fca.1.extract229)
  %.fca.0.extract220 = extractvalue { <2 x float>, float } %20, 0
  %.fca.1.extract221 = extractvalue { <2 x float>, float } %20, 1
  %21 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract220, float %.fca.1.extract221, <2 x float> %.fca.0.extract245, float %.fca.1.extract246)
  %.fca.0.extract204 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract205 = extractvalue { <2 x float>, float } %21, 1
  %.sroa.0197.0.copyload = load <2 x float>, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u0, align 4
  %.sroa.6200.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u0, i64 8), align 4
  %.sroa.0190.0.copyload = load <2 x float>, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u1, align 4
  %.sroa.6193.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u1, i64 8), align 4
  %.sroa.0183.0.copyload = load <2 x float>, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u2, align 4
  %.sroa.6186.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.cgm_3d_aabb_vs_swept_sphere.u2, i64 8), align 4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #9
  store <2 x float> %.sroa.0197.0.copyload, ptr %8, align 16
  %.sroa.6200.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store float %.sroa.6200.0.copyload, ptr %.sroa.6200.0..sroa_idx, align 8, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %8, i64 12
  store <2 x float> %.fca.0.extract204, ptr %22, align 4
  %.sroa.6215.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 20
  store float %.fca.1.extract205, ptr %.sroa.6215.0..sroa_idx, align 4, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %8, i64 24
  store <2 x float> %.sroa.0190.0.copyload, ptr %23, align 8
  %.sroa.6193.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 32
  store float %.sroa.6193.0.copyload, ptr %.sroa.6193.0..sroa_idx, align 16, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %8, i64 36
  store <2 x float> %.fca.0.extract204, ptr %24, align 4
  %.sroa.6215.0..sroa_idx216 = getelementptr inbounds i8, ptr %8, i64 44
  store float %.fca.1.extract205, ptr %.sroa.6215.0..sroa_idx216, align 4, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %8, i64 48
  store <2 x float> %.sroa.0183.0.copyload, ptr %25, align 16
  %.sroa.6186.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 56
  store float %.sroa.6186.0.copyload, ptr %.sroa.6186.0..sroa_idx, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %8, i64 60
  store <2 x float> %.fca.0.extract204, ptr %26, align 4
  %.sroa.6215.0..sroa_idx218 = getelementptr inbounds i8, ptr %8, i64 68
  store float %.fca.1.extract205, ptr %.sroa.6215.0..sroa_idx218, align 4, !tbaa !9
  %27 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract256, float %.fca.1.extract257)
  %.fca.0.extract169 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract170 = extractvalue { <2 x float>, float } %27, 1
  %28 = tail call { <2 x float>, float } @CgmVec3_clamp(<2 x float> %.fca.0.extract245, float %.fca.1.extract246, <2 x float> %.fca.0.extract169, float %.fca.1.extract170, <2 x float> %.fca.0.extract256, float %.fca.1.extract257)
  %.fca.0.extract159 = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract160 = extractvalue { <2 x float>, float } %28, 1
  %29 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract245, float %.fca.1.extract246, <2 x float> %.fca.0.extract159, float %.fca.1.extract160)
  %.fca.0.extract151 = extractvalue { <2 x float>, float } %29, 0
  %.fca.1.extract152 = extractvalue { <2 x float>, float } %29, 1
  %30 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract151, float %.fca.1.extract152)
  %.fca.0.extract145 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract146 = extractvalue { <2 x float>, float } %30, 1
  %31 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract256, float %.fca.1.extract257)
  %.fca.0.extract131 = extractvalue { <2 x float>, float } %31, 0
  %.fca.1.extract132 = extractvalue { <2 x float>, float } %31, 1
  %32 = tail call { <2 x float>, float } @CgmVec3_clamp(<2 x float> %.fca.0.extract220, float %.fca.1.extract221, <2 x float> %.fca.0.extract131, float %.fca.1.extract132, <2 x float> %.fca.0.extract256, float %.fca.1.extract257)
  %.fca.0.extract121 = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract122 = extractvalue { <2 x float>, float } %32, 1
  %33 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.fca.0.extract220, float %.fca.1.extract221, <2 x float> %.fca.0.extract121, float %.fca.1.extract122)
  %.fca.0.extract113 = extractvalue { <2 x float>, float } %33, 0
  %.fca.1.extract114 = extractvalue { <2 x float>, float } %33, 1
  %34 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract113, float %.fca.1.extract114)
  %.fca.0.extract107 = extractvalue { <2 x float>, float } %34, 0
  %.fca.1.extract108 = extractvalue { <2 x float>, float } %34, 1
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %9) #9
  store <2 x float> %.sroa.0197.0.copyload, ptr %9, align 16
  %.sroa.6200.0..sroa_idx202 = getelementptr inbounds i8, ptr %9, i64 8
  store float %.sroa.6200.0.copyload, ptr %.sroa.6200.0..sroa_idx202, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %9, i64 12
  store <2 x float> %.sroa.0190.0.copyload, ptr %35, align 4
  %.sroa.6193.0..sroa_idx195 = getelementptr inbounds i8, ptr %9, i64 20
  store float %.sroa.6193.0.copyload, ptr %.sroa.6193.0..sroa_idx195, align 4, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %9, i64 24
  store <2 x float> %.sroa.0183.0.copyload, ptr %36, align 8
  %.sroa.6186.0..sroa_idx188 = getelementptr inbounds i8, ptr %9, i64 32
  store float %.sroa.6186.0.copyload, ptr %.sroa.6186.0..sroa_idx188, align 16, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %9, i64 36
  store <2 x float> %.fca.0.extract145, ptr %37, align 4
  %.sroa.4182.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 44
  store float %.fca.1.extract146, ptr %.sroa.4182.0..sroa_idx, align 4, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %9, i64 48
  store <2 x float> %.fca.0.extract107, ptr %38, align 16
  %.sroa.4144.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 56
  store float %.fca.1.extract108, ptr %.sroa.4144.0..sroa_idx, align 8, !tbaa !9
  %.sroa.0260.0.vec.extract = extractelement <2 x float> %.fca.0.extract256, i64 0
  %.sroa.0260.4.vec.extract = extractelement <2 x float> %.fca.0.extract256, i64 1
  %39 = getelementptr inbounds i8, ptr %1, i64 12
  br label %40

40:                                               ; preds = %15, %91
  %indvars.iv = phi i64 [ 0, %15 ], [ %indvars.iv.next, %91 ]
  %.sroa.5.0333 = phi float [ undef, %15 ], [ %.sroa.5.4.ph, %91 ]
  %.sroa.0106.0332 = phi <2 x float> [ undef, %15 ], [ %.sroa.0106.4.ph, %91 ]
  %.0289331 = phi float [ 0x7FF0000000000000, %15 ], [ %.4293.ph, %91 ]
  %41 = icmp ult i64 %indvars.iv, 3
  br i1 %41, label %42, label %49

42:                                               ; preds = %40
  %43 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %8, i64 0, i64 %indvars.iv
  %.sroa.081.0.copyload = load <2 x float>, ptr %43, align 8
  %.sroa.15.0..sroa_idx = getelementptr inbounds i8, ptr %43, i64 8
  %.sroa.15.0.copyload = load float, ptr %.sroa.15.0..sroa_idx, align 8, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %43, i64 12
  %.sroa.074.0.copyload = load <2 x float>, ptr %44, align 4
  %.sroa.275.0..sroa_idx = getelementptr inbounds i8, ptr %43, i64 20
  %.sroa.275.0.copyload = load float, ptr %.sroa.275.0..sroa_idx, align 4
  %45 = tail call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %.sroa.081.0.copyload, float %.sroa.15.0.copyload, <2 x float> %.sroa.074.0.copyload, float %.sroa.275.0.copyload)
  %.fca.0.extract70 = extractvalue { <2 x float>, float } %45, 0
  %.fca.1.extract71 = extractvalue { <2 x float>, float } %45, 1
  %46 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract70, float %.fca.1.extract71, <2 x float> %.fca.0.extract70, float %.fca.1.extract71)
  %47 = tail call zeroext i8 @cgm_approx_eq(float noundef %46, float noundef 0.000000e+00)
  %.not = icmp eq i8 %47, 0
  br i1 %.not, label %.thread, label %91

.thread:                                          ; preds = %42
  %48 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract70, float %.fca.1.extract71)
  %.fca.0.extract57 = extractvalue { <2 x float>, float } %48, 0
  %.fca.1.extract58 = extractvalue { <2 x float>, float } %48, 1
  br label %52

49:                                               ; preds = %40
  %50 = add nsw i64 %indvars.iv, -3
  %51 = getelementptr inbounds [5 x %union.CgmVec3], ptr %9, i64 0, i64 %50
  %.sroa.081.0.copyload90 = load <2 x float>, ptr %51, align 4
  %.sroa.15.0..sroa_idx92 = getelementptr inbounds i8, ptr %51, i64 8
  %.sroa.15.0.copyload93 = load float, ptr %.sroa.15.0..sroa_idx92, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %.thread, %49
  %.sroa.081.1 = phi <2 x float> [ %.sroa.081.0.copyload90, %49 ], [ %.fca.0.extract57, %.thread ]
  %.sroa.15.1 = phi float [ %.sroa.15.0.copyload93, %49 ], [ %.fca.1.extract58, %.thread ]
  %53 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract245, float %.fca.1.extract246, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %54 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract220, float %.fca.1.extract221, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %55 = tail call float @CgmVec3_dot(<2 x float> %.sroa.0197.0.copyload, float %.sroa.6200.0.copyload, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %56 = tail call float @llvm.fabs.f32(float %55)
  %57 = tail call float @CgmVec3_dot(<2 x float> %.sroa.0190.0.copyload, float %.sroa.6193.0.copyload, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %58 = tail call float @llvm.fabs.f32(float %57)
  %59 = fmul float %.sroa.0260.4.vec.extract, %58
  %60 = tail call float @llvm.fmuladd.f32(float %.sroa.0260.0.vec.extract, float %56, float %59)
  %61 = tail call float @CgmVec3_dot(<2 x float> %.sroa.0183.0.copyload, float %.sroa.6186.0.copyload, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %62 = tail call float @llvm.fabs.f32(float %61)
  %63 = tail call float @llvm.fmuladd.f32(float %.fca.1.extract257, float %62, float %60)
  %64 = tail call float @cgm_max(float noundef %53, float noundef %54)
  %65 = load float, ptr %39, align 4, !tbaa !10
  %66 = fadd float %64, %65
  %67 = tail call float @cgm_min(float noundef %53, float noundef %54)
  %68 = load float, ptr %39, align 4, !tbaa !10
  %69 = fsub float %67, %68
  %70 = fneg float %66
  %71 = tail call float @cgm_max(float noundef %70, float noundef %69)
  %72 = fcmp ogt float %71, %63
  br i1 %72, label %.loopexit, label %73

73:                                               ; preds = %52
  %74 = tail call float @CgmVec3_dot(<2 x float> %2, float %3, <2 x float> %.sroa.081.1, float %.sroa.15.1)
  %75 = tail call zeroext i8 @cgm_approx_eq(float noundef %74, float noundef 0.000000e+00)
  %.not305 = icmp eq i8 %75, 0
  br i1 %.not305, label %76, label %91

76:                                               ; preds = %73
  %77 = tail call float @llvm.fabs.f32(float %53)
  %78 = fcmp olt float %77, %63
  br i1 %78, label %91, label %79

79:                                               ; preds = %76
  %80 = fsub float %77, %63
  %81 = tail call float @llvm.fabs.f32(float %80)
  %82 = fneg float %81
  %83 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %.sroa.081.1, float %.sroa.15.1, float noundef %82)
  %.fca.0.extract10 = extractvalue { <2 x float>, float } %83, 0
  %.fca.1.extract11 = extractvalue { <2 x float>, float } %83, 1
  %84 = tail call float @CgmVec3_dot(<2 x float> %2, float %3, <2 x float> %.fca.0.extract10, float %.fca.1.extract11)
  %85 = fcmp uge float %84, 0.000000e+00
  %86 = fcmp olt float %84, %.0289331
  %or.cond = select i1 %85, i1 %86, i1 false
  br i1 %or.cond, label %87, label %91

87:                                               ; preds = %79
  %88 = fcmp ogt float %53, 0.000000e+00
  br i1 %88, label %89, label %91

89:                                               ; preds = %87
  %90 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.sroa.081.1, float %.sroa.15.1)
  %.fca.0.extract = extractvalue { <2 x float>, float } %90, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %90, 1
  br label %91

91:                                               ; preds = %73, %76, %79, %87, %89, %42
  %.4293.ph = phi float [ %.0289331, %42 ], [ %81, %87 ], [ %81, %89 ], [ %.0289331, %79 ], [ %.0289331, %76 ], [ %.0289331, %73 ]
  %.sroa.0106.4.ph = phi <2 x float> [ %.sroa.0106.0332, %42 ], [ %.sroa.081.1, %87 ], [ %.fca.0.extract, %89 ], [ %.sroa.0106.0332, %79 ], [ %.sroa.0106.0332, %76 ], [ %.sroa.0106.0332, %73 ]
  %.sroa.5.4.ph = phi float [ %.sroa.5.0333, %42 ], [ %.sroa.15.1, %87 ], [ %.fca.1.extract, %89 ], [ %.sroa.5.0333, %79 ], [ %.sroa.5.0333, %76 ], [ %.sroa.5.0333, %73 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond = icmp eq i64 %indvars.iv.next, 8
  br i1 %exitcond, label %92, label %40, !llvm.loop !13

92:                                               ; preds = %91
  %.not306 = icmp eq ptr %5, null
  br i1 %.not306, label %94, label %93

93:                                               ; preds = %92
  store <2 x float> %.sroa.0106.4.ph, ptr %5, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store float %.sroa.5.4.ph, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %93, %92
  %.not307 = icmp eq ptr %6, null
  br i1 %.not307, label %.loopexit, label %95

95:                                               ; preds = %94
  store float %.4293.ph, ptr %6, align 4, !tbaa !15
  br label %.loopexit

.loopexit:                                        ; preds = %52, %94, %95
  %.4 = phi i8 [ 1, %95 ], [ 1, %94 ], [ 0, %52 ]
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #9
  ret i8 %.4
}

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 speculatable willreturn memory(none) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { memory(none) }
attributes #7 = { cold nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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, !12, i64 12}
!11 = !{!"CgmSphere", !7, i64 0, !12, i64 12}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !12, i64 0}


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