; LLVM IR from ThePhysicsGuys/Physics3D :: Physics3D/boundstree/filters (visibilityFilter)

; 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.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x %"struct.P3D::Fix"] }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"class.P3D::VisibilityFilter" = type { %"struct.P3D::PositionTemplate", %"struct.P3D::Vector", %"struct.P3D::Vector", %"struct.P3D::Vector", %"struct.P3D::Vector", %"struct.P3D::Vector", double }
%struct.anon = type { double, double, double }
%"struct.P3D::BoundsTemplate" = type { %"struct.P3D::PositionTemplate", %"struct.P3D::PositionTemplate" }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK3P3D16VisibilityFilterclERKNS_14BoundsTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #3 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [5 x double], align 16
  %7 = alloca [5 x %"struct.P3D::Vector"], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.P3D::PositionTemplate", align 8
  %12 = alloca %"struct.P3D::Fix", align 8
  %13 = alloca %"struct.P3D::Fix", align 8
  %14 = alloca %"struct.P3D::Fix", align 8
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = alloca %"struct.P3D::Vector.0", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 40, i1 false)
  %18 = getelementptr inbounds double, ptr %6, i64 1
  %19 = getelementptr inbounds double, ptr %6, i64 2
  %20 = getelementptr inbounds double, ptr %6, i64 3
  %21 = getelementptr inbounds double, ptr %6, i64 4
  %22 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 6
  %23 = load double, ptr %22, align 8, !tbaa !9
  store double %23, ptr %21, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 120, ptr %7) #4
  %24 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %24, i64 24, i1 false), !tbaa.struct !17
  %25 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i64 1
  %26 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %26, i64 24, i1 false), !tbaa.struct !17
  %27 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i64 2
  %28 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %28, i64 24, i1 false), !tbaa.struct !17
  %29 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i64 3
  %30 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %30, i64 24, i1 false), !tbaa.struct !17
  %31 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i64 4
  %32 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %32, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !19
  br label %33

33:                                               ; preds = %105, %2
  %34 = load i32, ptr %8, align 4, !tbaa !19
  %35 = icmp slt i32 %34, 5
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 2, ptr %9, align 4
  br label %108

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %38 = load i32, ptr %8, align 4, !tbaa !19
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [5 x %"struct.P3D::Vector"], ptr %7, i64 0, i64 %39
  store ptr %40, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.P3D::Vector", ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %struct.anon, ptr %42, i32 0, i32 0
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = fcmp oge double %44, 0.000000e+00
  br i1 %45, label %46, label %50

46:                                               ; preds = %37
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %48, i32 0, i32 0
  br label %54

50:                                               ; preds = %37
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %52, i32 0, i32 0
  br label %54

54:                                               ; preds = %50, %46
  %55 = phi ptr [ %49, %46 ], [ %53, %50 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %55, i64 8, i1 false), !tbaa.struct !21
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.P3D::Vector", ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.anon, ptr %57, i32 0, i32 1
  %59 = load double, ptr %58, align 8, !tbaa !18
  %60 = fcmp oge double %59, 0.000000e+00
  br i1 %60, label %61, label %65

61:                                               ; preds = %54
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %63, i32 0, i32 1
  br label %69

65:                                               ; preds = %54
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %66, i32 0, i32 1
  %68 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %67, i32 0, i32 1
  br label %69

69:                                               ; preds = %65, %61
  %70 = phi ptr [ %64, %61 ], [ %68, %65 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %70, i64 8, i1 false), !tbaa.struct !21
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.P3D::Vector", ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.anon, ptr %72, i32 0, i32 2
  %74 = load double, ptr %73, align 8, !tbaa !18
  %75 = fcmp oge double %74, 0.000000e+00
  br i1 %75, label %76, label %80

76:                                               ; preds = %69
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %78, i32 0, i32 2
  br label %84

80:                                               ; preds = %69
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.P3D::BoundsTemplate", ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %"struct.P3D::PositionTemplate", ptr %82, i32 0, i32 2
  br label %84

84:                                               ; preds = %80, %76
  %85 = phi ptr [ %79, %76 ], [ %83, %80 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %85, i64 8, i1 false), !tbaa.struct !21
  %86 = getelementptr inbounds %"struct.P3D::Fix", ptr %12, i32 0, i32 0
  %87 = load i64, ptr %86, align 8
  %88 = getelementptr inbounds %"struct.P3D::Fix", ptr %13, i32 0, i32 0
  %89 = load i64, ptr %88, align 8
  %90 = getelementptr inbounds %"struct.P3D::Fix", ptr %14, i32 0, i32 0
  %91 = load i64, ptr %90, align 8
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 %87, i64 %89, i64 %91) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %92 = getelementptr inbounds %"class.P3D::VisibilityFilter", ptr %17, i32 0, i32 0
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector.0") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %92) #4
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %93) #4
  %95 = load i32, ptr %8, align 4, !tbaa !19
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [5 x double], ptr %6, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !16
  %99 = fcmp ogt double %94, %98
  br i1 %99, label %100, label %101

100:                                              ; preds = %84
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %102

101:                                              ; preds = %84
  store i32 0, ptr %9, align 4
  br label %102

102:                                              ; preds = %101, %100
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %103 = load i32, ptr %9, align 4
  switch i32 %103, label %108 [
    i32 0, label %104
  ]

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %8, align 4, !tbaa !19
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %8, align 4, !tbaa !19
  br label %33, !llvm.loop !23

108:                                              ; preds = %102, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %109 = load i32, ptr %9, align 4
  switch i32 %109, label %111 [
    i32 2, label %110
  ]

110:                                              ; preds = %108
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %111

111:                                              ; preds = %110, %108
  call void @llvm.lifetime.end.p0(i64 120, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #4
  %112 = load i1, ptr %3, align 1
  ret i1 %112
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24), i64, i64, i64) unnamed_addr #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !15, i64 144}
!10 = !{!"_ZTSN3P3D16VisibilityFilterE", !11, i64 0, !14, i64 24, !14, i64 48, !14, i64 72, !14, i64 96, !14, i64 120, !15, i64 144}
!11 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"_ZTSN3P3D3FixILl32EEE", !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{i64 0, i64 24, !18}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{i64 0, i64 8, !22}
!22 = !{!13, !13, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"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"

%"struct.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x %"struct.P3D::Fix"] }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK3P3D16VisibilityFilterclERKNS_14BoundsTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %1) local_unnamed_addr #2 align 2 {
  %3 = alloca [5 x %"struct.P3D::Vector"], align 16
  %4 = alloca %"struct.P3D::PositionTemplate", align 8
  %5 = alloca %"struct.P3D::Vector", align 8
  %6 = alloca %"struct.P3D::Vector.0", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 144
  %8 = load double, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %3) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %9, i64 24, i1 false), !tbaa.struct !14
  %10 = getelementptr inbounds i8, ptr %3, i64 24
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11, i64 24, i1 false), !tbaa.struct !14
  %12 = getelementptr inbounds i8, ptr %3, i64 48
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, i64 24, i1 false), !tbaa.struct !14
  %14 = getelementptr inbounds i8, ptr %3, i64 72
  %15 = getelementptr inbounds i8, ptr %0, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !14
  %16 = getelementptr inbounds i8, ptr %3, i64 96
  %17 = getelementptr inbounds i8, ptr %0, i64 120
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !14
  %18 = getelementptr inbounds i8, ptr %1, i64 24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  %19 = load double, ptr %3, align 16, !tbaa !15
  %20 = fcmp oge double %19, 0.000000e+00
  %.val = load i64, ptr %1, align 8
  %.val23 = load i64, ptr %18, align 8
  %.sroa.03.0.copyload = select i1 %20, i64 %.val, i64 %.val23
  %21 = getelementptr inbounds i8, ptr %3, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !15
  %23 = fcmp oge double %22, 0.000000e+00
  %.v = select i1 %23, i64 8, i64 32
  %24 = getelementptr inbounds i8, ptr %1, i64 %.v
  %.sroa.02.0.copyload = load i64, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %3, i64 16
  %26 = load double, ptr %25, align 16, !tbaa !15
  %27 = fcmp oge double %26, 0.000000e+00
  %.v24 = select i1 %27, i64 16, i64 40
  %28 = getelementptr inbounds i8, ptr %1, i64 %.v24
  %.sroa.0.0.copyload = load i64, ptr %28, align 8, !tbaa !16
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 %.sroa.03.0.copyload, i64 %.sroa.02.0.copyload, i64 %.sroa.0.0.copyload) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %29 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  %30 = fcmp ule double %29, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br i1 %30, label %31, label %.critedge

31:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  %32 = load double, ptr %10, align 8, !tbaa !15
  %33 = fcmp oge double %32, 0.000000e+00
  %.val.1 = load i64, ptr %1, align 8
  %.val23.1 = load i64, ptr %18, align 8
  %.sroa.03.0.copyload.1 = select i1 %33, i64 %.val.1, i64 %.val23.1
  %34 = getelementptr inbounds i8, ptr %3, i64 32
  %35 = load double, ptr %34, align 16, !tbaa !15
  %36 = fcmp oge double %35, 0.000000e+00
  %.v.1 = select i1 %36, i64 8, i64 32
  %37 = getelementptr inbounds i8, ptr %1, i64 %.v.1
  %.sroa.02.0.copyload.1 = load i64, ptr %37, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %3, i64 40
  %39 = load double, ptr %38, align 8, !tbaa !15
  %40 = fcmp oge double %39, 0.000000e+00
  %.v24.1 = select i1 %40, i64 16, i64 40
  %41 = getelementptr inbounds i8, ptr %1, i64 %.v24.1
  %.sroa.0.0.copyload.1 = load i64, ptr %41, align 8, !tbaa !16
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 %.sroa.03.0.copyload.1, i64 %.sroa.02.0.copyload.1, i64 %.sroa.0.0.copyload.1) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %42 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  %43 = fcmp ule double %42, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br i1 %43, label %44, label %.critedge

44:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  %45 = load double, ptr %12, align 16, !tbaa !15
  %46 = fcmp oge double %45, 0.000000e+00
  %.val.2 = load i64, ptr %1, align 8
  %.val23.2 = load i64, ptr %18, align 8
  %.sroa.03.0.copyload.2 = select i1 %46, i64 %.val.2, i64 %.val23.2
  %47 = getelementptr inbounds i8, ptr %3, i64 56
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = fcmp oge double %48, 0.000000e+00
  %.v.2 = select i1 %49, i64 8, i64 32
  %50 = getelementptr inbounds i8, ptr %1, i64 %.v.2
  %.sroa.02.0.copyload.2 = load i64, ptr %50, align 8, !tbaa !16
  %51 = getelementptr inbounds i8, ptr %3, i64 64
  %52 = load double, ptr %51, align 16, !tbaa !15
  %53 = fcmp oge double %52, 0.000000e+00
  %.v24.2 = select i1 %53, i64 16, i64 40
  %54 = getelementptr inbounds i8, ptr %1, i64 %.v24.2
  %.sroa.0.0.copyload.2 = load i64, ptr %54, align 8, !tbaa !16
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 %.sroa.03.0.copyload.2, i64 %.sroa.02.0.copyload.2, i64 %.sroa.0.0.copyload.2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %55 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  %56 = fcmp ule double %55, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br i1 %56, label %57, label %.critedge

57:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  %58 = load double, ptr %14, align 8, !tbaa !15
  %59 = fcmp oge double %58, 0.000000e+00
  %.val.3 = load i64, ptr %1, align 8
  %.val23.3 = load i64, ptr %18, align 8
  %.sroa.03.0.copyload.3 = select i1 %59, i64 %.val.3, i64 %.val23.3
  %60 = getelementptr inbounds i8, ptr %3, i64 80
  %61 = load double, ptr %60, align 16, !tbaa !15
  %62 = fcmp oge double %61, 0.000000e+00
  %.v.3 = select i1 %62, i64 8, i64 32
  %63 = getelementptr inbounds i8, ptr %1, i64 %.v.3
  %.sroa.02.0.copyload.3 = load i64, ptr %63, align 8, !tbaa !16
  %64 = getelementptr inbounds i8, ptr %3, i64 88
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = fcmp oge double %65, 0.000000e+00
  %.v24.3 = select i1 %66, i64 16, i64 40
  %67 = getelementptr inbounds i8, ptr %1, i64 %.v24.3
  %.sroa.0.0.copyload.3 = load i64, ptr %67, align 8, !tbaa !16
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 %.sroa.03.0.copyload.3, i64 %.sroa.02.0.copyload.3, i64 %.sroa.0.0.copyload.3) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %68 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %14) #3
  %69 = fcmp ule double %68, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br i1 %69, label %70, label %.critedge

70:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  %71 = load double, ptr %16, align 16, !tbaa !15
  %72 = fcmp oge double %71, 0.000000e+00
  %.val.4 = load i64, ptr %1, align 8
  %.val23.4 = load i64, ptr %18, align 8
  %.sroa.03.0.copyload.4 = select i1 %72, i64 %.val.4, i64 %.val23.4
  %73 = getelementptr inbounds i8, ptr %3, i64 104
  %74 = load double, ptr %73, align 8, !tbaa !15
  %75 = fcmp oge double %74, 0.000000e+00
  %.v.4 = select i1 %75, i64 8, i64 32
  %76 = getelementptr inbounds i8, ptr %1, i64 %.v.4
  %.sroa.02.0.copyload.4 = load i64, ptr %76, align 8, !tbaa !16
  %77 = getelementptr inbounds i8, ptr %3, i64 112
  %78 = load double, ptr %77, align 16, !tbaa !15
  %79 = fcmp oge double %78, 0.000000e+00
  %.v24.4 = select i1 %79, i64 16, i64 40
  %80 = getelementptr inbounds i8, ptr %1, i64 %.v24.4
  %.sroa.0.0.copyload.4 = load i64, ptr %80, align 8, !tbaa !16
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 %.sroa.03.0.copyload.4, i64 %.sroa.02.0.copyload.4, i64 %.sroa.0.0.copyload.4) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  call void @_ZN3P3DmiINS_3FixILl32EEEEENS_6VectorIT_Lm3EEERKNS_16PositionTemplateIS4_EES9_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @_ZNK3P3D6VectorINS_3FixILl32EEELm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %81 = call noundef double @_ZN3P3DmlIddLm3EEEDTplmlixfp_Li0Eixfp0_Li0Emlixfp_Li1Eixfp0_Li1EERKNS_6VectorIT_XT1_EEERKNS2_IT0_XT1_EEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %82 = fcmp ule double %81, %8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  br i1 %82, label %83, label %.critedge

83:                                               ; preds = %70
  br label %.critedge

.critedge:                                        ; preds = %83, %70, %57, %44, %31, %2
  %.lcssa = phi i1 [ false, %2 ], [ false, %31 ], [ false, %44 ], [ false, %57 ], [ false, %70 ], [ true, %83 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #3
  ret i1 %.lcssa
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2ES2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(24), i64, i64, i64) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 #3 = { 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, !13, i64 144}
!6 = !{!"_ZTSN3P3D16VisibilityFilterE", !7, i64 0, !12, i64 24, !12, i64 48, !12, i64 72, !12, i64 96, !12, i64 120, !13, i64 144}
!7 = !{!"_ZTSN3P3D16PositionTemplateINS_3FixILl32EEEEE", !8, i64 0, !8, i64 8, !8, i64 16}
!8 = !{!"_ZTSN3P3D3FixILl32EEE", !9, i64 0}
!9 = !{!"long", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3P3D6VectorIdLm3EEE", !10, i64 0}
!13 = !{!"double", !10, i64 0}
!14 = !{i64 0, i64 24, !15}
!15 = !{!10, !10, i64 0}
!16 = !{!9, !9, i64 0}


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