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

; 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.CgmRay3d = type { %union.CgmVec3, %union.CgmVec3 }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @cgm_3d_ray_vs_triangle(ptr noundef %0, float noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i8 noundef zeroext %5) #3 {
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca [3 x %union.CgmVec3], align 16
  %15 = alloca { <2 x float>, float }, align 4
  %16 = alloca { <2 x float>, float }, align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca { <2 x float>, float }, align 4
  %19 = alloca { <2 x float>, float }, align 4
  %20 = alloca { <2 x float>, float }, align 8
  %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 [3 x [2 x %union.CgmVec3]], align 16
  %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 { <2 x float>, float }, align 4
  %29 = alloca { <2 x float>, float }, align 4
  %30 = alloca { <2 x float>, float }, align 8
  %31 = alloca { <2 x float>, float }, align 4
  %32 = alloca { <2 x float>, float }, align 4
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca %union.CgmVec3, align 4
  %35 = alloca %union.CgmVec3, align 4
  %36 = alloca { <2 x float>, float }, align 16
  %37 = alloca { <2 x float>, float }, align 4
  %38 = alloca { <2 x float>, float }, align 8
  %39 = alloca { <2 x float>, float }, align 4
  %40 = alloca { <2 x float>, float }, align 8
  %41 = alloca [2 x %union.CgmVec3], align 16
  %42 = alloca float, align 4
  %43 = alloca { <2 x float>, float }, align 4
  %44 = alloca { <2 x float>, float }, align 4
  %45 = alloca i32, align 4
  %46 = alloca %union.CgmVec3, align 4
  %47 = alloca { <2 x float>, float }, align 4
  %48 = alloca { <2 x float>, float }, align 8
  %49 = alloca %union.CgmVec3, align 4
  %50 = alloca float, align 4
  %51 = alloca i32, align 4
  %52 = alloca %union.CgmVec3, align 4
  %53 = alloca %union.CgmVec3, 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 float, align 4
  %58 = alloca { <2 x float>, float }, align 4
  %59 = alloca { <2 x float>, float }, align 4
  %60 = alloca %union.CgmVec3, align 4
  %61 = alloca { <2 x float>, float }, align 4
  %62 = alloca { <2 x float>, float }, align 8
  %63 = alloca float, align 4
  %64 = alloca { <2 x float>, float }, align 4
  %65 = alloca { <2 x float>, float }, align 4
  %66 = alloca float, align 4
  %67 = alloca { <2 x float>, float }, align 4
  %68 = alloca { <2 x float>, float }, align 4
  %69 = alloca float, align 4
  %70 = alloca { <2 x float>, float }, align 16
  %71 = alloca { <2 x float>, float }, align 4
  %72 = alloca float, align 4
  %73 = alloca { <2 x float>, float }, align 4
  %74 = alloca { <2 x float>, float }, align 4
  %75 = alloca float, align 4
  %76 = alloca { <2 x float>, float }, align 8
  %77 = alloca { <2 x float>, float }, align 4
  %78 = alloca float, align 4
  %79 = alloca float, align 4
  %80 = alloca float, align 4
  %81 = alloca float, align 4
  %82 = alloca %union.CgmVec3, align 4
  %83 = alloca { <2 x float>, float }, align 4
  %84 = alloca { <2 x float>, float }, align 8
  %85 = alloca float, align 4
  %86 = alloca { <2 x float>, float }, align 4
  %87 = alloca { <2 x float>, float }, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store float %1, ptr %9, align 4, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i8 %5, ptr %13, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr %14) #5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.anon.9, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.CgmRay3d, ptr %90, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %89, i64 12, i1 false)
  %92 = getelementptr inbounds { <2 x float>, float }, ptr %15, i32 0, i32 0
  %93 = load <2 x float>, ptr %92, align 4
  %94 = getelementptr inbounds { <2 x float>, float }, ptr %15, i32 0, i32 1
  %95 = load float, ptr %94, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %91, i64 12, i1 false)
  %96 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 0
  %97 = load <2 x float>, ptr %96, align 4
  %98 = getelementptr inbounds { <2 x float>, float }, ptr %16, i32 0, i32 1
  %99 = load float, ptr %98, align 4
  %100 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %93, float %95, <2 x float> %97, float %99)
  %101 = getelementptr inbounds %union.CgmVec3, ptr %14, i32 0, i32 0
  store { <2 x float>, float } %100, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %101, ptr align 8 %17, i64 12, i1 false)
  %102 = getelementptr inbounds %union.CgmVec3, ptr %14, i64 1
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.anon.9, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.CgmRay3d, ptr %105, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %104, i64 12, i1 false)
  %107 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 0
  %108 = load <2 x float>, ptr %107, align 4
  %109 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 1
  %110 = load float, ptr %109, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %106, i64 12, i1 false)
  %111 = getelementptr inbounds { <2 x float>, float }, ptr %19, i32 0, i32 0
  %112 = load <2 x float>, ptr %111, align 4
  %113 = getelementptr inbounds { <2 x float>, float }, ptr %19, i32 0, i32 1
  %114 = load float, ptr %113, align 4
  %115 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %108, float %110, <2 x float> %112, float %114)
  %116 = getelementptr inbounds %union.CgmVec3, ptr %102, i32 0, i32 0
  store { <2 x float>, float } %115, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 8 %20, i64 12, i1 false)
  %117 = getelementptr inbounds %union.CgmVec3, ptr %14, i64 2
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.anon.9, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.CgmRay3d, ptr %120, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %119, i64 12, i1 false)
  %122 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %123 = load <2 x float>, ptr %122, align 4
  %124 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %125 = load float, ptr %124, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %121, i64 12, i1 false)
  %126 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %127 = load <2 x float>, ptr %126, align 4
  %128 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %129 = load float, ptr %128, align 4
  %130 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %123, float %125, <2 x float> %127, float %129)
  %131 = getelementptr inbounds %union.CgmVec3, ptr %117, i32 0, i32 0
  store { <2 x float>, float } %130, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %131, ptr align 8 %23, i64 12, i1 false)
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.anon.9, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.anon.0, ptr %133, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !11
  %136 = fpext float %135 to double
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.anon.9, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %struct.anon.0, ptr %138, i32 0, i32 1
  %140 = load float, ptr %139, align 4, !tbaa !11
  %141 = fpext float %140 to double
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.anon.9, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %struct.anon.0, ptr %143, i32 0, i32 2
  %145 = load float, ptr %144, align 4, !tbaa !11
  %146 = fpext float %145 to double
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %136, double noundef %141, double noundef %146)
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.anon.9, ptr %148, i32 0, i32 1
  %150 = getelementptr inbounds %struct.anon.0, ptr %149, i32 0, i32 0
  %151 = load float, ptr %150, align 4, !tbaa !11
  %152 = fpext float %151 to double
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.anon.9, ptr %153, i32 0, i32 1
  %155 = getelementptr inbounds %struct.anon.0, ptr %154, i32 0, i32 1
  %156 = load float, ptr %155, align 4, !tbaa !11
  %157 = fpext float %156 to double
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.anon.9, ptr %158, i32 0, i32 1
  %160 = getelementptr inbounds %struct.anon.0, ptr %159, i32 0, i32 2
  %161 = load float, ptr %160, align 4, !tbaa !11
  %162 = fpext float %161 to double
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %152, double noundef %157, double noundef %162)
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.anon.9, ptr %164, i32 0, i32 2
  %166 = getelementptr inbounds %struct.anon.0, ptr %165, i32 0, i32 0
  %167 = load float, ptr %166, align 4, !tbaa !11
  %168 = fpext float %167 to double
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.anon.9, ptr %169, i32 0, i32 0
  %171 = getelementptr inbounds %struct.anon.0, ptr %170, i32 0, i32 1
  %172 = load float, ptr %171, align 4, !tbaa !11
  %173 = fpext float %172 to double
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.anon.9, ptr %174, i32 0, i32 2
  %176 = getelementptr inbounds %struct.anon.0, ptr %175, i32 0, i32 2
  %177 = load float, ptr %176, align 4, !tbaa !11
  %178 = fpext float %177 to double
  %179 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %168, double noundef %173, double noundef %178)
  call void @llvm.lifetime.start.p0(i64 72, ptr %24) #5
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.anon.9, ptr %180, i32 0, i32 1
  %182 = load ptr, ptr %10, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.anon.9, ptr %182, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %181, i64 12, i1 false)
  %184 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 0
  %185 = load <2 x float>, ptr %184, align 4
  %186 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 1
  %187 = load float, ptr %186, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %183, i64 12, i1 false)
  %188 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 0
  %189 = load <2 x float>, ptr %188, align 4
  %190 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 1
  %191 = load float, ptr %190, align 4
  %192 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %185, float %187, <2 x float> %189, float %191)
  %193 = getelementptr inbounds %union.CgmVec3, ptr %24, i32 0, i32 0
  store { <2 x float>, float } %192, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %193, ptr align 8 %27, i64 12, i1 false)
  %194 = getelementptr inbounds %union.CgmVec3, ptr %24, i64 1
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.CgmRay3d, ptr %195, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %194, ptr align 4 %196, i64 12, i1 false), !tbaa.struct !12
  %197 = getelementptr inbounds [2 x %union.CgmVec3], ptr %24, i64 1
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.anon.9, ptr %198, i32 0, i32 2
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.anon.9, ptr %200, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %199, i64 12, i1 false)
  %202 = getelementptr inbounds { <2 x float>, float }, ptr %28, i32 0, i32 0
  %203 = load <2 x float>, ptr %202, align 4
  %204 = getelementptr inbounds { <2 x float>, float }, ptr %28, i32 0, i32 1
  %205 = load float, ptr %204, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %201, i64 12, i1 false)
  %206 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 0
  %207 = load <2 x float>, ptr %206, align 4
  %208 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 1
  %209 = load float, ptr %208, align 4
  %210 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %203, float %205, <2 x float> %207, float %209)
  %211 = getelementptr inbounds %union.CgmVec3, ptr %197, i32 0, i32 0
  store { <2 x float>, float } %210, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %211, ptr align 8 %30, i64 12, i1 false)
  %212 = getelementptr inbounds %union.CgmVec3, ptr %197, i64 1
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.CgmRay3d, ptr %213, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %212, ptr align 4 %214, i64 12, i1 false), !tbaa.struct !12
  %215 = getelementptr inbounds [2 x %union.CgmVec3], ptr %24, i64 2
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.anon.9, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.anon.9, ptr %218, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %217, i64 12, i1 false)
  %220 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 0
  %221 = load <2 x float>, ptr %220, align 4
  %222 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 1
  %223 = load float, ptr %222, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %219, i64 12, i1 false)
  %224 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 0
  %225 = load <2 x float>, ptr %224, align 4
  %226 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 1
  %227 = load float, ptr %226, align 4
  %228 = call { <2 x float>, float } @CgmVec3_sub(<2 x float> %221, float %223, <2 x float> %225, float %227)
  %229 = getelementptr inbounds %union.CgmVec3, ptr %215, i32 0, i32 0
  store { <2 x float>, float } %228, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %229, ptr align 8 %33, i64 12, i1 false)
  %230 = getelementptr inbounds %union.CgmVec3, ptr %215, i64 1
  %231 = load ptr, ptr %8, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.CgmRay3d, ptr %231, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %230, ptr align 4 %232, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #5
  %233 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %24, i64 0, i64 0
  %234 = getelementptr inbounds [2 x %union.CgmVec3], ptr %233, i64 0, i64 0
  %235 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %24, i64 0, i64 0
  %236 = getelementptr inbounds [2 x %union.CgmVec3], ptr %235, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %234, i64 12, i1 false)
  %237 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 0
  %238 = load <2 x float>, ptr %237, align 16
  %239 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 1
  %240 = load float, ptr %239, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %236, i64 12, i1 false)
  %241 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 0
  %242 = load <2 x float>, ptr %241, align 4
  %243 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 1
  %244 = load float, ptr %243, align 4
  %245 = call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %238, float %240, <2 x float> %242, float %244)
  %246 = getelementptr inbounds %union.CgmVec3, ptr %35, i32 0, i32 0
  store { <2 x float>, float } %245, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %246, ptr align 8 %38, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %35, i64 12, i1 false)
  %247 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 0
  %248 = load <2 x float>, ptr %247, align 4
  %249 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 1
  %250 = load float, ptr %249, align 4
  %251 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %248, float %250)
  %252 = getelementptr inbounds %union.CgmVec3, ptr %34, i32 0, i32 0
  store { <2 x float>, float } %251, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %252, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %34, i64 12, i1 false), !tbaa.struct !12
  %253 = getelementptr inbounds %union.CgmVec3, ptr %41, i64 1
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.CgmRay3d, ptr %254, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %253, ptr align 4 %255, i64 12, i1 false), !tbaa.struct !12
  %256 = load i8, ptr %13, align 1, !tbaa !11
  %257 = icmp ne i8 %256, 0
  br i1 %257, label %258, label %278

258:                                              ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #5
  %259 = load ptr, ptr %8, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.CgmRay3d, ptr %259, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %260, i64 12, i1 false)
  %261 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 0
  %262 = load <2 x float>, ptr %261, align 4
  %263 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 1
  %264 = load float, ptr %263, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %34, i64 12, i1 false)
  %265 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 0
  %266 = load <2 x float>, ptr %265, align 4
  %267 = getelementptr inbounds { <2 x float>, float }, ptr %44, i32 0, i32 1
  %268 = load float, ptr %267, align 4
  %269 = call float @CgmVec3_dot(<2 x float> %262, float %264, <2 x float> %266, float %268)
  store float %269, ptr %42, align 4, !tbaa !9
  %270 = load float, ptr %42, align 4, !tbaa !9
  %271 = fcmp ogt float %270, 0.000000e+00
  br i1 %271, label %272, label %274

272:                                              ; preds = %258
  %273 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i8 0, ptr %7, align 1
  store i32 1, ptr %45, align 4
  br label %275

274:                                              ; preds = %258
  store i32 0, ptr %45, align 4
  br label %275

275:                                              ; preds = %274, %272
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  %276 = load i32, ptr %45, align 4
  switch i32 %276, label %517 [
    i32 0, label %277
  ]

277:                                              ; preds = %275
  br label %278

278:                                              ; preds = %277, %6
  call void @llvm.lifetime.start.p0(i64 12, ptr %46) #5
  %279 = load ptr, ptr %8, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.CgmRay3d, ptr %279, i32 0, i32 1
  %281 = load float, ptr %9, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %280, i64 12, i1 false)
  %282 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 0
  %283 = load <2 x float>, ptr %282, align 4
  %284 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 1
  %285 = load float, ptr %284, align 4
  %286 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %283, float %285, float noundef %281)
  %287 = getelementptr inbounds %union.CgmVec3, ptr %46, i32 0, i32 0
  store { <2 x float>, float } %286, ptr %48, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %287, ptr align 8 %48, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #5
  store float 0x7FF0000000000000, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #5
  store i32 0, ptr %51, align 4, !tbaa !13
  br label %288

288:                                              ; preds = %498, %278
  %289 = load i32, ptr %51, align 4, !tbaa !13
  %290 = icmp ult i32 %289, 5
  br i1 %290, label %292, label %291

291:                                              ; preds = %288
  store i32 2, ptr %45, align 4
  br label %501

292:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #5
  %293 = load i32, ptr %51, align 4, !tbaa !13
  %294 = icmp ult i32 %293, 3
  br i1 %294, label %295, label %337

295:                                              ; preds = %292
  %296 = load i32, ptr %51, align 4, !tbaa !13
  %297 = zext i32 %296 to i64
  %298 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %24, i64 0, i64 %297
  %299 = getelementptr inbounds [2 x %union.CgmVec3], ptr %298, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 8 %299, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %53) #5
  %300 = load i32, ptr %51, align 4, !tbaa !13
  %301 = zext i32 %300 to i64
  %302 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %24, i64 0, i64 %301
  %303 = getelementptr inbounds [2 x %union.CgmVec3], ptr %302, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %52, i64 12, i1 false)
  %304 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 0
  %305 = load <2 x float>, ptr %304, align 4
  %306 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 1
  %307 = load float, ptr %306, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %303, i64 12, i1 false)
  %308 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 0
  %309 = load <2 x float>, ptr %308, align 4
  %310 = getelementptr inbounds { <2 x float>, float }, ptr %55, i32 0, i32 1
  %311 = load float, ptr %310, align 4
  %312 = call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %305, float %307, <2 x float> %309, float %311)
  %313 = getelementptr inbounds %union.CgmVec3, ptr %53, i32 0, i32 0
  store { <2 x float>, float } %312, ptr %56, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %313, ptr align 8 %56, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %53, i64 12, i1 false)
  %314 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 0
  %315 = load <2 x float>, ptr %314, align 4
  %316 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 1
  %317 = load float, ptr %316, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %53, i64 12, i1 false)
  %318 = getelementptr inbounds { <2 x float>, float }, ptr %59, i32 0, i32 0
  %319 = load <2 x float>, ptr %318, align 4
  %320 = getelementptr inbounds { <2 x float>, float }, ptr %59, i32 0, i32 1
  %321 = load float, ptr %320, align 4
  %322 = call float @CgmVec3_dot(<2 x float> %315, float %317, <2 x float> %319, float %321)
  store float %322, ptr %57, align 4, !tbaa !9
  %323 = load float, ptr %57, align 4, !tbaa !9
  %324 = call zeroext i8 @cgm_approx_eq(float noundef %323, float noundef 0.000000e+00)
  %325 = icmp ne i8 %324, 0
  br i1 %325, label %326, label %327

326:                                              ; preds = %295
  store i32 4, ptr %45, align 4
  br label %334

327:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 12, ptr %60) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %53, i64 12, i1 false)
  %328 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 0
  %329 = load <2 x float>, ptr %328, align 4
  %330 = getelementptr inbounds { <2 x float>, float }, ptr %61, i32 0, i32 1
  %331 = load float, ptr %330, align 4
  %332 = call { <2 x float>, float } @CgmVec3_norm(<2 x float> %329, float %331)
  %333 = getelementptr inbounds %union.CgmVec3, ptr %60, i32 0, i32 0
  store { <2 x float>, float } %332, ptr %62, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %333, ptr align 8 %62, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 4 %60, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %60) #5
  store i32 0, ptr %45, align 4
  br label %334

334:                                              ; preds = %327, %326
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %53) #5
  %335 = load i32, ptr %45, align 4
  switch i32 %335, label %495 [
    i32 0, label %336
  ]

336:                                              ; preds = %334
  br label %342

337:                                              ; preds = %292
  %338 = load i32, ptr %51, align 4, !tbaa !13
  %339 = sub i32 %338, 3
  %340 = zext i32 %339 to i64
  %341 = getelementptr inbounds [2 x %union.CgmVec3], ptr %41, i64 0, i64 %340
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 4 %341, i64 12, i1 false), !tbaa.struct !12
  br label %342

342:                                              ; preds = %337, %336
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #5
  %343 = load ptr, ptr %8, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.CgmRay3d, ptr %343, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %344, i64 12, i1 false)
  %345 = getelementptr inbounds { <2 x float>, float }, ptr %64, i32 0, i32 0
  %346 = load <2 x float>, ptr %345, align 4
  %347 = getelementptr inbounds { <2 x float>, float }, ptr %64, i32 0, i32 1
  %348 = load float, ptr %347, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %52, i64 12, i1 false)
  %349 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 0
  %350 = load <2 x float>, ptr %349, align 4
  %351 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 1
  %352 = load float, ptr %351, align 4
  %353 = call float @CgmVec3_dot(<2 x float> %346, float %348, <2 x float> %350, float %352)
  store float %353, ptr %63, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 4 %46, i64 12, i1 false)
  %354 = getelementptr inbounds { <2 x float>, float }, ptr %67, i32 0, i32 0
  %355 = load <2 x float>, ptr %354, align 4
  %356 = getelementptr inbounds { <2 x float>, float }, ptr %67, i32 0, i32 1
  %357 = load float, ptr %356, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 4 %52, i64 12, i1 false)
  %358 = getelementptr inbounds { <2 x float>, float }, ptr %68, i32 0, i32 0
  %359 = load <2 x float>, ptr %358, align 4
  %360 = getelementptr inbounds { <2 x float>, float }, ptr %68, i32 0, i32 1
  %361 = load float, ptr %360, align 4
  %362 = call float @CgmVec3_dot(<2 x float> %355, float %357, <2 x float> %359, float %361)
  store float %362, ptr %66, align 4, !tbaa !9
  %363 = load float, ptr %63, align 4, !tbaa !9
  %364 = fcmp oeq float %363, 0.000000e+00
  br i1 %364, label %365, label %366

365:                                              ; preds = %342
  store float 0.000000e+00, ptr %66, align 4, !tbaa !9
  br label %366

366:                                              ; preds = %365, %342
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #5
  %367 = getelementptr inbounds [3 x %union.CgmVec3], ptr %14, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %70, ptr align 16 %367, i64 12, i1 false)
  %368 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 0
  %369 = load <2 x float>, ptr %368, align 16
  %370 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 1
  %371 = load float, ptr %370, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %52, i64 12, i1 false)
  %372 = getelementptr inbounds { <2 x float>, float }, ptr %71, i32 0, i32 0
  %373 = load <2 x float>, ptr %372, align 4
  %374 = getelementptr inbounds { <2 x float>, float }, ptr %71, i32 0, i32 1
  %375 = load float, ptr %374, align 4
  %376 = call float @CgmVec3_dot(<2 x float> %369, float %371, <2 x float> %373, float %375)
  store float %376, ptr %69, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #5
  %377 = getelementptr inbounds [3 x %union.CgmVec3], ptr %14, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %377, i64 12, i1 false)
  %378 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 0
  %379 = load <2 x float>, ptr %378, align 4
  %380 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 1
  %381 = load float, ptr %380, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 4 %52, i64 12, i1 false)
  %382 = getelementptr inbounds { <2 x float>, float }, ptr %74, i32 0, i32 0
  %383 = load <2 x float>, ptr %382, align 4
  %384 = getelementptr inbounds { <2 x float>, float }, ptr %74, i32 0, i32 1
  %385 = load float, ptr %384, align 4
  %386 = call float @CgmVec3_dot(<2 x float> %379, float %381, <2 x float> %383, float %385)
  store float %386, ptr %72, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #5
  %387 = getelementptr inbounds [3 x %union.CgmVec3], ptr %14, i64 0, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %76, ptr align 8 %387, i64 12, i1 false)
  %388 = getelementptr inbounds { <2 x float>, float }, ptr %76, i32 0, i32 0
  %389 = load <2 x float>, ptr %388, align 8
  %390 = getelementptr inbounds { <2 x float>, float }, ptr %76, i32 0, i32 1
  %391 = load float, ptr %390, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %52, i64 12, i1 false)
  %392 = getelementptr inbounds { <2 x float>, float }, ptr %77, i32 0, i32 0
  %393 = load <2 x float>, ptr %392, align 4
  %394 = getelementptr inbounds { <2 x float>, float }, ptr %77, i32 0, i32 1
  %395 = load float, ptr %394, align 4
  %396 = call float @CgmVec3_dot(<2 x float> %389, float %391, <2 x float> %393, float %395)
  store float %396, ptr %75, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #5
  %397 = load float, ptr %69, align 4, !tbaa !9
  %398 = load float, ptr %72, align 4, !tbaa !9
  %399 = call float @cgm_min(float noundef %397, float noundef %398)
  %400 = load float, ptr %75, align 4, !tbaa !9
  %401 = call float @cgm_min(float noundef %399, float noundef %400)
  store float %401, ptr %78, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #5
  %402 = load float, ptr %69, align 4, !tbaa !9
  %403 = load float, ptr %72, align 4, !tbaa !9
  %404 = call float @cgm_max(float noundef %402, float noundef %403)
  %405 = load float, ptr %75, align 4, !tbaa !9
  %406 = call float @cgm_max(float noundef %404, float noundef %405)
  store float %406, ptr %79, align 4, !tbaa !9
  %407 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 0
  %408 = load float, ptr %407, align 4, !tbaa !11
  %409 = fpext float %408 to double
  %410 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 1
  %411 = load float, ptr %410, align 4, !tbaa !11
  %412 = fpext float %411 to double
  %413 = getelementptr inbounds %struct.anon.0, ptr %52, i32 0, i32 2
  %414 = load float, ptr %413, align 4, !tbaa !11
  %415 = fpext float %414 to double
  %416 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, double noundef %409, double noundef %412, double noundef %415)
  %417 = load float, ptr %63, align 4, !tbaa !9
  %418 = fpext float %417 to double
  %419 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %418)
  %420 = load float, ptr %78, align 4, !tbaa !9
  %421 = fpext float %420 to double
  %422 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %421)
  %423 = load float, ptr %79, align 4, !tbaa !9
  %424 = fpext float %423 to double
  %425 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, double noundef %424)
  %426 = load float, ptr %63, align 4, !tbaa !9
  %427 = fcmp ogt float %426, 0.000000e+00
  br i1 %427, label %428, label %433

428:                                              ; preds = %366
  %429 = load float, ptr %79, align 4, !tbaa !9
  %430 = fcmp olt float %429, 0.000000e+00
  br i1 %430, label %431, label %433

431:                                              ; preds = %428
  %432 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i8 0, ptr %7, align 1
  store i32 1, ptr %45, align 4
  br label %494

433:                                              ; preds = %428, %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #5
  %434 = load float, ptr %79, align 4, !tbaa !9
  %435 = fneg float %434
  %436 = load float, ptr %78, align 4, !tbaa !9
  %437 = call float @cgm_max(float noundef %435, float noundef %436)
  store float %437, ptr %80, align 4, !tbaa !9
  %438 = load float, ptr %80, align 4, !tbaa !9
  %439 = fpext float %438 to double
  %440 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %439)
  %441 = load float, ptr %66, align 4, !tbaa !9
  %442 = fpext float %441 to double
  %443 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %442)
  %444 = load float, ptr %80, align 4, !tbaa !9
  %445 = load float, ptr %66, align 4, !tbaa !9
  %446 = fcmp ogt float %444, %445
  br i1 %446, label %447, label %449

447:                                              ; preds = %433
  %448 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i8 0, ptr %7, align 1
  store i32 1, ptr %45, align 4
  br label %493

449:                                              ; preds = %433
  %450 = load float, ptr %63, align 4, !tbaa !9
  %451 = call zeroext i8 @cgm_approx_eq(float noundef %450, float noundef 0.000000e+00)
  %452 = icmp ne i8 %451, 0
  br i1 %452, label %453, label %454

453:                                              ; preds = %449
  store i32 4, ptr %45, align 4
  br label %493

454:                                              ; preds = %449
  %455 = load float, ptr %78, align 4, !tbaa !9
  %456 = fcmp olt float %455, 0.000000e+00
  br i1 %456, label %457, label %461

457:                                              ; preds = %454
  %458 = load float, ptr %79, align 4, !tbaa !9
  %459 = fcmp ogt float %458, 0.000000e+00
  br i1 %459, label %460, label %461

460:                                              ; preds = %457
  store i32 4, ptr %45, align 4
  br label %493

461:                                              ; preds = %457, %454
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #5
  %462 = load float, ptr %78, align 4, !tbaa !9
  store float %462, ptr %81, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %82) #5
  %463 = load float, ptr %81, align 4, !tbaa !9
  %464 = fneg float %463
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 4 %52, i64 12, i1 false)
  %465 = getelementptr inbounds { <2 x float>, float }, ptr %83, i32 0, i32 0
  %466 = load <2 x float>, ptr %465, align 4
  %467 = getelementptr inbounds { <2 x float>, float }, ptr %83, i32 0, i32 1
  %468 = load float, ptr %467, align 4
  %469 = call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %466, float %468, float noundef %464)
  %470 = getelementptr inbounds %union.CgmVec3, ptr %82, i32 0, i32 0
  store { <2 x float>, float } %469, ptr %84, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %470, ptr align 8 %84, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #5
  %471 = load ptr, ptr %8, align 8, !tbaa !5
  %472 = getelementptr inbounds %struct.CgmRay3d, ptr %471, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %86, ptr align 4 %472, i64 12, i1 false)
  %473 = getelementptr inbounds { <2 x float>, float }, ptr %86, i32 0, i32 0
  %474 = load <2 x float>, ptr %473, align 4
  %475 = getelementptr inbounds { <2 x float>, float }, ptr %86, i32 0, i32 1
  %476 = load float, ptr %475, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 4 %82, i64 12, i1 false)
  %477 = getelementptr inbounds { <2 x float>, float }, ptr %87, i32 0, i32 0
  %478 = load <2 x float>, ptr %477, align 4
  %479 = getelementptr inbounds { <2 x float>, float }, ptr %87, i32 0, i32 1
  %480 = load float, ptr %479, align 4
  %481 = call float @CgmVec3_dot(<2 x float> %474, float %476, <2 x float> %478, float %480)
  store float %481, ptr %85, align 4, !tbaa !9
  %482 = load float, ptr %85, align 4, !tbaa !9
  %483 = fcmp olt float %482, 0.000000e+00
  br i1 %483, label %484, label %485

484:                                              ; preds = %461
  store i32 4, ptr %45, align 4
  br label %492

485:                                              ; preds = %461
  %486 = load float, ptr %85, align 4, !tbaa !9
  %487 = load float, ptr %50, align 4, !tbaa !9
  %488 = fcmp olt float %486, %487
  br i1 %488, label %489, label %491

489:                                              ; preds = %485
  %490 = load float, ptr %81, align 4, !tbaa !9
  store float %490, ptr %50, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %52, i64 12, i1 false), !tbaa.struct !12
  br label %491

491:                                              ; preds = %489, %485
  store i32 0, ptr %45, align 4
  br label %492

492:                                              ; preds = %491, %484
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %82) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #5
  br label %493

493:                                              ; preds = %492, %460, %453, %447
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #5
  br label %494

494:                                              ; preds = %493, %431
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #5
  br label %495

495:                                              ; preds = %494, %334
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #5
  %496 = load i32, ptr %45, align 4
  switch i32 %496, label %501 [
    i32 0, label %497
    i32 4, label %498
  ]

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497, %495
  %499 = load i32, ptr %51, align 4, !tbaa !13
  %500 = add i32 %499, 1
  store i32 %500, ptr %51, align 4, !tbaa !13
  br label %288, !llvm.loop !15

501:                                              ; preds = %495, %291
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #5
  %502 = load i32, ptr %45, align 4
  switch i32 %502, label %516 [
    i32 2, label %503
  ]

503:                                              ; preds = %501
  %504 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %505 = load ptr, ptr %11, align 8, !tbaa !5
  %506 = icmp ne ptr %505, null
  br i1 %506, label %507, label %509

507:                                              ; preds = %503
  %508 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %508, ptr align 4 %49, i64 12, i1 false), !tbaa.struct !12
  br label %509

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

512:                                              ; preds = %509
  %513 = load float, ptr %50, align 4, !tbaa !9
  %514 = load ptr, ptr %12, align 8, !tbaa !5
  store float %513, ptr %514, align 4, !tbaa !9
  br label %515

515:                                              ; preds = %512, %509
  store i8 1, ptr %7, align 1
  store i32 1, ptr %45, align 4
  br label %516

516:                                              ; preds = %515, %501
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #5
  br label %517

517:                                              ; preds = %516, %275
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #5
  %518 = load i8, ptr %7, align 1
  ret i8 %518
}

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 12, !11}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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 }

@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; 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_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
define dso_local zeroext range(i8 0, 2) i8 @cgm_3d_ray_vs_triangle(ptr nocapture noundef readonly %0, float noundef %1, ptr nocapture noundef readonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4, i8 noundef zeroext %5) local_unnamed_addr #3 {
  %7 = alloca [3 x [2 x %union.CgmVec3]], align 16
  %8 = alloca [2 x %union.CgmVec3], align 16
  %.sroa.0185.0.copyload = load <2 x float>, ptr %2, align 4
  %.sroa.2186.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  %.sroa.2186.0.copyload = load float, ptr %.sroa.2186.0..sroa_idx, align 4
  %.sroa.0183.0.copyload = load <2 x float>, ptr %0, align 4
  %.sroa.2184.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 8
  %.sroa.2184.0.copyload = load float, ptr %.sroa.2184.0..sroa_idx, align 4
  %9 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0185.0.copyload, float %.sroa.2186.0.copyload, <2 x float> %.sroa.0183.0.copyload, float %.sroa.2184.0.copyload)
  %.fca.0.extract179 = extractvalue { <2 x float>, float } %9, 0
  %.fca.1.extract180 = extractvalue { <2 x float>, float } %9, 1
  %10 = getelementptr inbounds i8, ptr %2, i64 12
  %.sroa.0177.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2178.0..sroa_idx = getelementptr inbounds i8, ptr %2, 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 %0, align 4
  %.sroa.2176.0.copyload = load float, ptr %.sroa.2184.0..sroa_idx, align 4
  %11 = tail call { <2 x float>, float } @CgmVec3_sub(<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 } %11, 0
  %.fca.1.extract172 = extractvalue { <2 x float>, float } %11, 1
  %12 = getelementptr inbounds i8, ptr %2, i64 24
  %.sroa.0169.0.copyload = load <2 x float>, ptr %12, align 4
  %.sroa.2170.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 32
  %.sroa.2170.0.copyload = load float, ptr %.sroa.2170.0..sroa_idx, align 4
  %.sroa.0167.0.copyload = load <2 x float>, ptr %0, align 4
  %.sroa.2168.0.copyload = load float, ptr %.sroa.2184.0..sroa_idx, align 4
  %13 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0169.0.copyload, float %.sroa.2170.0.copyload, <2 x float> %.sroa.0167.0.copyload, float %.sroa.2168.0.copyload)
  %.fca.0.extract163 = extractvalue { <2 x float>, float } %13, 0
  %.fca.1.extract164 = extractvalue { <2 x float>, float } %13, 1
  %14 = load float, ptr %2, align 4, !tbaa !5
  %15 = fpext float %14 to double
  %16 = getelementptr inbounds i8, ptr %2, i64 4
  %17 = load float, ptr %16, align 4, !tbaa !5
  %18 = fpext float %17 to double
  %19 = load float, ptr %.sroa.2186.0..sroa_idx, align 4, !tbaa !5
  %20 = fpext float %19 to double
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %15, double noundef %18, double noundef %20)
  %22 = load float, ptr %10, align 4, !tbaa !5
  %23 = fpext float %22 to double
  %24 = getelementptr inbounds i8, ptr %2, i64 16
  %25 = load float, ptr %24, align 4, !tbaa !5
  %26 = fpext float %25 to double
  %27 = load float, ptr %.sroa.2178.0..sroa_idx, align 4, !tbaa !5
  %28 = fpext float %27 to double
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %23, double noundef %26, double noundef %28)
  %30 = load float, ptr %12, align 4, !tbaa !5
  %31 = fpext float %30 to double
  %32 = load float, ptr %16, align 4, !tbaa !5
  %33 = fpext float %32 to double
  %34 = load float, ptr %.sroa.2170.0..sroa_idx, align 4, !tbaa !5
  %35 = fpext float %34 to double
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %31, double noundef %33, double noundef %35)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #5
  %.sroa.0161.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2162.0.copyload = load float, ptr %.sroa.2178.0..sroa_idx, align 4
  %.sroa.0159.0.copyload = load <2 x float>, ptr %2, align 4
  %.sroa.2160.0.copyload = load float, ptr %.sroa.2186.0..sroa_idx, align 4
  %37 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0161.0.copyload, float %.sroa.2162.0.copyload, <2 x float> %.sroa.0159.0.copyload, float %.sroa.2160.0.copyload)
  %.fca.0.extract155 = extractvalue { <2 x float>, float } %37, 0
  %.fca.1.extract156 = extractvalue { <2 x float>, float } %37, 1
  store <2 x float> %.fca.0.extract155, ptr %7, align 16
  %.sroa.2158.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store float %.fca.1.extract156, ptr %.sroa.2158.0..sroa_idx, align 8
  %38 = getelementptr inbounds i8, ptr %7, i64 12
  %39 = getelementptr inbounds i8, ptr %0, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %39, i64 12, i1 false), !tbaa.struct !8
  %40 = getelementptr inbounds i8, ptr %7, i64 24
  %.sroa.0153.0.copyload = load <2 x float>, ptr %12, align 4
  %.sroa.2154.0.copyload = load float, ptr %.sroa.2170.0..sroa_idx, align 4
  %.sroa.0151.0.copyload = load <2 x float>, ptr %10, align 4
  %.sroa.2152.0.copyload = load float, ptr %.sroa.2178.0..sroa_idx, align 4
  %41 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0153.0.copyload, float %.sroa.2154.0.copyload, <2 x float> %.sroa.0151.0.copyload, float %.sroa.2152.0.copyload)
  %.fca.0.extract147 = extractvalue { <2 x float>, float } %41, 0
  %.fca.1.extract148 = extractvalue { <2 x float>, float } %41, 1
  store <2 x float> %.fca.0.extract147, ptr %40, align 8
  %.sroa.2150.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 32
  store float %.fca.1.extract148, ptr %.sroa.2150.0..sroa_idx, align 16
  %42 = getelementptr inbounds i8, ptr %7, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %42, ptr noundef nonnull align 4 dereferenceable(12) %39, i64 12, i1 false), !tbaa.struct !8
  %43 = getelementptr inbounds i8, ptr %7, i64 48
  %.sroa.0145.0.copyload = load <2 x float>, ptr %2, align 4
  %.sroa.2146.0.copyload = load float, ptr %.sroa.2186.0..sroa_idx, align 4
  %.sroa.0143.0.copyload = load <2 x float>, ptr %12, align 4
  %.sroa.2144.0.copyload = load float, ptr %.sroa.2170.0..sroa_idx, align 4
  %44 = tail call { <2 x float>, float } @CgmVec3_sub(<2 x float> %.sroa.0145.0.copyload, float %.sroa.2146.0.copyload, <2 x float> %.sroa.0143.0.copyload, float %.sroa.2144.0.copyload)
  %.fca.0.extract139 = extractvalue { <2 x float>, float } %44, 0
  %.fca.1.extract140 = extractvalue { <2 x float>, float } %44, 1
  store <2 x float> %.fca.0.extract139, ptr %43, align 16
  %.sroa.2142.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 56
  store float %.fca.1.extract140, ptr %.sroa.2142.0..sroa_idx, align 8
  %45 = getelementptr inbounds i8, ptr %7, i64 60
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %39, i64 12, i1 false), !tbaa.struct !8
  %.sroa.0132.0.copyload = load <2 x float>, ptr %38, align 4
  %.sroa.2133.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 20
  %.sroa.2133.0.copyload = load float, ptr %.sroa.2133.0..sroa_idx, align 4
  %46 = tail call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %.fca.0.extract155, float %.fca.1.extract156, <2 x float> %.sroa.0132.0.copyload, float %.sroa.2133.0.copyload)
  %.fca.0.extract128 = extractvalue { <2 x float>, float } %46, 0
  %.fca.1.extract129 = extractvalue { <2 x float>, float } %46, 1
  %47 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract128, float %.fca.1.extract129)
  %.fca.0.extract122 = extractvalue { <2 x float>, float } %47, 0
  %.fca.1.extract123 = extractvalue { <2 x float>, float } %47, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  store <2 x float> %.fca.0.extract122, ptr %8, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store float %.fca.1.extract123, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %8, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %39, i64 12, i1 false), !tbaa.struct !8
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %.critedge, label %49

49:                                               ; preds = %6
  %.sroa.0119.0.copyload = load <2 x float>, ptr %39, align 4
  %.sroa.2120.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 20
  %.sroa.2120.0.copyload = load float, ptr %.sroa.2120.0..sroa_idx, align 4
  %50 = tail call float @CgmVec3_dot(<2 x float> %.sroa.0119.0.copyload, float %.sroa.2120.0.copyload, <2 x float> %.fca.0.extract122, float %.fca.1.extract123)
  %51 = fcmp ule float %50, 0.000000e+00
  br i1 %51, label %.critedge, label %52

52:                                               ; preds = %49
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread260

.critedge:                                        ; preds = %49, %6
  %.sroa.0109.0.copyload = load <2 x float>, ptr %39, align 4
  %.sroa.2110.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 20
  %.sroa.2110.0.copyload = load float, ptr %.sroa.2110.0..sroa_idx, align 4
  %54 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %.sroa.0109.0.copyload, float %.sroa.2110.0.copyload, float noundef %1)
  %.fca.0.extract105 = extractvalue { <2 x float>, float } %54, 0
  %.fca.1.extract106 = extractvalue { <2 x float>, float } %54, 1
  br label %55

55:                                               ; preds = %.critedge, %114
  %indvars.iv = phi i64 [ 0, %.critedge ], [ %indvars.iv.next, %114 ]
  %.sroa.4104.0274 = phi float [ undef, %.critedge ], [ %.sroa.4104.5.ph, %114 ]
  %.sroa.0103.0273 = phi <2 x float> [ undef, %.critedge ], [ %.sroa.0103.5.ph, %114 ]
  %.0233272 = phi float [ 0x7FF0000000000000, %.critedge ], [ %.5238.ph, %114 ]
  %56 = icmp ult i64 %indvars.iv, 3
  br i1 %56, label %57, label %64

57:                                               ; preds = %55
  %58 = getelementptr inbounds [3 x [2 x %union.CgmVec3]], ptr %7, i64 0, i64 %indvars.iv
  %.sroa.082.0.copyload = load <2 x float>, ptr %58, align 8
  %.sroa.15.0..sroa_idx = getelementptr inbounds i8, ptr %58, i64 8
  %.sroa.15.0.copyload = load float, ptr %.sroa.15.0..sroa_idx, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 12
  %.sroa.075.0.copyload = load <2 x float>, ptr %59, align 4
  %.sroa.276.0..sroa_idx = getelementptr inbounds i8, ptr %58, i64 20
  %.sroa.276.0.copyload = load float, ptr %.sroa.276.0..sroa_idx, align 4
  %60 = tail call { <2 x float>, float } @CgmVec3_mul_cross(<2 x float> %.sroa.082.0.copyload, float %.sroa.15.0.copyload, <2 x float> %.sroa.075.0.copyload, float %.sroa.276.0.copyload)
  %.fca.0.extract71 = extractvalue { <2 x float>, float } %60, 0
  %.fca.1.extract72 = extractvalue { <2 x float>, float } %60, 1
  %61 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract71, float %.fca.1.extract72, <2 x float> %.fca.0.extract71, float %.fca.1.extract72)
  %62 = tail call zeroext i8 @cgm_approx_eq(float noundef %61, float noundef 0.000000e+00)
  %.not244 = icmp eq i8 %62, 0
  br i1 %.not244, label %.thread, label %114

.thread:                                          ; preds = %57
  %63 = tail call { <2 x float>, float } @CgmVec3_norm(<2 x float> %.fca.0.extract71, float %.fca.1.extract72)
  %.fca.0.extract58 = extractvalue { <2 x float>, float } %63, 0
  %.fca.1.extract59 = extractvalue { <2 x float>, float } %63, 1
  br label %67

64:                                               ; preds = %55
  %65 = add nsw i64 %indvars.iv, -3
  %66 = getelementptr inbounds [2 x %union.CgmVec3], ptr %8, i64 0, i64 %65
  %.sroa.082.0.copyload90 = load <2 x float>, ptr %66, align 4
  %.sroa.15.0..sroa_idx92 = getelementptr inbounds i8, ptr %66, i64 8
  %.sroa.15.0.copyload93 = load float, ptr %.sroa.15.0..sroa_idx92, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %.thread, %64
  %.sroa.082.1 = phi <2 x float> [ %.sroa.082.0.copyload90, %64 ], [ %.fca.0.extract58, %.thread ]
  %.sroa.15.1 = phi float [ %.sroa.15.0.copyload93, %64 ], [ %.fca.1.extract59, %.thread ]
  %.sroa.052.0.copyload = load <2 x float>, ptr %39, align 4
  %.sroa.253.0.copyload = load float, ptr %.sroa.2110.0..sroa_idx, align 4
  %68 = tail call float @CgmVec3_dot(<2 x float> %.sroa.052.0.copyload, float %.sroa.253.0.copyload, <2 x float> %.sroa.082.1, float %.sroa.15.1)
  %69 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract105, float %.fca.1.extract106, <2 x float> %.sroa.082.1, float %.sroa.15.1)
  %70 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract179, float %.fca.1.extract180, <2 x float> %.sroa.082.1, float %.sroa.15.1)
  %71 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract171, float %.fca.1.extract172, <2 x float> %.sroa.082.1, float %.sroa.15.1)
  %72 = tail call float @CgmVec3_dot(<2 x float> %.fca.0.extract163, float %.fca.1.extract164, <2 x float> %.sroa.082.1, float %.sroa.15.1)
  %73 = tail call float @cgm_min(float noundef %70, float noundef %71)
  %74 = tail call float @cgm_min(float noundef %73, float noundef %72)
  %75 = tail call float @cgm_max(float noundef %70, float noundef %71)
  %76 = tail call float @cgm_max(float noundef %75, float noundef %72)
  %.sroa.082.0.vec.extract = extractelement <2 x float> %.sroa.082.1, i64 0
  %77 = fpext float %.sroa.082.0.vec.extract to double
  %.sroa.082.4.vec.extract = extractelement <2 x float> %.sroa.082.1, i64 1
  %78 = fpext float %.sroa.082.4.vec.extract to double
  %79 = fpext float %.sroa.15.1 to double
  %80 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, double noundef %77, double noundef %78, double noundef %79)
  %81 = fpext float %68 to double
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %81)
  %83 = fpext float %74 to double
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %83)
  %85 = fpext float %76 to double
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, double noundef %85)
  %87 = fcmp ogt float %68, 0.000000e+00
  %88 = fcmp olt float %76, 0.000000e+00
  %or.cond = select i1 %87, i1 %88, i1 false
  br i1 %or.cond, label %89, label %91

89:                                               ; preds = %67
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread260

91:                                               ; preds = %67
  %92 = fcmp oeq float %68, 0.000000e+00
  %.0241 = select i1 %92, float 0.000000e+00, float %69
  %93 = fneg float %76
  %94 = tail call float @cgm_max(float noundef %93, float noundef %74)
  %95 = fpext float %94 to double
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %95)
  %97 = fpext float %.0241 to double
  %98 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %97)
  %99 = fcmp ogt float %94, %.0241
  br i1 %99, label %100, label %102

100:                                              ; preds = %91
  %101 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %.thread260

102:                                              ; preds = %91
  %103 = tail call zeroext i8 @cgm_approx_eq(float noundef %68, float noundef 0.000000e+00)
  %.not245 = icmp eq i8 %103, 0
  br i1 %.not245, label %104, label %114

104:                                              ; preds = %102
  %105 = fcmp olt float %74, 0.000000e+00
  %106 = fcmp ogt float %76, 0.000000e+00
  %or.cond5 = select i1 %105, i1 %106, i1 false
  br i1 %or.cond5, label %114, label %107

107:                                              ; preds = %104
  %108 = fneg float %74
  %109 = tail call { <2 x float>, float } @CgmVec3_mul_scalar(<2 x float> %.sroa.082.1, float %.sroa.15.1, float noundef %108)
  %.fca.0.extract = extractvalue { <2 x float>, float } %109, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %109, 1
  %.sroa.06.0.copyload = load <2 x float>, ptr %39, align 4
  %.sroa.27.0.copyload = load float, ptr %.sroa.2110.0..sroa_idx, align 4
  %110 = tail call float @CgmVec3_dot(<2 x float> %.sroa.06.0.copyload, float %.sroa.27.0.copyload, <2 x float> %.fca.0.extract, float %.fca.1.extract)
  %111 = fcmp olt float %110, 0.000000e+00
  br i1 %111, label %114, label %112

112:                                              ; preds = %107
  %113 = fcmp olt float %110, %.0233272
  %.1234 = select i1 %113, float %74, float %.0233272
  %.sroa.0103.1 = select i1 %113, <2 x float> %.sroa.082.1, <2 x float> %.sroa.0103.0273
  %.sroa.4104.1 = select i1 %113, float %.sroa.15.1, float %.sroa.4104.0274
  br label %114

114:                                              ; preds = %102, %104, %112, %107, %57
  %.5238.ph = phi float [ %.0233272, %57 ], [ %.0233272, %107 ], [ %.1234, %112 ], [ %.0233272, %104 ], [ %.0233272, %102 ]
  %.sroa.0103.5.ph = phi <2 x float> [ %.sroa.0103.0273, %57 ], [ %.sroa.0103.0273, %107 ], [ %.sroa.0103.1, %112 ], [ %.sroa.0103.0273, %104 ], [ %.sroa.0103.0273, %102 ]
  %.sroa.4104.5.ph = phi float [ %.sroa.4104.0274, %57 ], [ %.sroa.4104.0274, %107 ], [ %.sroa.4104.1, %112 ], [ %.sroa.4104.0274, %104 ], [ %.sroa.4104.0274, %102 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond = icmp eq i64 %indvars.iv.next, 5
  br i1 %exitcond, label %115, label %55, !llvm.loop !9

115:                                              ; preds = %114
  %116 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %.not246 = icmp eq ptr %3, null
  br i1 %.not246, label %118, label %117

117:                                              ; preds = %115
  store <2 x float> %.sroa.0103.5.ph, ptr %3, align 4
  %.sroa.4104.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store float %.sroa.4104.5.ph, ptr %.sroa.4104.0..sroa_idx, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %117, %115
  %.not247 = icmp eq ptr %4, null
  br i1 %.not247, label %.thread260, label %119

119:                                              ; preds = %118
  store float %.5238.ph, ptr %4, align 4, !tbaa !11
  br label %.thread260

.thread260:                                       ; preds = %89, %100, %52, %119, %118
  %.8 = phi i8 [ 0, %52 ], [ 1, %119 ], [ 1, %118 ], [ 0, %100 ], [ 0, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #5
  ret i8 %.8
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree 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 = { 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 = !{i64 0, i64 12, !5}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !6, i64 0}


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