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

; 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::Cylinder3" = type { float, float, %"class.Maths::TVector3", %"class.Maths::TVector3" }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv() #2 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96), i64 noundef) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9Cylinder312GetWireframeERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEE(ptr noundef nonnull align 4 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, 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 i32, align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = call noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv()
  store ptr %18, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96) %19) #6
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #5
  %22 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %17, i32 0, i32 0
  %23 = load float, ptr %22, align 4, !tbaa !11
  %24 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %17, i32 0, i32 1
  %25 = load float, ptr %24, align 4, !tbaa !15
  %26 = fmul float %25, 5.000000e-01
  %27 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %17, i32 0, i32 0
  %28 = load float, ptr %27, align 4, !tbaa !11
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %23, float noundef %26, float noundef %28)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = mul nsw i32 %30, 2
  %32 = add nsw i32 %31, 2
  %33 = sext i32 %32 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %33)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  %34 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %17, i32 0, i32 1
  %35 = load float, ptr %34, align 4, !tbaa !15
  %36 = fmul float %35, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef 0.000000e+00, float noundef %36, float noundef 0.000000e+00)
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = mul nsw i32 2, %38
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %40) #5
  %42 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  %43 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %17, i32 0, i32 1
  %44 = load float, ptr %43, align 4, !tbaa !15
  %45 = fneg float %44
  %46 = fmul float %45, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef 0.000000e+00, float noundef %46, float noundef 0.000000e+00)
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = mul nsw i32 2, %48
  %50 = add nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %51) #5
  %53 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %52, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %106, %3
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %109

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %60, i64 noundef %62) #5
  %64 = getelementptr inbounds %"class.Maths::TVector3", ptr %63, i32 0, i32 0
  %65 = load float, ptr %64, align 4, !tbaa !16
  %66 = getelementptr inbounds %"class.Maths::TVector3", ptr %9, i32 0, i32 0
  %67 = load float, ptr %66, align 4, !tbaa !16
  %68 = fmul float %65, %67
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %69, i64 noundef %71) #5
  %73 = getelementptr inbounds %"class.Maths::TVector3", ptr %72, i32 0, i32 1
  %74 = load float, ptr %73, align 4, !tbaa !17
  %75 = getelementptr inbounds %"class.Maths::TVector3", ptr %9, i32 0, i32 1
  %76 = load float, ptr %75, align 4, !tbaa !17
  %77 = fmul float %74, %76
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %78, i64 noundef %80) #5
  %82 = getelementptr inbounds %"class.Maths::TVector3", ptr %81, i32 0, i32 2
  %83 = load float, ptr %82, align 4, !tbaa !18
  %84 = getelementptr inbounds %"class.Maths::TVector3", ptr %9, i32 0, i32 2
  %85 = load float, ptr %84, align 4, !tbaa !18
  %86 = fmul float %83, %85
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %68, float noundef %77, float noundef %86)
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #5
  %91 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %90, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  %92 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 0
  %93 = load float, ptr %92, align 4, !tbaa !16
  %94 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 1
  %95 = load float, ptr %94, align 4, !tbaa !17
  %96 = fneg float %95
  %97 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 2
  %98 = load float, ptr %97, align 4, !tbaa !18
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %14, float noundef %93, float noundef %96, float noundef %98)
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = add nsw i32 %100, %101
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %103) #5
  %105 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %104, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #5
  br label %106

106:                                              ; preds = %59
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %12, align 4, !tbaa !9
  br label %54, !llvm.loop !19

109:                                              ; preds = %58
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = mul nsw i32 6, %111
  %113 = sext i32 %112 to i64
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %113)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %178, %109
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %181

119:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %120 = load i32, ptr %15, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = srem i32 %121, %122
  store i32 %123, ptr %16, align 4, !tbaa !9
  %124 = load i32, ptr %16, align 4, !tbaa !9
  %125 = trunc i32 %124 to i16
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = mul nsw i32 6, %127
  %129 = add nsw i32 %128, 0
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %130) #5
  store i16 %125, ptr %131, align 2, !tbaa !21
  %132 = load i32, ptr %15, align 4, !tbaa !9
  %133 = trunc i32 %132 to i16
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = load i32, ptr %15, align 4, !tbaa !9
  %136 = mul nsw i32 6, %135
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %138) #5
  store i16 %133, ptr %139, align 2, !tbaa !21
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = add nsw i32 %140, %141
  %143 = trunc i32 %142 to i16
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = load i32, ptr %15, align 4, !tbaa !9
  %146 = mul nsw i32 6, %145
  %147 = add nsw i32 %146, 2
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %148) #5
  store i16 %143, ptr %149, align 2, !tbaa !21
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = add nsw i32 %150, %151
  %153 = trunc i32 %152 to i16
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = mul nsw i32 6, %155
  %157 = add nsw i32 %156, 3
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %158) #5
  store i16 %153, ptr %159, align 2, !tbaa !21
  %160 = load i32, ptr %15, align 4, !tbaa !9
  %161 = trunc i32 %160 to i16
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = mul nsw i32 6, %163
  %165 = add nsw i32 %164, 4
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %166) #5
  store i16 %161, ptr %167, align 2, !tbaa !21
  %168 = load i32, ptr %15, align 4, !tbaa !9
  %169 = load i32, ptr %8, align 4, !tbaa !9
  %170 = add nsw i32 %168, %169
  %171 = trunc i32 %170 to i16
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = load i32, ptr %15, align 4, !tbaa !9
  %174 = mul nsw i32 6, %173
  %175 = add nsw i32 %174, 5
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %176) #5
  store i16 %171, ptr %177, align 2, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %178

178:                                              ; preds = %119
  %179 = load i32, ptr %15, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %15, align 4, !tbaa !9
  br label %114, !llvm.loop !23

181:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

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

!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, !13, i64 0}
!12 = !{!"_ZTSN7Riemann9Cylinder3E", !13, i64 0, !13, i64 4, !14, i64 8, !14, i64 20}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN5Maths8TVector3IfEE", !13, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!12, !13, i64 4}
!16 = !{!14, !13, i64 0}
!17 = !{!14, !13, i64 4}
!18 = !{!14, !13, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = distinct !{!23, !20}


; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96), i64 noundef) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9Cylinder312GetWireframeERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEE(ptr nocapture noundef nonnull readonly align 4 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"class.Maths::TVector3", align 4
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = tail call noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv()
  %10 = tail call noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96) %9) #5
  %11 = trunc i64 %10 to i32
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  %12 = load float, ptr %0, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load float, ptr %13, align 4, !tbaa !11
  %15 = fmul float %14, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %12, float noundef %15, float noundef %12)
  %16 = shl nsw i32 %11, 1
  %17 = add nsw i32 %16, 2
  %18 = sext i32 %17 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %18)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  %19 = load float, ptr %13, align 4, !tbaa !11
  %20 = fmul float %19, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 0.000000e+00, float noundef %20, float noundef 0.000000e+00)
  %21 = sext i32 %16 to i64
  %22 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %21) #6
  %23 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  %24 = load float, ptr %13, align 4, !tbaa !11
  %25 = fmul float %24, -5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00, float noundef %25, float noundef 0.000000e+00)
  %26 = or disjoint i32 %16, 1
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %27) #6
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  %30 = icmp sgt i32 %11, 0
  br i1 %30, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %3
  %sext62 = mul i64 %10, 25769803776
  %31 = ashr exact i64 %sext62, 32
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %31)
  br label %._crit_edge55

.lr.ph:                                           ; preds = %3
  %32 = getelementptr inbounds i8, ptr %4, i64 4
  %33 = getelementptr inbounds i8, ptr %4, i64 8
  %34 = getelementptr inbounds i8, ptr %7, i64 4
  %35 = getelementptr inbounds i8, ptr %7, i64 8
  %36 = and i64 %10, 2147483647
  br label %39

._crit_edge:                                      ; preds = %39
  %sext = mul i64 %10, 25769803776
  %37 = ashr exact i64 %sext, 32
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %37)
  br i1 %30, label %.lr.ph54.preheader, label %._crit_edge55

.lr.ph54.preheader:                               ; preds = %._crit_edge
  %38 = and i64 %10, 2147483647
  br label %.lr.ph54

39:                                               ; preds = %.lr.ph, %39
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %39 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %9, i64 noundef %indvars.iv) #6
  %41 = load float, ptr %40, align 4, !tbaa !12
  %42 = load float, ptr %4, align 4, !tbaa !12
  %43 = fmul float %41, %42
  %44 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %9, i64 noundef %indvars.iv) #6
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  %46 = load float, ptr %45, align 4, !tbaa !13
  %47 = load float, ptr %32, align 4, !tbaa !13
  %48 = fmul float %46, %47
  %49 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %9, i64 noundef %indvars.iv) #6
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load float, ptr %50, align 4, !tbaa !14
  %52 = load float, ptr %33, align 4, !tbaa !14
  %53 = fmul float %51, %52
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef %43, float noundef %48, float noundef %53)
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  %56 = load float, ptr %7, align 4, !tbaa !12
  %57 = load float, ptr %34, align 4, !tbaa !13
  %58 = fneg float %57
  %59 = load float, ptr %35, align 4, !tbaa !14
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef %56, float noundef %58, float noundef %59)
  %60 = add nuw nsw i64 %indvars.iv, %36
  %61 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %60) #6
  %62 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %61, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %36
  br i1 %exitcond.not, label %._crit_edge, label %39, !llvm.loop !15

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  ret void

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %.lr.ph54
  %indvars.iv57 = phi i64 [ 0, %.lr.ph54.preheader ], [ %indvars.iv.next58, %.lr.ph54 ]
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %63 = icmp eq i64 %indvars.iv.next58, %38
  %64 = trunc nuw nsw i64 %indvars.iv.next58 to i32
  %iv.rem = select i1 %63, i32 0, i32 %64
  %65 = trunc i32 %iv.rem to i16
  %66 = mul nuw nsw i64 %indvars.iv57, 6
  %67 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %66) #6
  store i16 %65, ptr %67, align 2, !tbaa !17
  %68 = trunc i64 %indvars.iv57 to i16
  %69 = or disjoint i64 %66, 1
  %70 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %69) #6
  store i16 %68, ptr %70, align 2, !tbaa !17
  %71 = add nuw nsw i32 %iv.rem, %11
  %72 = trunc i32 %71 to i16
  %73 = add nuw nsw i64 %66, 2
  %74 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %73) #6
  store i16 %72, ptr %74, align 2, !tbaa !17
  %75 = add i64 %indvars.iv57, %10
  %76 = trunc i64 %75 to i16
  %77 = add nuw nsw i64 %66, 3
  %78 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %77) #6
  store i16 %76, ptr %78, align 2, !tbaa !17
  %79 = add nuw nsw i64 %66, 4
  %80 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %79) #6
  store i16 %68, ptr %80, align 2, !tbaa !17
  %81 = add nuw nsw i64 %66, 5
  %82 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %81) #6
  store i16 %76, ptr %82, align 2, !tbaa !17
  %exitcond61.not = icmp eq i64 %indvars.iv.next58, %38
  br i1 %exitcond61.not, label %._crit_edge55, label %.lr.ph54, !llvm.loop !19
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN7Riemann9Cylinder3E", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 20}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5Maths8TVector3IfEE", !7, i64 0, !7, i64 4, !7, i64 8}
!11 = !{!6, !7, i64 4}
!12 = !{!10, !7, i64 0}
!13 = !{!10, !7, i64 4}
!14 = !{!10, !7, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !8, i64 0}
!19 = distinct !{!19, !16}


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