; LLVM IR from heroseh/cgm :: cgm (cgm_3d_triangle_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.anon.9 = type { %union.CgmVec3, %union.CgmVec3, %union.CgmVec3 }
%struct.CgmHoop3d = type { %union.CgmVec3, %union.CgmVec3, %union.CgmVec3, float, float }

; 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
declare float @sqrtf(float noundef) #4

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @cgm_3d_triangle_vs_hoop(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i8 noundef zeroext %4) #5 {
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca %union.CgmVec3, align 4
  %13 = alloca { <2 x float>, float }, align 4
  %14 = alloca { <2 x float>, float }, align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %union.CgmVec3, align 4
  %17 = alloca { <2 x float>, float }, align 4
  %18 = alloca { <2 x float>, float }, 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 { <2 x float>, float }, align 4
  %26 = alloca { <2 x float>, float }, align 4
  %27 = alloca { <2 x float>, float }, align 8
  %28 = alloca %union.CgmVec3, align 4
  %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 { <2 x float>, float }, align 4
  %39 = alloca { <2 x float>, float }, align 4
  %40 = alloca { <2 x float>, float }, align 8
  %41 = alloca { <2 x float>, float }, align 4
  %42 = alloca { <2 x float>, float }, align 8
  %43 = alloca %union.CgmVec3, align 4
  %44 = alloca %union.CgmVec3, align 4
  %45 = alloca { <2 x float>, float }, align 4
  %46 = alloca { <2 x float>, float }, align 4
  %47 = alloca { <2 x float>, float }, align 8
  %48 = alloca { <2 x float>, float }, align 4
  %49 = alloca { <2 x float>, float }, align 8
  %50 = alloca [5 x %union.CgmVec3], align 16
  %51 = alloca %union.CgmVec3, align 4
  %52 = alloca %union.CgmVec3, align 4
  %53 = alloca { <2 x float>, float }, align 4
  %54 = alloca { <2 x float>, float }, align 4
  %55 = alloca { <2 x float>, float }, align 4
  %56 = alloca { <2 x float>, float }, align 8
  %57 = alloca { <2 x float>, float }, align 4
  %58 = alloca { <2 x float>, float }, align 8
  %59 = alloca %union.CgmVec3, align 4
  %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 4
  %64 = alloca { <2 x float>, float }, align 8
  %65 = alloca { <2 x float>, float }, align 4
  %66 = alloca { <2 x float>, float }, align 8
  %67 = alloca %union.CgmVec3, align 4
  %68 = alloca %union.CgmVec3, align 4
  %69 = alloca { <2 x float>, float }, align 4
  %70 = alloca { <2 x float>, float }, align 4
  %71 = alloca { <2 x float>, float }, align 4
  %72 = alloca { <2 x float>, float }, align 8
  %73 = alloca { <2 x float>, float }, align 4
  %74 = alloca { <2 x float>, float }, align 8
  %75 = alloca %union.CgmVec3, align 4
  %76 = alloca float, align 4
  %77 = alloca %union.CgmVec3, align 4
  %78 = alloca { <2 x float>, float }, align 4
  %79 = alloca { <2 x float>, float }, align 8
  %80 = alloca i32, align 4
  %81 = alloca i32, align 4
  %82 = alloca %union.CgmVec3, align 4
  %83 = alloca float, align 4
  %84 = alloca { <2 x float>, float }, align 4
  %85 = alloca { <2 x float>, float }, align 4
  %86 = alloca float, align 4
  %87 = alloca %union.CgmVec3, align 4
  %88 = alloca { <2 x float>, float }, align 4
  %89 = alloca { <2 x float>, float }, align 8
  %90 = alloca float, align 4
  %91 = alloca { <2 x float>, float }, align 4
  %92 = alloca { <2 x float>, float }, align 4
  %93 = alloca float, align 4
  %94 = alloca { <2 x float>, float }, align 4
  %95 = alloca { <2 x float>, float }, align 4
  %96 = alloca 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 { <2 x float>, float }, align 4
  %105 = alloca { <2 x float>, float }, align 4
  %106 = alloca float, align 4
  %107 = alloca { <2 x float>, float }, align 4
  %108 = alloca { <2 x float>, float }, align 4
  %109 = alloca float, align 4
  %110 = alloca float, align 4
  %111 = alloca float, align 4
  %112 = alloca float, align 4
  %113 = alloca float, align 4
  %114 = alloca %union.CgmVec3, align 4
  %115 = alloca i1, align 1
  %116 = alloca { <2 x float>, float }, align 4
  %117 = alloca { <2 x float>, float }, align 8
  %118 = alloca float, align 4
  %119 = alloca { <2 x float>, float }, align 4
  %120 = alloca { <2 x float>, float }, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i8 %4, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.anon.9, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.CgmHoop3d, ptr %123, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %122, i64 12, i1 false)
  %125 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 0
  %126 = load <2 x float>, ptr %125, align 4
  %127 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 1
  %128 = load float, ptr %127, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %124, i64 12, i1 false)
  %129 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 0
  %130 = load <2 x float>, ptr %129, align 4
  %131 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 1
  %132 = load float, ptr %131, align 4
  %133 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %126, float %128, <2 x float> %130, float %132)
  %134 = getelementptr inbounds %union.CgmVec3, ptr %12, i32 0, i32 0
  store { <2 x float>, float } %133, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %134, ptr align 8 %15, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.anon.9, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.CgmHoop3d, ptr %137, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %136, i64 12, i1 false)
  %139 = getelementptr inbounds { <2 x float>, float }, ptr %17, i32 0, i32 0
  %140 = load <2 x float>, ptr %139, align 4
  %141 = getelementptr inbounds { <2 x float>, float }, ptr %17, i32 0, i32 1
  %142 = load float, ptr %141, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %138, i64 12, i1 false)
  %143 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 0
  %144 = load <2 x float>, ptr %143, align 4
  %145 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 1
  %146 = load float, ptr %145, align 4
  %147 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %140, float %142, <2 x float> %144, float %146)
  %148 = getelementptr inbounds %union.CgmVec3, ptr %16, i32 0, i32 0
  store { <2 x float>, float } %147, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 8 %19, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.anon.9, ptr %149, i32 0, i32 2
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.CgmHoop3d, ptr %151, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %150, i64 12, i1 false)
  %153 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %154 = load <2 x float>, ptr %153, align 4
  %155 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %156 = load float, ptr %155, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %152, i64 12, i1 false)
  %157 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %158 = load <2 x float>, ptr %157, align 4
  %159 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %160 = load float, ptr %159, align 4
  %161 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %154, float %156, <2 x float> %158, float %160)
  %162 = getelementptr inbounds %union.CgmVec3, ptr %20, i32 0, i32 0
  store { <2 x float>, float } %161, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %162, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.anon.9, ptr %163, i32 0, i32 1
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.anon.9, ptr %165, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %164, i64 12, i1 false)
  %167 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 0
  %168 = load <2 x float>, ptr %167, align 4
  %169 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 1
  %170 = load float, ptr %169, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %166, i64 12, i1 false)
  %171 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 0
  %172 = load <2 x float>, ptr %171, align 4
  %173 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 1
  %174 = load float, ptr %173, align 4
  %175 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %168, float %170, <2 x float> %172, float %174)
  %176 = getelementptr inbounds %union.CgmVec3, ptr %24, i32 0, i32 0
  store { <2 x float>, float } %175, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %176, ptr align 8 %27, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #6
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.anon.9, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.anon.9, ptr %179, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %178, i64 12, i1 false)
  %181 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 0
  %182 = load <2 x float>, ptr %181, align 4
  %183 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 1
  %184 = load float, ptr %183, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %180, i64 12, i1 false)
  %185 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 0
  %186 = load <2 x float>, ptr %185, align 4
  %187 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 1
  %188 = load float, ptr %187, align 4
  %189 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %182, float %184, <2 x float> %186, float %188)
  %190 = getelementptr inbounds %union.CgmVec3, ptr %28, i32 0, i32 0
  store { <2 x float>, float } %189, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %190, ptr align 8 %31, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #6
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.anon.9, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.anon.9, ptr %193, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %192, i64 12, i1 false)
  %195 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 0
  %196 = load <2 x float>, ptr %195, align 4
  %197 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 1
  %198 = load float, ptr %197, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %194, i64 12, i1 false)
  %199 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 0
  %200 = load <2 x float>, ptr %199, align 4
  %201 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 1
  %202 = load float, ptr %201, align 4
  %203 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %196, float %198, <2 x float> %200, float %202)
  %204 = getelementptr inbounds %union.CgmVec3, ptr %32, i32 0, i32 0
  store { <2 x float>, float } %203, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %204, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %24, i64 12, i1 false)
  %205 = getelementptr inbounds { <2 x float>, float }, ptr %38, i32 0, i32 0
  %206 = load <2 x float>, ptr %205, align 4
  %207 = getelementptr inbounds { <2 x float>, float }, ptr %38, i32 0, i32 1
  %208 = load float, ptr %207, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %28, i64 12, i1 false)
  %209 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 0
  %210 = load <2 x float>, ptr %209, align 4
  %211 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 1
  %212 = load float, ptr %211, align 4
  %213 = call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %206, float %208, <2 x float> %210, float %212)
  %214 = getelementptr inbounds %union.CgmVec3, ptr %37, i32 0, i32 0
  store { <2 x float>, float } %213, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %214, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %37, i64 12, i1 false)
  %215 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 0
  %216 = load <2 x float>, ptr %215, align 4
  %217 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 1
  %218 = load float, ptr %217, align 4
  %219 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %216, float %218)
  %220 = getelementptr inbounds %union.CgmVec3, ptr %36, i32 0, i32 0
  store { <2 x float>, float } %219, ptr %42, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %220, ptr align 8 %42, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #6
  %221 = load ptr, ptr %8, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.CgmHoop3d, ptr %221, i32 0, i32 1
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.CgmHoop3d, ptr %223, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %222, i64 12, i1 false)
  %225 = getelementptr inbounds { <2 x float>, float }, ptr %45, i32 0, i32 0
  %226 = load <2 x float>, ptr %225, align 4
  %227 = getelementptr inbounds { <2 x float>, float }, ptr %45, i32 0, i32 1
  %228 = load float, ptr %227, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %224, i64 12, i1 false)
  %229 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 0
  %230 = load <2 x float>, ptr %229, align 4
  %231 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 1
  %232 = load float, ptr %231, align 4
  %233 = call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %226, float %228, <2 x float> %230, float %232)
  %234 = getelementptr inbounds %union.CgmVec3, ptr %44, i32 0, i32 0
  store { <2 x float>, float } %233, ptr %47, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %234, ptr align 8 %47, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %44, i64 12, i1 false)
  %235 = getelementptr inbounds { <2 x float>, float }, ptr %48, i32 0, i32 0
  %236 = load <2 x float>, ptr %235, align 4
  %237 = getelementptr inbounds { <2 x float>, float }, ptr %48, i32 0, i32 1
  %238 = load float, ptr %237, align 4
  %239 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %236, float %238)
  %240 = getelementptr inbounds %union.CgmVec3, ptr %43, i32 0, i32 0
  store { <2 x float>, float } %239, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %240, ptr align 8 %49, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 60, ptr %50) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %36, i64 12, i1 false), !tbaa.struct !10
  %241 = getelementptr inbounds %union.CgmVec3, ptr %50, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %241, ptr align 4 %43, i64 12, i1 false), !tbaa.struct !10
  %242 = getelementptr inbounds %union.CgmVec3, ptr %50, i64 2
  %243 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 0
  store float 0.000000e+00, ptr %243, align 4, !tbaa !11
  %244 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 1
  store float 0.000000e+00, ptr %244, align 4, !tbaa !14
  %245 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 2
  store float 0.000000e+00, ptr %245, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %12, i64 12, i1 false)
  %246 = getelementptr inbounds { <2 x float>, float }, ptr %53, i32 0, i32 0
  %247 = load <2 x float>, ptr %246, align 4
  %248 = getelementptr inbounds { <2 x float>, float }, ptr %53, i32 0, i32 1
  %249 = load float, ptr %248, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %16, i64 12, i1 false)
  %250 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 0
  %251 = load <2 x float>, ptr %250, align 4
  %252 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 1
  %253 = load float, ptr %252, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %52, i64 12, i1 false)
  %254 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 0
  %255 = load <2 x float>, ptr %254, align 4
  %256 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 1
  %257 = load float, ptr %256, align 4
  %258 = call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %247, float %249, <2 x float> %251, float %253, <2 x float> %255, float %257)
  %259 = getelementptr inbounds %union.CgmVec3, ptr %51, i32 0, i32 0
  store { <2 x float>, float } %258, ptr %56, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %259, ptr align 8 %56, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %51, i64 12, i1 false)
  %260 = getelementptr inbounds { <2 x float>, float }, ptr %57, i32 0, i32 0
  %261 = load <2 x float>, ptr %260, align 4
  %262 = getelementptr inbounds { <2 x float>, float }, ptr %57, i32 0, i32 1
  %263 = load float, ptr %262, align 4
  %264 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %261, float %263)
  %265 = getelementptr inbounds %union.CgmVec3, ptr %242, i32 0, i32 0
  store { <2 x float>, float } %264, ptr %58, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %265, ptr align 8 %58, i64 12, i1 false)
  %266 = getelementptr inbounds %union.CgmVec3, ptr %50, i64 3
  %267 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 0
  store float 0.000000e+00, ptr %267, align 4, !tbaa !11
  %268 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 1
  store float 0.000000e+00, ptr %268, align 4, !tbaa !14
  %269 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 2
  store float 0.000000e+00, ptr %269, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %16, i64 12, i1 false)
  %270 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 0
  %271 = load <2 x float>, ptr %270, align 4
  %272 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 1
  %273 = load float, ptr %272, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %20, i64 12, i1 false)
  %274 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 0
  %275 = load <2 x float>, ptr %274, align 4
  %276 = getelementptr inbounds { <2 x float>, float }, ptr %62, i32 0, i32 1
  %277 = load float, ptr %276, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %60, i64 12, i1 false)
  %278 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 0
  %279 = load <2 x float>, ptr %278, align 4
  %280 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 1
  %281 = load float, ptr %280, align 4
  %282 = call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %271, float %273, <2 x float> %275, float %277, <2 x float> %279, float %281)
  %283 = getelementptr inbounds %union.CgmVec3, ptr %59, i32 0, i32 0
  store { <2 x float>, float } %282, ptr %64, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %283, ptr align 8 %64, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %59, i64 12, i1 false)
  %284 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 0
  %285 = load <2 x float>, ptr %284, align 4
  %286 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 1
  %287 = load float, ptr %286, align 4
  %288 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %285, float %287)
  %289 = getelementptr inbounds %union.CgmVec3, ptr %266, i32 0, i32 0
  store { <2 x float>, float } %288, ptr %66, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %289, ptr align 8 %66, i64 12, i1 false)
  %290 = getelementptr inbounds %union.CgmVec3, ptr %50, i64 4
  %291 = getelementptr inbounds %struct.anon.0, ptr %68, i32 0, i32 0
  store float 0.000000e+00, ptr %291, align 4, !tbaa !11
  %292 = getelementptr inbounds %struct.anon.0, ptr %68, i32 0, i32 1
  store float 0.000000e+00, ptr %292, align 4, !tbaa !14
  %293 = getelementptr inbounds %struct.anon.0, ptr %68, i32 0, i32 2
  store float 0.000000e+00, ptr %293, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %69, ptr align 4 %20, i64 12, i1 false)
  %294 = getelementptr inbounds { <2 x float>, float }, ptr %69, i32 0, i32 0
  %295 = load <2 x float>, ptr %294, align 4
  %296 = getelementptr inbounds { <2 x float>, float }, ptr %69, i32 0, i32 1
  %297 = load float, ptr %296, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %12, i64 12, i1 false)
  %298 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 0
  %299 = load <2 x float>, ptr %298, align 4
  %300 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 1
  %301 = load float, ptr %300, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %68, i64 12, i1 false)
  %302 = getelementptr inbounds { <2 x float>, float }, ptr %71, i32 0, i32 0
  %303 = load <2 x float>, ptr %302, align 4
  %304 = getelementptr inbounds { <2 x float>, float }, ptr %71, i32 0, i32 1
  %305 = load float, ptr %304, align 4
  %306 = call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %295, float %297, <2 x float> %299, float %301, <2 x float> %303, float %305)
  %307 = getelementptr inbounds %union.CgmVec3, ptr %67, i32 0, i32 0
  store { <2 x float>, float } %306, ptr %72, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %307, ptr align 8 %72, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %67, i64 12, i1 false)
  %308 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 0
  %309 = load <2 x float>, ptr %308, align 4
  %310 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 1
  %311 = load float, ptr %310, align 4
  %312 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %309, float %311)
  %313 = getelementptr inbounds %union.CgmVec3, ptr %290, i32 0, i32 0
  store { <2 x float>, float } %312, ptr %74, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %313, ptr align 8 %74, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %75) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #6
  store float 0x7FF0000000000000, ptr %76, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %77) #6
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.CgmHoop3d, ptr %314, i32 0, i32 4
  %316 = load float, ptr %315, align 4, !tbaa !17
  %317 = fmul float %316, 2.000000e+00
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %43, i64 12, i1 false)
  %318 = getelementptr inbounds { <2 x float>, float }, ptr %78, i32 0, i32 0
  %319 = load <2 x float>, ptr %318, align 4
  %320 = getelementptr inbounds { <2 x float>, float }, ptr %78, i32 0, i32 1
  %321 = load float, ptr %320, align 4
  %322 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %319, float %321, float noundef %317)
  %323 = getelementptr inbounds %union.CgmVec3, ptr %77, i32 0, i32 0
  store { <2 x float>, float } %322, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %323, ptr align 8 %79, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #6
  store i32 0, ptr %80, align 4, !tbaa !19
  br label %324

324:                                              ; preds = %484, %5
  %325 = load i32, ptr %80, align 4, !tbaa !19
  %326 = icmp ult i32 %325, 5
  br i1 %326, label %328, label %327

327:                                              ; preds = %324
  store i32 2, ptr %81, align 4
  br label %487

328:                                              ; preds = %324
  call void @llvm.lifetime.start.p0(i64 12, ptr %82) #6
  %329 = load i32, ptr %80, align 4, !tbaa !19
  %330 = zext i32 %329 to i64
  %331 = getelementptr inbounds [5 x %union.CgmVec3], ptr %50, i64 0, i64 %330
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %331, i64 12, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %84, ptr align 4 %82, i64 12, i1 false)
  %332 = getelementptr inbounds { <2 x float>, float }, ptr %84, i32 0, i32 0
  %333 = load <2 x float>, ptr %332, align 4
  %334 = getelementptr inbounds { <2 x float>, float }, ptr %84, i32 0, i32 1
  %335 = load float, ptr %334, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %85, ptr align 4 %82, i64 12, i1 false)
  %336 = getelementptr inbounds { <2 x float>, float }, ptr %85, i32 0, i32 0
  %337 = load <2 x float>, ptr %336, align 4
  %338 = getelementptr inbounds { <2 x float>, float }, ptr %85, i32 0, i32 1
  %339 = load float, ptr %338, align 4
  %340 = call float @CgmVec3_dot(<2 x float> %333, float %335, <2 x float> %337, float %339)
  store float %340, ptr %83, align 4, !tbaa !16
  %341 = load float, ptr %83, align 4, !tbaa !16
  %342 = fcmp oeq float %341, 0.000000e+00
  br i1 %342, label %343, label %344

343:                                              ; preds = %328
  store i32 4, ptr %81, align 4
  br label %481

344:                                              ; preds = %328
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #6
  %345 = load float, ptr %83, align 4, !tbaa !16
  %346 = call float @sqrtf(float noundef %345) #6
  %347 = fdiv float 1.000000e+00, %346
  store float %347, ptr %86, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %87) #6
  %348 = load float, ptr %86, align 4, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %82, i64 12, i1 false)
  %349 = getelementptr inbounds { <2 x float>, float }, ptr %88, i32 0, i32 0
  %350 = load <2 x float>, ptr %349, align 4
  %351 = getelementptr inbounds { <2 x float>, float }, ptr %88, i32 0, i32 1
  %352 = load float, ptr %351, align 4
  %353 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %350, float %352, float noundef %348)
  %354 = getelementptr inbounds %union.CgmVec3, ptr %87, i32 0, i32 0
  store { <2 x float>, float } %353, ptr %89, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %354, ptr align 8 %89, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %87, i64 12, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 12, ptr %87) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 4 %12, i64 12, i1 false)
  %355 = getelementptr inbounds { <2 x float>, float }, ptr %91, i32 0, i32 0
  %356 = load <2 x float>, ptr %355, align 4
  %357 = getelementptr inbounds { <2 x float>, float }, ptr %91, i32 0, i32 1
  %358 = load float, ptr %357, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %92, ptr align 4 %82, i64 12, i1 false)
  %359 = getelementptr inbounds { <2 x float>, float }, ptr %92, i32 0, i32 0
  %360 = load <2 x float>, ptr %359, align 4
  %361 = getelementptr inbounds { <2 x float>, float }, ptr %92, i32 0, i32 1
  %362 = load float, ptr %361, align 4
  %363 = call float @CgmVec3_dot(<2 x float> %356, float %358, <2 x float> %360, float %362)
  store float %363, ptr %90, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %94, ptr align 4 %16, i64 12, i1 false)
  %364 = getelementptr inbounds { <2 x float>, float }, ptr %94, i32 0, i32 0
  %365 = load <2 x float>, ptr %364, align 4
  %366 = getelementptr inbounds { <2 x float>, float }, ptr %94, i32 0, i32 1
  %367 = load float, ptr %366, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %82, i64 12, i1 false)
  %368 = getelementptr inbounds { <2 x float>, float }, ptr %95, i32 0, i32 0
  %369 = load <2 x float>, ptr %368, align 4
  %370 = getelementptr inbounds { <2 x float>, float }, ptr %95, 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 %93, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 4 %20, i64 12, i1 false)
  %373 = getelementptr inbounds { <2 x float>, float }, ptr %97, i32 0, i32 0
  %374 = load <2 x float>, ptr %373, align 4
  %375 = getelementptr inbounds { <2 x float>, float }, ptr %97, i32 0, i32 1
  %376 = load float, ptr %375, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 4 %82, i64 12, i1 false)
  %377 = getelementptr inbounds { <2 x float>, float }, ptr %98, i32 0, i32 0
  %378 = load <2 x float>, ptr %377, align 4
  %379 = getelementptr inbounds { <2 x float>, float }, ptr %98, i32 0, i32 1
  %380 = load float, ptr %379, align 4
  %381 = call float @CgmVec3_dot(<2 x float> %374, float %376, <2 x float> %378, float %380)
  store float %381, ptr %96, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #6
  %382 = load float, ptr %90, align 4, !tbaa !16
  %383 = load float, ptr %93, align 4, !tbaa !16
  %384 = call float @cgm_min(float noundef %382, float noundef %383)
  %385 = load float, ptr %96, align 4, !tbaa !16
  %386 = call float @cgm_min(float noundef %384, float noundef %385)
  store float %386, ptr %99, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %100) #6
  %387 = load float, ptr %90, align 4, !tbaa !16
  %388 = load float, ptr %93, align 4, !tbaa !16
  %389 = call float @cgm_max(float noundef %387, float noundef %388)
  %390 = load float, ptr %96, align 4, !tbaa !16
  %391 = call float @cgm_max(float noundef %389, float noundef %390)
  store float %391, ptr %100, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #6
  %392 = load ptr, ptr %8, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.CgmHoop3d, ptr %392, i32 0, i32 3
  %394 = load float, ptr %393, align 4, !tbaa !21
  %395 = load ptr, ptr %8, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.CgmHoop3d, ptr %395, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 4 %396, i64 12, i1 false)
  %397 = getelementptr inbounds { <2 x float>, float }, ptr %102, i32 0, i32 0
  %398 = load <2 x float>, ptr %397, align 4
  %399 = getelementptr inbounds { <2 x float>, float }, ptr %102, i32 0, i32 1
  %400 = load float, ptr %399, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %103, ptr align 4 %82, i64 12, i1 false)
  %401 = getelementptr inbounds { <2 x float>, float }, ptr %103, i32 0, i32 0
  %402 = load <2 x float>, ptr %401, align 4
  %403 = getelementptr inbounds { <2 x float>, float }, ptr %103, i32 0, i32 1
  %404 = load float, ptr %403, align 4
  %405 = call float @CgmVec3_dot(<2 x float> %398, float %400, <2 x float> %402, float %404)
  %406 = call float @llvm.fabs.f32(float %405)
  %407 = load ptr, ptr %8, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.CgmHoop3d, ptr %407, i32 0, i32 3
  %409 = load float, ptr %408, align 4, !tbaa !21
  %410 = load ptr, ptr %8, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.CgmHoop3d, ptr %410, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 4 %411, i64 12, i1 false)
  %412 = getelementptr inbounds { <2 x float>, float }, ptr %104, i32 0, i32 0
  %413 = load <2 x float>, ptr %412, align 4
  %414 = getelementptr inbounds { <2 x float>, float }, ptr %104, i32 0, i32 1
  %415 = load float, ptr %414, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %105, ptr align 4 %82, i64 12, i1 false)
  %416 = getelementptr inbounds { <2 x float>, float }, ptr %105, i32 0, i32 0
  %417 = load <2 x float>, ptr %416, align 4
  %418 = getelementptr inbounds { <2 x float>, float }, ptr %105, i32 0, i32 1
  %419 = load float, ptr %418, align 4
  %420 = call float @CgmVec3_dot(<2 x float> %413, float %415, <2 x float> %417, float %419)
  %421 = call float @llvm.fabs.f32(float %420)
  %422 = fmul float %409, %421
  %423 = call float @llvm.fmuladd.f32(float %394, float %406, float %422)
  store float %423, ptr %101, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %106) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %77, i64 12, i1 false)
  %424 = getelementptr inbounds { <2 x float>, float }, ptr %107, i32 0, i32 0
  %425 = load <2 x float>, ptr %424, align 4
  %426 = getelementptr inbounds { <2 x float>, float }, ptr %107, i32 0, i32 1
  %427 = load float, ptr %426, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 4 %82, i64 12, i1 false)
  %428 = getelementptr inbounds { <2 x float>, float }, ptr %108, i32 0, i32 0
  %429 = load <2 x float>, ptr %428, align 4
  %430 = getelementptr inbounds { <2 x float>, float }, ptr %108, i32 0, i32 1
  %431 = load float, ptr %430, align 4
  %432 = call float @CgmVec3_dot(<2 x float> %425, float %427, <2 x float> %429, float %431)
  store float %432, ptr %106, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %109) #6
  %433 = load float, ptr %101, align 4, !tbaa !16
  store float %433, ptr %109, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %110) #6
  %434 = load float, ptr %101, align 4, !tbaa !16
  %435 = load float, ptr %106, align 4, !tbaa !16
  %436 = fadd float %434, %435
  store float %436, ptr %110, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %111) #6
  %437 = load float, ptr %109, align 4, !tbaa !16
  %438 = load float, ptr %110, align 4, !tbaa !16
  %439 = call float @cgm_min(float noundef %437, float noundef %438)
  store float %439, ptr %111, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %112) #6
  %440 = load float, ptr %109, align 4, !tbaa !16
  %441 = load float, ptr %110, align 4, !tbaa !16
  %442 = call float @cgm_max(float noundef %440, float noundef %441)
  store float %442, ptr %112, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %113) #6
  %443 = load float, ptr %112, align 4, !tbaa !16
  %444 = load float, ptr %99, align 4, !tbaa !16
  %445 = fsub float %443, %444
  %446 = load float, ptr %100, align 4, !tbaa !16
  %447 = load float, ptr %111, align 4, !tbaa !16
  %448 = fsub float %446, %447
  %449 = call float @cgm_min(float noundef %445, float noundef %448)
  store float %449, ptr %113, align 4, !tbaa !16
  %450 = load float, ptr %113, align 4, !tbaa !16
  %451 = fcmp olt float %450, 0.000000e+00
  br i1 %451, label %452, label %453

452:                                              ; preds = %344
  store i8 0, ptr %6, align 1
  store i32 1, ptr %81, align 4
  br label %480

453:                                              ; preds = %344
  %454 = load float, ptr %113, align 4, !tbaa !16
  %455 = load float, ptr %76, align 4, !tbaa !16
  %456 = fcmp olt float %454, %455
  br i1 %456, label %457, label %479

457:                                              ; preds = %453
  %458 = load float, ptr %113, align 4, !tbaa !16
  store float %458, ptr %76, align 4, !tbaa !16
  %459 = load float, ptr %99, align 4, !tbaa !16
  %460 = load float, ptr %100, align 4, !tbaa !16
  %461 = load float, ptr %99, align 4, !tbaa !16
  %462 = fsub float %460, %461
  %463 = call float @llvm.fmuladd.f32(float %462, float 5.000000e-01, float %459)
  %464 = load float, ptr %111, align 4, !tbaa !16
  %465 = load float, ptr %112, align 4, !tbaa !16
  %466 = load float, ptr %111, align 4, !tbaa !16
  %467 = fsub float %465, %466
  %468 = call float @llvm.fmuladd.f32(float %467, float 5.000000e-01, float %464)
  %469 = fcmp olt float %463, %468
  store i1 false, ptr %115, align 1
  br i1 %469, label %470, label %477

470:                                              ; preds = %457
  call void @llvm.lifetime.start.p0(i64 12, ptr %114) #6
  store i1 true, ptr %115, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 4 %82, i64 12, i1 false)
  %471 = getelementptr inbounds { <2 x float>, float }, ptr %116, i32 0, i32 0
  %472 = load <2 x float>, ptr %471, align 4
  %473 = getelementptr inbounds { <2 x float>, float }, ptr %116, i32 0, i32 1
  %474 = load float, ptr %473, align 4
  %475 = call { <2 x float>, float } @CgmVec3_neg(<2 x float> %472, float %474)
  %476 = getelementptr inbounds %union.CgmVec3, ptr %114, i32 0, i32 0
  store { <2 x float>, float } %475, ptr %117, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %476, ptr align 8 %117, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %114, i64 12, i1 false), !tbaa.struct !10
  call void @llvm.lifetime.end.p0(i64 12, ptr %114) #6
  br label %478

477:                                              ; preds = %457
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %82, i64 12, i1 false), !tbaa.struct !10
  br label %478

478:                                              ; preds = %477, %470
  br label %479

479:                                              ; preds = %478, %453
  store i32 0, ptr %81, align 4
  br label %480

480:                                              ; preds = %479, %452
  call void @llvm.lifetime.end.p0(i64 4, ptr %113) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %112) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %111) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %110) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %106) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #6
  br label %481

481:                                              ; preds = %480, %343
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %82) #6
  %482 = load i32, ptr %81, align 4
  switch i32 %482, label %487 [
    i32 0, label %483
    i32 4, label %484
  ]

483:                                              ; preds = %481
  br label %484

484:                                              ; preds = %483, %481
  %485 = load i32, ptr %80, align 4, !tbaa !19
  %486 = add i32 %485, 1
  store i32 %486, ptr %80, align 4, !tbaa !19
  br label %324, !llvm.loop !22

487:                                              ; preds = %481, %327
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #6
  %488 = load i32, ptr %81, align 4
  switch i32 %488, label %522 [
    i32 2, label %489
  ]

489:                                              ; preds = %487
  %490 = load i8, ptr %11, align 1, !tbaa !9
  %491 = icmp ne i8 %490, 0
  br i1 %491, label %492, label %510

492:                                              ; preds = %489
  call void @llvm.lifetime.start.p0(i64 4, ptr %118) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %119, ptr align 4 %75, i64 12, i1 false)
  %493 = getelementptr inbounds { <2 x float>, float }, ptr %119, i32 0, i32 0
  %494 = load <2 x float>, ptr %493, align 4
  %495 = getelementptr inbounds { <2 x float>, float }, ptr %119, i32 0, i32 1
  %496 = load float, ptr %495, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %120, ptr align 4 %36, i64 12, i1 false)
  %497 = getelementptr inbounds { <2 x float>, float }, ptr %120, i32 0, i32 0
  %498 = load <2 x float>, ptr %497, align 4
  %499 = getelementptr inbounds { <2 x float>, float }, ptr %120, i32 0, i32 1
  %500 = load float, ptr %499, align 4
  %501 = call float @CgmVec3_dot(<2 x float> %494, float %496, <2 x float> %498, float %500)
  store float %501, ptr %118, align 4, !tbaa !16
  %502 = load float, ptr %118, align 4, !tbaa !16
  %503 = call zeroext i8 @cgm_approx_eq(float noundef %502, float noundef 1.000000e+00)
  %504 = icmp ne i8 %503, 0
  br i1 %504, label %506, label %505

505:                                              ; preds = %492
  store i8 0, ptr %6, align 1
  store i32 1, ptr %81, align 4
  br label %507

506:                                              ; preds = %492
  store i32 0, ptr %81, align 4
  br label %507

507:                                              ; preds = %506, %505
  call void @llvm.lifetime.end.p0(i64 4, ptr %118) #6
  %508 = load i32, ptr %81, align 4
  switch i32 %508, label %522 [
    i32 0, label %509
  ]

509:                                              ; preds = %507
  br label %510

510:                                              ; preds = %509, %489
  %511 = load ptr, ptr %9, align 8, !tbaa !5
  %512 = icmp ne ptr %511, null
  br i1 %512, label %513, label %515

513:                                              ; preds = %510
  %514 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %514, ptr align 4 %75, i64 12, i1 false), !tbaa.struct !10
  br label %515

515:                                              ; preds = %513, %510
  %516 = load ptr, ptr %10, align 8, !tbaa !5
  %517 = icmp ne ptr %516, null
  br i1 %517, label %518, label %521

518:                                              ; preds = %515
  %519 = load float, ptr %76, align 4, !tbaa !16
  %520 = load ptr, ptr %10, align 8, !tbaa !5
  store float %519, ptr %520, align 4, !tbaa !16
  br label %521

521:                                              ; preds = %518, %515
  store i8 1, ptr %6, align 1
  store i32 1, ptr %81, align 4
  br label %522

522:                                              ; preds = %521, %507, %487
  call void @llvm.lifetime.end.p0(i64 12, ptr %77) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %75) #6
  call void @llvm.lifetime.end.p0(i64 60, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  %523 = load i8, ptr %6, align 1
  ret i8 %523
}

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 "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 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 #6 = { 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 = !{i64 0, i64 12, !9}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !13, i64 8}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !13, i64 40}
!18 = !{!"CgmHoop3d", !7, i64 0, !7, i64 12, !7, i64 24, !13, i64 36, !13, i64 40}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!18, !13, i64 36}
!22 = distinct !{!22, !23}
!23 = !{!"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 }

; 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: mustprogress nofree nounwind willreturn memory(write)
declare float @sqrtf(float noundef) 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 #4

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i8 @cgm_3d_triangle_vs_hoop(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef writeonly %2, ptr noundef writeonly %3, i8 noundef zeroext %4) local_unnamed_addr #4 {
  %6 = alloca [5 x %union.CgmVec3], align 16
  %.sroa.0260.0.copyload = load <2 x float>, ptr %0, align 4
  %.sroa.2261.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 8
  %.sroa.2261.0.copyload = load float, ptr %.sroa.2261.0..sroa_idx, align 4
  %.sroa.0258.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2259.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.2259.0.copyload = load float, ptr %.sroa.2259.0..sroa_idx, align 4
  %7 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0260.0.copyload, float %.sroa.2261.0.copyload, <2 x float> %.sroa.0258.0.copyload, float %.sroa.2259.0.copyload)
  %.fca.0.extract254 = extractvalue { <2 x float>, float } %7, 0
  %.fca.1.extract255 = extractvalue { <2 x float>, float } %7, 1
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %.sroa.0248.0.copyload = load <2 x float>, ptr %8, align 4
  %.sroa.2249.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 20
  %.sroa.2249.0.copyload = load float, ptr %.sroa.2249.0..sroa_idx, align 4
  %.sroa.0246.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2247.0.copyload = load float, ptr %.sroa.2259.0..sroa_idx, align 4
  %9 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0248.0.copyload, float %.sroa.2249.0.copyload, <2 x float> %.sroa.0246.0.copyload, float %.sroa.2247.0.copyload)
  %.fca.0.extract242 = extractvalue { <2 x float>, float } %9, 0
  %.fca.1.extract243 = extractvalue { <2 x float>, float } %9, 1
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %.sroa.0236.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2237.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.2237.0.copyload = load float, ptr %.sroa.2237.0..sroa_idx, align 4
  %.sroa.0234.0.copyload = load <2 x float>, ptr %1, align 4
  %.sroa.2235.0.copyload = load float, ptr %.sroa.2259.0..sroa_idx, align 4
  %11 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0236.0.copyload, float %.sroa.2237.0.copyload, <2 x float> %.sroa.0234.0.copyload, float %.sroa.2235.0.copyload)
  %.fca.0.extract230 = extractvalue { <2 x float>, float } %11, 0
  %.fca.1.extract231 = extractvalue { <2 x float>, float } %11, 1
  %.sroa.0226.0.copyload = load <2 x float>, ptr %8, align 4
  %.sroa.2227.0.copyload = load float, ptr %.sroa.2249.0..sroa_idx, align 4
  %.sroa.0224.0.copyload = load <2 x float>, ptr %0, align 4
  %.sroa.2225.0.copyload = load float, ptr %.sroa.2261.0..sroa_idx, align 4
  %12 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0226.0.copyload, float %.sroa.2227.0.copyload, <2 x float> %.sroa.0224.0.copyload, float %.sroa.2225.0.copyload)
  %.fca.0.extract220 = extractvalue { <2 x float>, float } %12, 0
  %.fca.1.extract221 = extractvalue { <2 x float>, float } %12, 1
  %.sroa.0216.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2217.0.copyload = load float, ptr %.sroa.2237.0..sroa_idx, align 4
  %.sroa.0214.0.copyload = load <2 x float>, ptr %8, align 4
  %.sroa.2215.0.copyload = load float, ptr %.sroa.2249.0..sroa_idx, align 4
  %13 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0216.0.copyload, float %.sroa.2217.0.copyload, <2 x float> %.sroa.0214.0.copyload, float %.sroa.2215.0.copyload)
  %.fca.0.extract210 = extractvalue { <2 x float>, float } %13, 0
  %.fca.1.extract211 = extractvalue { <2 x float>, float } %13, 1
  %.sroa.0206.0.copyload = load <2 x float>, ptr %0, align 4
  %.sroa.2207.0.copyload = load float, ptr %.sroa.2261.0..sroa_idx, align 4
  %.sroa.0204.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2205.0.copyload = load float, ptr %.sroa.2237.0..sroa_idx, align 4
  %14 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0206.0.copyload, float %.sroa.2207.0.copyload, <2 x float> %.sroa.0204.0.copyload, float %.sroa.2205.0.copyload)
  %15 = tail call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %.fca.0.extract220, float %.fca.1.extract221, <2 x float> %.fca.0.extract210, float %.fca.1.extract211)
  %.fca.0.extract188 = extractvalue { <2 x float>, float } %15, 0
  %.fca.1.extract189 = extractvalue { <2 x float>, float } %15, 1
  %16 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract188, float %.fca.1.extract189)
  %.fca.0.extract182 = extractvalue { <2 x float>, float } %16, 0
  %.fca.1.extract183 = extractvalue { <2 x float>, float } %16, 1
  %17 = getelementptr inbounds i8, ptr %1, i64 12
  %18 = getelementptr inbounds i8, ptr %1, i64 24
  %.sroa.0177.0.copyload = load <2 x float>, ptr %17, align 4
  %.sroa.2178.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 20
  %.sroa.2178.0.copyload = load float, ptr %.sroa.2178.0..sroa_idx, align 4
  %.sroa.0175.0.copyload = load <2 x float>, ptr %18, align 4
  %.sroa.2176.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 32
  %.sroa.2176.0.copyload = load float, ptr %.sroa.2176.0..sroa_idx, align 4
  %19 = tail call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %.sroa.0177.0.copyload, float %.sroa.2178.0.copyload, <2 x float> %.sroa.0175.0.copyload, float %.sroa.2176.0.copyload)
  %.fca.0.extract171 = extractvalue { <2 x float>, float } %19, 0
  %.fca.1.extract172 = extractvalue { <2 x float>, float } %19, 1
  %20 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract171, float %.fca.1.extract172)
  %.fca.0.extract165 = extractvalue { <2 x float>, float } %20, 0
  %.fca.1.extract166 = extractvalue { <2 x float>, float } %20, 1
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %6) #6
  store <2 x float> %.fca.0.extract182, ptr %6, align 16
  %.sroa.5199.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract183, ptr %.sroa.5199.0..sroa_idx, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %6, i64 12
  store <2 x float> %.fca.0.extract165, ptr %21, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 20
  store float %.fca.1.extract166, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %6, i64 24
  %23 = tail call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %.fca.0.extract254, float %.fca.1.extract255, <2 x float> %.fca.0.extract242, float %.fca.1.extract243, <2 x float> zeroinitializer, float 0.000000e+00)
  %.fca.0.extract150 = extractvalue { <2 x float>, float } %23, 0
  %.fca.1.extract151 = extractvalue { <2 x float>, float } %23, 1
  %24 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract150, float %.fca.1.extract151)
  %.fca.0.extract144 = extractvalue { <2 x float>, float } %24, 0
  %.fca.1.extract145 = extractvalue { <2 x float>, float } %24, 1
  store <2 x float> %.fca.0.extract144, ptr %22, align 8
  %.sroa.2147.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 32
  store float %.fca.1.extract145, ptr %.sroa.2147.0..sroa_idx, align 16
  %25 = getelementptr inbounds i8, ptr %6, i64 36
  %26 = tail call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %.fca.0.extract242, float %.fca.1.extract243, <2 x float> %.fca.0.extract230, float %.fca.1.extract231, <2 x float> zeroinitializer, float 0.000000e+00)
  %.fca.0.extract129 = extractvalue { <2 x float>, float } %26, 0
  %.fca.1.extract130 = extractvalue { <2 x float>, float } %26, 1
  %27 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract129, float %.fca.1.extract130)
  %.fca.0.extract123 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract124 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract123, ptr %25, align 4
  %.sroa.2126.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 44
  store float %.fca.1.extract124, ptr %.sroa.2126.0..sroa_idx, align 4
  %28 = getelementptr inbounds i8, ptr %6, i64 48
  %29 = tail call { <2 x float>, float } @cgm_line_get_projected_pt(<2 x float> %.fca.0.extract230, float %.fca.1.extract231, <2 x float> %.fca.0.extract254, float %.fca.1.extract255, <2 x float> zeroinitializer, float 0.000000e+00)
  %.fca.0.extract109 = extractvalue { <2 x float>, float } %29, 0
  %.fca.1.extract110 = extractvalue { <2 x float>, float } %29, 1
  %30 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract109, float %.fca.1.extract110)
  %.fca.0.extract103 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract104 = extractvalue { <2 x float>, float } %30, 1
  store <2 x float> %.fca.0.extract103, ptr %28, align 16
  %.sroa.2106.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 56
  store float %.fca.1.extract104, ptr %.sroa.2106.0..sroa_idx, align 8
  %31 = getelementptr inbounds i8, ptr %1, i64 40
  %32 = load float, ptr %31, align 4, !tbaa !8
  %33 = fmul float %32, 2.000000e+00
  %34 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %.fca.0.extract165, float %.fca.1.extract166, float noundef %33)
  %.fca.0.extract92 = extractvalue { <2 x float>, float } %34, 0
  %.fca.1.extract93 = extractvalue { <2 x float>, float } %34, 1
  %35 = getelementptr inbounds i8, ptr %1, i64 36
  br label %36

36:                                               ; preds = %5, %81
  %indvars.iv = phi i64 [ 0, %5 ], [ %indvars.iv.next, %81 ]
  %.sroa.6.0328 = phi float [ undef, %5 ], [ %.sroa.6.3.ph, %81 ]
  %.sroa.0102.0327 = phi <2 x float> [ undef, %5 ], [ %.sroa.0102.3.ph, %81 ]
  %.0291326 = phi float [ 0x7FF0000000000000, %5 ], [ %.3294.ph, %81 ]
  %37 = getelementptr inbounds [5 x %union.CgmVec3], ptr %6, i64 0, i64 %indvars.iv
  %.sroa.074.0.copyload = load <2 x float>, ptr %37, align 4
  %.sroa.15.0..sroa_idx = getelementptr inbounds i8, ptr %37, i64 8
  %.sroa.15.0.copyload = load float, ptr %.sroa.15.0..sroa_idx, align 4, !tbaa !5
  %38 = tail call float @CgmVec3_dot(<2 x float> %.sroa.074.0.copyload, float %.sroa.15.0.copyload, <2 x float> %.sroa.074.0.copyload, float %.sroa.15.0.copyload)
  %39 = fcmp oeq float %38, 0.000000e+00
  br i1 %39, label %81, label %40

40:                                               ; preds = %36
  %41 = tail call float @sqrtf(float noundef %38) #6
  %42 = fdiv float 1.000000e+00, %41
  %43 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %.sroa.074.0.copyload, float %.sroa.15.0.copyload, float noundef %42)
  %.fca.0.extract59 = extractvalue { <2 x float>, float } %43, 0
  %.fca.1.extract60 = extractvalue { <2 x float>, float } %43, 1
  %44 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract254, float %.fca.1.extract255, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %45 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract242, float %.fca.1.extract243, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %46 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract230, float %.fca.1.extract231, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %47 = tail call float @cgm_min(float noundef %44, float noundef %45)
  %48 = tail call float @cgm_min(float noundef %47, float noundef %46)
  %49 = tail call float @cgm_max(float noundef %44, float noundef %45)
  %50 = tail call float @cgm_max(float noundef %49, float noundef %46)
  %51 = load float, ptr %35, align 4, !tbaa !11
  %.sroa.032.0.copyload = load <2 x float>, ptr %17, align 4
  %.sroa.233.0.copyload = load float, ptr %.sroa.2178.0..sroa_idx, align 4
  %52 = tail call float @CgmVec3_dot(<2 x float> %.sroa.032.0.copyload, float %.sroa.233.0.copyload, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %53 = tail call float @llvm.fabs.f32(float %52)
  %54 = load float, ptr %35, align 4, !tbaa !11
  %.sroa.028.0.copyload = load <2 x float>, ptr %18, align 4
  %.sroa.229.0.copyload = load float, ptr %.sroa.2176.0..sroa_idx, align 4
  %55 = tail call float @CgmVec3_dot(<2 x float> %.sroa.028.0.copyload, float %.sroa.229.0.copyload, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %56 = tail call float @llvm.fabs.f32(float %55)
  %57 = fmul float %54, %56
  %58 = tail call float @llvm.fmuladd.f32(float %51, float %53, float %57)
  %59 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract92, float %.fca.1.extract93, <2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %60 = fadd float %59, %58
  %61 = tail call float @cgm_min(float noundef %58, float noundef %60)
  %62 = tail call float @cgm_max(float noundef %58, float noundef %60)
  %63 = fsub float %62, %48
  %64 = fsub float %50, %61
  %65 = tail call float @cgm_min(float noundef %63, float noundef %64)
  %66 = fcmp olt float %65, 0.000000e+00
  br i1 %66, label %.loopexit, label %67

67:                                               ; preds = %40
  %68 = fcmp olt float %65, %.0291326
  br i1 %68, label %69, label %81

69:                                               ; preds = %67
  %70 = insertelement <2 x float> poison, float %50, i64 0
  %71 = insertelement <2 x float> %70, float %62, i64 1
  %72 = insertelement <2 x float> poison, float %48, i64 0
  %73 = insertelement <2 x float> %72, float %61, i64 1
  %74 = fsub <2 x float> %71, %73
  %75 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %74, <2 x float> <float 5.000000e-01, float 5.000000e-01>, <2 x float> %73)
  %76 = extractelement <2 x float> %75, i64 0
  %77 = extractelement <2 x float> %75, i64 1
  %78 = fcmp olt float %76, %77
  br i1 %78, label %79, label %81

79:                                               ; preds = %69
  %80 = tail call { <2 x float>, float } @CgmVec3_neg(<2 x float> %.fca.0.extract59, float %.fca.1.extract60)
  %.fca.0.extract = extractvalue { <2 x float>, float } %80, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %80, 1
  br label %81

81:                                               ; preds = %36, %69, %79, %67
  %.3294.ph = phi float [ %65, %69 ], [ %.0291326, %67 ], [ %65, %79 ], [ %.0291326, %36 ]
  %.sroa.0102.3.ph = phi <2 x float> [ %.fca.0.extract59, %69 ], [ %.sroa.0102.0327, %67 ], [ %.fca.0.extract, %79 ], [ %.sroa.0102.0327, %36 ]
  %.sroa.6.3.ph = phi float [ %.fca.1.extract60, %69 ], [ %.sroa.6.0328, %67 ], [ %.fca.1.extract, %79 ], [ %.sroa.6.0328, %36 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond = icmp eq i64 %indvars.iv.next, 5
  br i1 %exitcond, label %82, label %36, !llvm.loop !12

82:                                               ; preds = %81
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %86, label %83

83:                                               ; preds = %82
  %84 = tail call float @CgmVec3_dot(<2 x float> %.sroa.0102.3.ph, float %.sroa.6.3.ph, <2 x float> %.fca.0.extract182, float %.fca.1.extract183)
  %85 = tail call zeroext i8 @cgm_approx_eq(float noundef %84, float noundef 1.000000e+00)
  %.not305.not = icmp eq i8 %85, 0
  br i1 %.not305.not, label %.loopexit, label %86

86:                                               ; preds = %83, %82
  %.not306 = icmp eq ptr %2, null
  br i1 %.not306, label %88, label %87

87:                                               ; preds = %86
  store <2 x float> %.sroa.0102.3.ph, ptr %2, align 4
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store float %.sroa.6.3.ph, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %87, %86
  %.not307 = icmp eq ptr %3, null
  br i1 %.not307, label %.loopexit, label %89

89:                                               ; preds = %88
  store float %.3294.ph, ptr %3, align 4, !tbaa !14
  br label %.loopexit

.loopexit:                                        ; preds = %40, %88, %89, %83
  %.5 = phi i8 [ 0, %83 ], [ 1, %89 ], [ 1, %88 ], [ 0, %40 ]
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %6) #6
  ret i8 %.5
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #5

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 = { mustprogress nofree nounwind willreturn memory(write) "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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 40}
!9 = !{!"CgmHoop3d", !6, i64 0, !6, i64 12, !6, i64 24, !10, i64 36, !10, i64 40}
!10 = !{!"float", !6, i64 0}
!11 = !{!9, !10, i64 36}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!10, !10, i64 0}


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