; LLVM IR from atlantis13579/Riemann :: Src/CollisionPrimitive (Sphere3)

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

%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::Sphere3" = type { %"class.Maths::TVector3", float }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann7Sphere311GetVerticesEiiPSt6vectorIN5Maths8TVector3IfEESaIS4_EES7_(ptr noundef nonnull align 4 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca %"class.Maths::TVector3", align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca %"class.Maths::TVector3", align 4
  %27 = alloca %"class.Maths::TVector3", align 4
  %28 = alloca %"class.Maths::TVector3", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %30 = call float @asinf(float noundef 1.000000e+00) #5
  %31 = fmul float 2.000000e+00, %30
  store float %31, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %32 = load float, ptr %11, align 4, !tbaa !11
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = sitofp i32 %33 to float
  %35 = fdiv float %32, %34
  store float %35, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %36 = load float, ptr %11, align 4, !tbaa !11
  %37 = fmul float 2.000000e+00, %36
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = sitofp i32 %38 to float
  %40 = fdiv float %37, %39
  store float %40, ptr %13, align 4, !tbaa !11
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  %42 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #5
  %43 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 1
  %44 = load float, ptr %43, align 4, !tbaa !13
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %15, float noundef 0.000000e+00, float noundef %44, float noundef 0.000000e+00)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %42, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %49

47:                                               ; preds = %5
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #5
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %16)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #5
  br label %49

49:                                               ; preds = %47, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %95, %49
  %51 = load i32, ptr %17, align 4, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %98

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %56 = load i32, ptr %17, align 4, !tbaa !9
  %57 = sitofp i32 %56 to float
  %58 = load float, ptr %12, align 4, !tbaa !11
  %59 = fmul float %57, %58
  store float %59, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %91, %55
  %61 = load i32, ptr %20, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = icmp sle i32 %61, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %66 = load i32, ptr %20, align 4, !tbaa !9
  %67 = sitofp i32 %66 to float
  %68 = load float, ptr %13, align 4, !tbaa !11
  %69 = fmul float %67, %68
  store float %69, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  %70 = load float, ptr %19, align 4, !tbaa !11
  %71 = call float @sinf(float noundef %70) #5
  %72 = load float, ptr %21, align 4, !tbaa !11
  %73 = call float @cosf(float noundef %72) #5
  %74 = fmul float %71, %73
  %75 = load float, ptr %19, align 4, !tbaa !11
  %76 = call float @cosf(float noundef %75) #5
  %77 = load float, ptr %19, align 4, !tbaa !11
  %78 = call float @sinf(float noundef %77) #5
  %79 = load float, ptr %21, align 4, !tbaa !11
  %80 = call float @sinf(float noundef %79) #5
  %81 = fmul float %78, %80
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %23, float noundef %74, float noundef %76, float noundef %81)
  %82 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 1
  %83 = load float, ptr %82, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %23, float noundef %83)
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  %85 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 0
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %85, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %90

88:                                               ; preds = %65
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 4 dereferenceable(12) %22)
  br label %90

90:                                               ; preds = %88, %65
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %20, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %20, align 4, !tbaa !9
  br label %60, !llvm.loop !16

94:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %17, align 4, !tbaa !9
  br label %50, !llvm.loop !18

98:                                               ; preds = %54
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  %100 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  %101 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %29, i32 0, i32 1
  %102 = load float, ptr %101, align 4, !tbaa !13
  %103 = fneg float %102
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %26, float noundef 0.000000e+00, float noundef %103, float noundef 0.000000e+00)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %100, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %108

106:                                              ; preds = %98
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #5
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %28)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #5
  br label %108

108:                                              ; preds = %106, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

; Function Attrs: nounwind
declare float @asinf(float noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: nounwind
declare float @sinf(float noundef) #4

; Function Attrs: nounwind
declare float @cosf(float noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { inlinehint mustprogress 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 = { inlinehint 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 "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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 12}
!14 = !{!"_ZTSN7Riemann7Sphere3E", !15, i64 0, !12, i64 12}
!15 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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

%"class.Maths::TVector3" = type { float, float, float }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann7Sphere311GetVerticesEiiPSt6vectorIN5Maths8TVector3IfEESaIS4_EES7_(ptr noundef nonnull align 4 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca %"class.Maths::TVector3", align 4
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = sitofp i32 %1 to float
  %17 = fdiv float 0x400921FB60000000, %16
  %18 = sitofp i32 %2 to float
  %19 = fdiv float 0x401921FB60000000, %18
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 12
  %21 = load float, ptr %20, align 4, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0.000000e+00, float noundef %21, float noundef 0.000000e+00)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %23, label %22

22:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  br label %23

23:                                               ; preds = %22, %5
  %24 = icmp slt i32 %1, 2
  %.not3031 = icmp slt i32 %2, 0
  %or.cond = or i1 %24, %.not3031
  br i1 %or.cond, label %._crit_edge36, label %.lr.ph35.split

.lr.ph35.split:                                   ; preds = %23
  br i1 %.not, label %.lr.ph.us, label %.lr.ph

.lr.ph.us:                                        ; preds = %.lr.ph35.split, %._crit_edge.split.us.us
  %.033.us37 = phi i32 [ %39, %._crit_edge.split.us.us ], [ 1, %.lr.ph35.split ]
  %25 = uitofp nneg i32 %.033.us37 to float
  %26 = fmul float %17, %25
  br label %27

27:                                               ; preds = %27, %.lr.ph.us
  %.02832.us.us = phi i32 [ 0, %.lr.ph.us ], [ %38, %27 ]
  %28 = uitofp nneg i32 %.02832.us.us to float
  %29 = fmul float %19, %28
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %30 = call float @sinf(float noundef %26) #5
  %31 = call float @cosf(float noundef %29) #5
  %32 = fmul float %30, %31
  %33 = call float @cosf(float noundef %26) #5
  %34 = call float @sinf(float noundef %26) #5
  %35 = call float @sinf(float noundef %29) #5
  %36 = fmul float %34, %35
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %32, float noundef %33, float noundef %36)
  %37 = load float, ptr %20, align 4, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %37)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  %38 = add nuw i32 %.02832.us.us, 1
  %exitcond41.not = icmp eq i32 %.02832.us.us, %2
  br i1 %exitcond41.not, label %._crit_edge.split.us.us, label %27, !llvm.loop !11

._crit_edge.split.us.us:                          ; preds = %27
  %39 = add nuw nsw i32 %.033.us37, 1
  %exitcond42.not = icmp eq i32 %39, %1
  br i1 %exitcond42.not, label %._crit_edge36, label %.lr.ph.us, !llvm.loop !13

._crit_edge36:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.us, %23
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  %40 = load float, ptr %20, align 4, !tbaa !5
  %41 = fneg float %40
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0.000000e+00, float noundef %41, float noundef 0.000000e+00)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  br i1 %.not, label %58, label %57

.lr.ph:                                           ; preds = %.lr.ph35.split, %._crit_edge.split
  %.033 = phi i32 [ %44, %._crit_edge.split ], [ 1, %.lr.ph35.split ]
  %42 = uitofp nneg i32 %.033 to float
  %43 = fmul float %17, %42
  br label %45

._crit_edge.split:                                ; preds = %45
  %44 = add nuw nsw i32 %.033, 1
  %exitcond40.not = icmp eq i32 %44, %1
  br i1 %exitcond40.not, label %._crit_edge36, label %.lr.ph, !llvm.loop !13

45:                                               ; preds = %.lr.ph, %45
  %.02832 = phi i32 [ 0, %.lr.ph ], [ %56, %45 ]
  %46 = uitofp nneg i32 %.02832 to float
  %47 = fmul float %19, %46
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %48 = call float @sinf(float noundef %43) #5
  %49 = call float @cosf(float noundef %47) #5
  %50 = fmul float %48, %49
  %51 = call float @cosf(float noundef %43) #5
  %52 = call float @sinf(float noundef %43) #5
  %53 = call float @sinf(float noundef %47) #5
  %54 = fmul float %52, %53
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %50, float noundef %51, float noundef %54)
  %55 = load float, ptr %20, align 4, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %55)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  %56 = add nuw i32 %.02832, 1
  %exitcond.not = icmp eq i32 %.02832, %2
  br i1 %exitcond.not, label %._crit_edge.split, label %45, !llvm.loop !11

57:                                               ; preds = %._crit_edge36
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #5
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  br label %58

58:                                               ; preds = %57, %._crit_edge36
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { inlinehint mustprogress 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 = { inlinehint 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 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !8, i64 12}
!6 = !{!"_ZTSN7Riemann7Sphere3E", !7, i64 0, !8, i64 12}
!7 = !{!"_ZTSN5Maths8TVector3IfEE", !8, i64 0, !8, i64 4, !8, i64 8}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass