; LLVM IR from bhaskar0120/simple-render :: main (in_shadow)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Scene = type { [256 x %struct.Shape], i64, %struct.Vector, %struct.Vector, [3 x i8] }
%struct.Shape = type { %struct.Vector, %struct.Vector, float, float, float, [3 x i8], ptr, ptr }
%struct.Vector = type { float, float, float }

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

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, float } @normalize(<2 x 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @in_shadow(ptr noundef byval(%struct.Scene) align 8 %0, <2 x float> %1, float %2) #1 {
  %4 = alloca i1, align 1
  %5 = alloca %struct.Vector, align 4
  %6 = alloca { <2 x float>, float }, align 4
  %7 = alloca %struct.Vector, align 4
  %8 = alloca %struct.Vector, align 4
  %9 = alloca %struct.Vector, align 4
  %10 = alloca { <2 x float>, float }, align 4
  %11 = alloca { <2 x float>, float }, align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca { <2 x float>, float }, align 4
  %14 = alloca { <2 x float>, float }, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca i64, align 8
  %19 = alloca %struct.Shape, align 8
  %20 = alloca float, align 4
  %21 = alloca %struct.Vector, align 4
  %22 = alloca %struct.Vector, align 4
  %23 = alloca { <2 x float>, float }, align 4
  %24 = alloca { <2 x float>, float }, align 8
  %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 float, align 4
  %30 = alloca %struct.Vector, align 4
  %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 { <2 x float>, float }, align 4
  %35 = alloca %struct.Vector, align 4
  %36 = alloca %struct.Vector, align 4
  %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 4
  %41 = alloca { <2 x float>, float }, align 8
  %42 = getelementptr inbounds { <2 x float>, float }, ptr %6, i32 0, i32 0
  store <2 x float> %1, ptr %42, align 4
  %43 = getelementptr inbounds { <2 x float>, float }, ptr %6, i32 0, i32 1
  store float %2, ptr %43, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %6, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #4
  %44 = getelementptr inbounds %struct.Scene, ptr %0, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 8 %44, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %7, i64 12, i1 false)
  %45 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 0
  %46 = load <2 x float>, ptr %45, align 4
  %47 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 1
  %48 = load float, ptr %47, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %5, i64 12, i1 false)
  %49 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 0
  %50 = load <2 x float>, ptr %49, align 4
  %51 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 1
  %52 = load float, ptr %51, align 4
  %53 = call { <2 x float>, float } @sub(<2 x float> %46, float %48, <2 x float> %50, float %52)
  store { <2 x float>, float } %53, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %12, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %9, i64 12, i1 false)
  %54 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 0
  %55 = load <2 x float>, ptr %54, align 4
  %56 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 1
  %57 = load float, ptr %56, align 4
  %58 = call { <2 x float>, float } @normalize(<2 x float> %55, float %57)
  store { <2 x float>, float } %58, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %14, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !10
  br label %59

59:                                               ; preds = %149, %3
  %60 = load i32, ptr %15, align 4, !tbaa !10
  %61 = icmp slt i32 %60, 500
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 2, ptr %16, align 4
  br label %152

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !12
  br label %64

64:                                               ; preds = %102, %63
  %65 = load i64, ptr %18, align 8, !tbaa !12
  %66 = getelementptr inbounds %struct.Scene, ptr %0, i32 0, i32 1
  %67 = load i64, ptr %66, align 8, !tbaa !14
  %68 = icmp ult i64 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %105

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #4
  %71 = getelementptr inbounds %struct.Scene, ptr %0, i32 0, i32 0
  %72 = load i64, ptr %18, align 8, !tbaa !12
  %73 = getelementptr inbounds [256 x %struct.Shape], ptr %71, i64 0, i64 %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %73, i64 56, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %74 = getelementptr inbounds %struct.Shape, ptr %19, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = load float, ptr %17, align 4, !tbaa !6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %8, i64 12, i1 false)
  %77 = getelementptr inbounds { <2 x float>, float }, ptr %23, i32 0, i32 0
  %78 = load <2 x float>, ptr %77, align 4
  %79 = getelementptr inbounds { <2 x float>, float }, ptr %23, i32 0, i32 1
  %80 = load float, ptr %79, align 4
  %81 = call { <2 x float>, float } @mul(<2 x float> %78, float %80, float noundef %76)
  store { <2 x float>, float } %81, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %5, i64 12, i1 false)
  %82 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 0
  %83 = load <2 x float>, ptr %82, align 4
  %84 = getelementptr inbounds { <2 x float>, float }, ptr %25, i32 0, i32 1
  %85 = load float, ptr %84, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %22, i64 12, i1 false)
  %86 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 0
  %87 = load <2 x float>, ptr %86, align 4
  %88 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 1
  %89 = load float, ptr %88, align 4
  %90 = call { <2 x float>, float } @add(<2 x float> %83, float %85, <2 x float> %87, float %89)
  store { <2 x float>, float } %90, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 8 %27, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %21, i64 12, i1 false)
  %91 = getelementptr inbounds { <2 x float>, float }, ptr %28, i32 0, i32 0
  %92 = load <2 x float>, ptr %91, align 4
  %93 = getelementptr inbounds { <2 x float>, float }, ptr %28, i32 0, i32 1
  %94 = load float, ptr %93, align 4
  %95 = call float %75(ptr noundef byval(%struct.Shape) align 8 %19, <2 x float> %92, float %94)
  store float %95, ptr %20, align 4, !tbaa !6
  %96 = load float, ptr %17, align 4, !tbaa !6
  %97 = fpext float %96 to double
  %98 = load float, ptr %20, align 4, !tbaa !6
  %99 = fpext float %98 to double
  %100 = call double @llvm.minnum.f64(double %97, double %99)
  %101 = fptrunc double %100 to float
  store float %101, ptr %17, align 4, !tbaa !6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #4
  br label %102

102:                                              ; preds = %70
  %103 = load i64, ptr %18, align 8, !tbaa !12
  %104 = add i64 %103, 1
  store i64 %104, ptr %18, align 8, !tbaa !12
  br label %64, !llvm.loop !23

105:                                              ; preds = %69
  %106 = load float, ptr %17, align 4, !tbaa !6
  %107 = fpext float %106 to double
  %108 = fcmp olt double %107, 1.000000e-02
  br i1 %108, label %109, label %110

109:                                              ; preds = %105
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %146

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %7, i64 12, i1 false)
  %111 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 0
  %112 = load <2 x float>, ptr %111, align 4
  %113 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 1
  %114 = load float, ptr %113, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %5, i64 12, i1 false)
  %115 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 0
  %116 = load <2 x float>, ptr %115, align 4
  %117 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 1
  %118 = load float, ptr %117, align 4
  %119 = call { <2 x float>, float } @sub(<2 x float> %112, float %114, <2 x float> %116, float %118)
  store { <2 x float>, float } %119, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 8 %33, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %30, i64 12, i1 false)
  %120 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 0
  %121 = load <2 x float>, ptr %120, align 4
  %122 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 1
  %123 = load float, ptr %122, align 4
  %124 = call float @length(<2 x float> %121, float %123)
  store float %124, ptr %29, align 4, !tbaa !6
  %125 = load float, ptr %17, align 4, !tbaa !6
  %126 = load float, ptr %29, align 4, !tbaa !6
  %127 = fcmp ogt float %125, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %110
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %145

129:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #4
  %130 = load float, ptr %17, align 4, !tbaa !6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %8, i64 12, i1 false)
  %131 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 0
  %132 = load <2 x float>, ptr %131, align 4
  %133 = getelementptr inbounds { <2 x float>, float }, ptr %37, i32 0, i32 1
  %134 = load float, ptr %133, align 4
  %135 = call { <2 x float>, float } @mul(<2 x float> %132, float %134, float noundef %130)
  store { <2 x float>, float } %135, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 8 %38, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %5, i64 12, i1 false)
  %136 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 0
  %137 = load <2 x float>, ptr %136, align 4
  %138 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 1
  %139 = load float, ptr %138, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %36, i64 12, i1 false)
  %140 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 0
  %141 = load <2 x float>, ptr %140, align 4
  %142 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 1
  %143 = load float, ptr %142, align 4
  %144 = call { <2 x float>, float } @add(<2 x float> %137, float %139, <2 x float> %141, float %143)
  store { <2 x float>, float } %144, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %41, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %35, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #4
  store i32 0, ptr %16, align 4
  br label %145

145:                                              ; preds = %129, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %146

146:                                              ; preds = %145, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  %147 = load i32, ptr %16, align 4
  switch i32 %147, label %152 [
    i32 0, label %148
  ]

148:                                              ; preds = %146
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %15, align 4, !tbaa !10
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %15, align 4, !tbaa !10
  br label %59, !llvm.loop !25

152:                                              ; preds = %146, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %153 = load i32, ptr %16, align 4
  switch i32 %153, label %155 [
    i32 2, label %154
  ]

154:                                              ; preds = %152
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %155

155:                                              ; preds = %154, %152
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #4
  %156 = load i1, ptr %4, align 1
  ret i1 %156
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.minnum.f64(double, double) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!15, !13, i64 14336}
!15 = !{!"Scene", !8, i64 0, !13, i64 14336, !16, i64 14344, !16, i64 14356, !8, i64 14368}
!16 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!17 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 4, !6, i64 20, i64 4, !6, i64 24, i64 4, !6, i64 28, i64 4, !6, i64 32, i64 4, !6, i64 36, i64 3, !18, i64 40, i64 8, !19, i64 48, i64 8, !19}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!22, !20, i64 40}
!22 = !{!"Shape", !16, i64 0, !16, i64 12, !7, i64 24, !7, i64 28, !7, i64 32, !8, i64 36, !20, i64 40, !20, i64 48}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Scene = type { [256 x %struct.Shape], i64, %struct.Vector, %struct.Vector, [3 x i8] }
%struct.Shape = type { %struct.Vector, %struct.Vector, float, float, float, [3 x i8], ptr, ptr }
%struct.Vector = type { float, float, float }

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @in_shadow(ptr nocapture noundef readonly byval(%struct.Scene) align 8 %0, <2 x float> %1, float %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 14344
  %.sroa.077.0.copyload = load <2 x float>, ptr %4, align 8
  %.sroa.579.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 14352
  %.sroa.579.0.copyload = load float, ptr %.sroa.579.0..sroa_idx, align 8, !tbaa !5
  %5 = tail call { <2 x float>, float } @sub(<2 x float> %.sroa.077.0.copyload, float %.sroa.579.0.copyload, <2 x float> %1, float %2)
  %.fca.0.extract65 = extractvalue { <2 x float>, float } %5, 0
  %.fca.1.extract66 = extractvalue { <2 x float>, float } %5, 1
  %6 = tail call { <2 x float>, float } @normalize(<2 x float> %.fca.0.extract65, float %.fca.1.extract66)
  %.fca.0.extract59 = extractvalue { <2 x float>, float } %6, 0
  %.fca.1.extract60 = extractvalue { <2 x float>, float } %6, 1
  %7 = getelementptr inbounds i8, ptr %0, i64 14336
  %8 = load i64, ptr %7, align 8, !tbaa !9
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %.preheader, label %.preheader.us

.preheader.us:                                    ; preds = %3, %14
  %9 = phi i1 [ %18, %14 ], [ true, %3 ]
  %.sroa.6.0104.us = phi float [ %.fca.1.extract.us, %14 ], [ %2, %3 ]
  %.sroa.082.0103.us = phi <2 x float> [ %.fca.0.extract.us, %14 ], [ %1, %3 ]
  %.087102.us = phi i32 [ %17, %14 ], [ 0, %3 ]
  %.091101.us = phi float [ %24, %14 ], [ undef, %3 ]
  br label %19

10:                                               ; preds = %._crit_edge.us
  %11 = tail call { <2 x float>, float } @sub(<2 x float> %.sroa.077.0.copyload, float %.sroa.579.0.copyload, <2 x float> %.sroa.082.0103.us, float %.sroa.6.0104.us)
  %.fca.0.extract17.us = extractvalue { <2 x float>, float } %11, 0
  %.fca.1.extract18.us = extractvalue { <2 x float>, float } %11, 1
  %12 = tail call float @length(<2 x float> %.fca.0.extract17.us, float %.fca.1.extract18.us)
  %13 = fcmp ogt float %24, %12
  br i1 %13, label %.thread.loopexit106, label %14

14:                                               ; preds = %10
  %15 = tail call { <2 x float>, float } @mul(<2 x float> %.fca.0.extract59, float %.fca.1.extract60, float noundef %24)
  %.fca.0.extract6.us = extractvalue { <2 x float>, float } %15, 0
  %.fca.1.extract7.us = extractvalue { <2 x float>, float } %15, 1
  %16 = tail call { <2 x float>, float } @add(<2 x float> %.sroa.082.0103.us, float %.sroa.6.0104.us, <2 x float> %.fca.0.extract6.us, float %.fca.1.extract7.us)
  %.fca.0.extract.us = extractvalue { <2 x float>, float } %16, 0
  %.fca.1.extract.us = extractvalue { <2 x float>, float } %16, 1
  %17 = add nuw nsw i32 %.087102.us, 1
  %18 = icmp ult i32 %.087102.us, 499
  %exitcond108.not = icmp eq i32 %17, 500
  br i1 %exitcond108.not, label %.thread.loopexit106, label %.preheader.us, !llvm.loop !13

19:                                               ; preds = %.preheader.us, %19
  %.192100.us = phi float [ %.091101.us, %.preheader.us ], [ %24, %19 ]
  %.09399.us = phi i64 [ 0, %.preheader.us ], [ %25, %19 ]
  %20 = getelementptr inbounds [256 x %struct.Shape], ptr %0, i64 0, i64 %.09399.us
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 40
  %.sroa.3.0.copyload = load ptr, ptr %.sroa.3.0..sroa_idx, align 8, !tbaa !15
  %21 = tail call { <2 x float>, float } @mul(<2 x float> %.fca.0.extract59, float %.fca.1.extract60, float noundef %.192100.us)
  %.fca.0.extract37.us = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract38.us = extractvalue { <2 x float>, float } %21, 1
  %22 = tail call { <2 x float>, float } @add(<2 x float> %.sroa.082.0103.us, float %.sroa.6.0104.us, <2 x float> %.fca.0.extract37.us, float %.fca.1.extract38.us)
  %.fca.0.extract29.us = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract30.us = extractvalue { <2 x float>, float } %22, 1
  %23 = tail call float %.sroa.3.0.copyload(ptr noundef nonnull byval(%struct.Shape) align 8 %20, <2 x float> %.fca.0.extract29.us, float %.fca.1.extract30.us) #2
  %24 = tail call float @llvm.minnum.f32(float %.192100.us, float %23)
  %25 = add nuw i64 %.09399.us, 1
  %exitcond.not = icmp eq i64 %25, %8
  br i1 %exitcond.not, label %._crit_edge.us, label %19, !llvm.loop !17

._crit_edge.us:                                   ; preds = %19
  %26 = fpext float %24 to double
  %27 = fcmp olt double %26, 1.000000e-02
  br i1 %27, label %.thread.loopexit106, label %10

.preheader:                                       ; preds = %3, %.preheader
  %.sroa.6.0104 = phi float [ %.fca.1.extract, %.preheader ], [ %2, %3 ]
  %.sroa.082.0103 = phi <2 x float> [ %.fca.0.extract, %.preheader ], [ %1, %3 ]
  %.087102 = phi i32 [ %32, %.preheader ], [ 0, %3 ]
  %28 = tail call { <2 x float>, float } @sub(<2 x float> %.sroa.077.0.copyload, float %.sroa.579.0.copyload, <2 x float> %.sroa.082.0103, float %.sroa.6.0104)
  %.fca.0.extract17 = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract18 = extractvalue { <2 x float>, float } %28, 1
  %29 = tail call float @length(<2 x float> %.fca.0.extract17, float %.fca.1.extract18)
  %30 = tail call { <2 x float>, float } @mul(<2 x float> %.fca.0.extract59, float %.fca.1.extract60, float noundef undef)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %30, 1
  %31 = tail call { <2 x float>, float } @add(<2 x float> %.sroa.082.0103, float %.sroa.6.0104, <2 x float> %.fca.0.extract6, float %.fca.1.extract7)
  %.fca.0.extract = extractvalue { <2 x float>, float } %31, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %31, 1
  %32 = add nuw nsw i32 %.087102, 1
  %exitcond109.not = icmp eq i32 %32, 500
  br i1 %exitcond109.not, label %.thread, label %.preheader, !llvm.loop !13

.thread.loopexit106:                              ; preds = %14, %10, %._crit_edge.us
  %.us-phi.ph = phi i1 [ %18, %14 ], [ %9, %._crit_edge.us ], [ %9, %10 ]
  %.us-phi105.ph = phi i1 [ undef, %14 ], [ true, %._crit_edge.us ], [ false, %10 ]
  %33 = and i1 %.us-phi.ph, %.us-phi105.ph
  br label %.thread

.thread:                                          ; preds = %.preheader, %.thread.loopexit106
  %spec.select = phi i1 [ %33, %.thread.loopexit106 ], [ false, %.preheader ]
  ret i1 %spec.select
}

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 14336}
!10 = !{!"Scene", !7, i64 0, !11, i64 14336, !12, i64 14344, !12, i64 14356, !7, i64 14368}
!11 = !{!"long", !7, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !14}


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