; LLVM IR from unitreerobotics/kinect_teleoperate :: src/sample_helper_libs/window_controller_3d (Sphere)

; 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.Visualization::MonoVertex" = type { [3 x float], [3 x float] }
%"class.Visualization::Sphere" = type <{ %"class.Visualization::RendererBase.base", float, i32, i32, %"class.std::vector", %"class.std::vector.0", i32, i32, i32, i32, i32, i32, i32, [4 x i8] }>
%"class.Visualization::RendererBase.base" = type <{ ptr, i8, [3 x i8], [4 x [4 x float]], [4 x [4 x float]], [4 x i8], ptr, i32, i32, i32 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Visualization::MonoVertex, std::allocator<Visualization::MonoVertex>>::_Vector_impl" }
%"struct.std::_Vector_base<Visualization::MonoVertex, std::allocator<Visualization::MonoVertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<Visualization::MonoVertex, std::allocator<Visualization::MonoVertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Visualization::MonoVertex, std::allocator<Visualization::MonoVertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13Visualization6Sphere13BuildVerticesEv(ptr noundef nonnull align 8 dereferenceable(252) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.Visualization::MonoVertex", align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store float 0x400921FB40000000, ptr %3, align 4, !tbaa !9
  %25 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 4
  call void @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %26 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 5
  call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %27 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 1
  %28 = load float, ptr %27, align 4, !tbaa !11
  %29 = fdiv float 1.000000e+00, %28
  store float %29, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %30 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !24
  %32 = sitofp i32 %31 to float
  %33 = fdiv float 0x401921FB40000000, %32
  store float %33, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %34 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 3
  %35 = load i32, ptr %34, align 4, !tbaa !25
  %36 = sitofp i32 %35 to float
  %37 = fdiv float 0x400921FB40000000, %36
  store float %37, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store float 0.000000e+00, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store float 0.000000e+00, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store float 0.000000e+00, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 0.000000e+00, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 0.000000e+00, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store float 0.000000e+00, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store float 0.000000e+00, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store float 0.000000e+00, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !26
  br label %38

38:                                               ; preds = %105, %1
  %39 = load i32, ptr %16, align 4, !tbaa !26
  %40 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 3
  %41 = load i32, ptr %40, align 4, !tbaa !25
  %42 = icmp sle i32 %39, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %38
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %108

44:                                               ; preds = %38
  %45 = load i32, ptr %16, align 4, !tbaa !26
  %46 = sitofp i32 %45 to float
  %47 = load float, ptr %6, align 4, !tbaa !9
  %48 = fneg float %46
  %49 = call float @llvm.fmuladd.f32(float %48, float %47, float 0x3FF921FB40000000)
  store float %49, ptr %8, align 4, !tbaa !9
  %50 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 1
  %51 = load float, ptr %50, align 4, !tbaa !11
  %52 = load float, ptr %8, align 4, !tbaa !9
  %53 = call noundef float @_ZSt3cosf(float noundef %52)
  %54 = fmul float %51, %53
  store float %54, ptr %12, align 4, !tbaa !9
  %55 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 1
  %56 = load float, ptr %55, align 4, !tbaa !11
  %57 = load float, ptr %8, align 4, !tbaa !9
  %58 = call noundef float @_ZSt3sinf(float noundef %57)
  %59 = fmul float %56, %58
  store float %59, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !26
  br label %60

60:                                               ; preds = %101, %44
  %61 = load i32, ptr %18, align 4, !tbaa !26
  %62 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 2
  %63 = load i32, ptr %62, align 8, !tbaa !24
  %64 = icmp sle i32 %61, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %60
  %67 = load i32, ptr %18, align 4, !tbaa !26
  %68 = sitofp i32 %67 to float
  %69 = load float, ptr %5, align 4, !tbaa !9
  %70 = fmul float %68, %69
  store float %70, ptr %7, align 4, !tbaa !9
  %71 = load float, ptr %12, align 4, !tbaa !9
  %72 = load float, ptr %7, align 4, !tbaa !9
  %73 = call noundef float @_ZSt3cosf(float noundef %72)
  %74 = fmul float %71, %73
  store float %74, ptr %9, align 4, !tbaa !9
  %75 = load float, ptr %12, align 4, !tbaa !9
  %76 = load float, ptr %7, align 4, !tbaa !9
  %77 = call noundef float @_ZSt3sinf(float noundef %76)
  %78 = fmul float %75, %77
  store float %78, ptr %10, align 4, !tbaa !9
  %79 = load float, ptr %9, align 4, !tbaa !9
  %80 = load float, ptr %4, align 4, !tbaa !9
  %81 = fmul float %79, %80
  store float %81, ptr %13, align 4, !tbaa !9
  %82 = load float, ptr %10, align 4, !tbaa !9
  %83 = load float, ptr %4, align 4, !tbaa !9
  %84 = fmul float %82, %83
  store float %84, ptr %14, align 4, !tbaa !9
  %85 = load float, ptr %11, align 4, !tbaa !9
  %86 = load float, ptr %4, align 4, !tbaa !9
  %87 = fmul float %85, %86
  store float %87, ptr %15, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #5
  %89 = getelementptr inbounds %"struct.Visualization::MonoVertex", ptr %19, i32 0, i32 0
  %90 = load float, ptr %9, align 4, !tbaa !9
  store float %90, ptr %89, align 4, !tbaa !9
  %91 = getelementptr inbounds float, ptr %89, i64 1
  %92 = load float, ptr %10, align 4, !tbaa !9
  store float %92, ptr %91, align 4, !tbaa !9
  %93 = getelementptr inbounds float, ptr %89, i64 2
  %94 = load float, ptr %11, align 4, !tbaa !9
  store float %94, ptr %93, align 4, !tbaa !9
  %95 = getelementptr inbounds %"struct.Visualization::MonoVertex", ptr %19, i32 0, i32 1
  %96 = load float, ptr %13, align 4, !tbaa !9
  store float %96, ptr %95, align 4, !tbaa !9
  %97 = getelementptr inbounds float, ptr %95, i64 1
  %98 = load float, ptr %14, align 4, !tbaa !9
  store float %98, ptr %97, align 4, !tbaa !9
  %99 = getelementptr inbounds float, ptr %95, i64 2
  %100 = load float, ptr %15, align 4, !tbaa !9
  store float %100, ptr %99, align 4, !tbaa !9
  call void @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 4 dereferenceable(24) %19)
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #5
  br label %101

101:                                              ; preds = %66
  %102 = load i32, ptr %18, align 4, !tbaa !26
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %18, align 4, !tbaa !26
  br label %60, !llvm.loop !27

104:                                              ; preds = %65
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %16, align 4, !tbaa !26
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %16, align 4, !tbaa !26
  br label %38, !llvm.loop !29

108:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !26
  br label %109

109:                                              ; preds = %161, %108
  %110 = load i32, ptr %22, align 4, !tbaa !26
  %111 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 3
  %112 = load i32, ptr %111, align 4, !tbaa !25
  %113 = icmp slt i32 %110, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %109
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %164

115:                                              ; preds = %109
  %116 = load i32, ptr %22, align 4, !tbaa !26
  %117 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 2
  %118 = load i32, ptr %117, align 8, !tbaa !24
  %119 = add nsw i32 %118, 1
  %120 = mul nsw i32 %116, %119
  store i32 %120, ptr %20, align 4, !tbaa !26
  %121 = load i32, ptr %20, align 4, !tbaa !26
  %122 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 2
  %123 = load i32, ptr %122, align 8, !tbaa !24
  %124 = add i32 %121, %123
  %125 = add i32 %124, 1
  store i32 %125, ptr %21, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !26
  br label %126

126:                                              ; preds = %153, %115
  %127 = load i32, ptr %23, align 4, !tbaa !26
  %128 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 2
  %129 = load i32, ptr %128, align 8, !tbaa !24
  %130 = icmp slt i32 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %126
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %160

132:                                              ; preds = %126
  %133 = load i32, ptr %22, align 4, !tbaa !26
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %140

135:                                              ; preds = %132
  %136 = load i32, ptr %20, align 4, !tbaa !26
  %137 = load i32, ptr %21, align 4, !tbaa !26
  %138 = load i32, ptr %20, align 4, !tbaa !26
  %139 = add i32 %138, 1
  call void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252) %24, i32 noundef %136, i32 noundef %137, i32 noundef %139)
  br label %140

140:                                              ; preds = %135, %132
  %141 = load i32, ptr %22, align 4, !tbaa !26
  %142 = getelementptr inbounds %"class.Visualization::Sphere", ptr %24, i32 0, i32 3
  %143 = load i32, ptr %142, align 4, !tbaa !25
  %144 = sub nsw i32 %143, 1
  %145 = icmp ne i32 %141, %144
  br i1 %145, label %146, label %152

146:                                              ; preds = %140
  %147 = load i32, ptr %20, align 4, !tbaa !26
  %148 = add i32 %147, 1
  %149 = load i32, ptr %21, align 4, !tbaa !26
  %150 = load i32, ptr %21, align 4, !tbaa !26
  %151 = add i32 %150, 1
  call void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252) %24, i32 noundef %148, i32 noundef %149, i32 noundef %151)
  br label %152

152:                                              ; preds = %146, %140
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %23, align 4, !tbaa !26
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %23, align 4, !tbaa !26
  %156 = load i32, ptr %20, align 4, !tbaa !26
  %157 = add i32 %156, 1
  store i32 %157, ptr %20, align 4, !tbaa !26
  %158 = load i32, ptr %21, align 4, !tbaa !26
  %159 = add i32 %158, 1
  store i32 %159, ptr %21, align 4, !tbaa !26
  br label %126, !llvm.loop !30

160:                                              ; preds = %131
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %22, align 4, !tbaa !26
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %22, align 4, !tbaa !26
  br label %109, !llvm.loop !31

164:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) #0 align 2

attributes #0 = { 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 #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 164}
!12 = !{!"_ZTSN13Visualization6SphereE", !13, i64 0, !10, i64 164, !15, i64 168, !15, i64 172, !16, i64 176, !20, i64 200, !15, i64 224, !15, i64 228, !15, i64 232, !15, i64 236, !15, i64 240, !15, i64 244, !15, i64 248}
!13 = !{!"_ZTSN13Visualization12RendererBaseE", !14, i64 8, !7, i64 12, !7, i64 76, !6, i64 144, !15, i64 152, !15, i64 156, !15, i64 160}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIN13Visualization10MonoVertexESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!12, !15, i64 168}
!25 = !{!12, !15, i64 172}
!26 = !{!15, !15, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}


; 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.Visualization::MonoVertex" = type { [3 x float], [3 x float] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13Visualization6Sphere13BuildVerticesEv(ptr noundef nonnull align 8 dereferenceable(252) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"struct.Visualization::MonoVertex", align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %4 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 164
  %6 = load float, ptr %5, align 4, !tbaa !5
  %7 = fdiv float 1.000000e+00, %6
  %8 = getelementptr inbounds i8, ptr %0, i64 168
  %9 = load i32, ptr %8, align 8, !tbaa !22
  %10 = sitofp i32 %9 to float
  %11 = fdiv float 0x401921FB40000000, %10
  %12 = getelementptr inbounds i8, ptr %0, i64 172
  %13 = load i32, ptr %12, align 4, !tbaa !23
  %14 = sitofp i32 %13 to float
  %15 = fdiv float 0x400921FB40000000, %14
  %.not52 = icmp slt i32 %13, 0
  br i1 %.not52, label %._crit_edge67, label %.lr.ph55

.lr.ph55:                                         ; preds = %1
  %16 = getelementptr inbounds i8, ptr %2, i64 4
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  %18 = getelementptr inbounds i8, ptr %2, i64 12
  %19 = getelementptr inbounds i8, ptr %2, i64 20
  %20 = insertelement <2 x float> poison, float %7, i64 0
  %21 = shufflevector <2 x float> %20, <2 x float> poison, <2 x i32> zeroinitializer
  br label %24

.preheader:                                       ; preds = %._crit_edge
  %22 = icmp sgt i32 %40, 0
  %23 = icmp sgt i32 %38, 0
  %or.cond = and i1 %22, %23
  br i1 %or.cond, label %.lr.ph66.split, label %._crit_edge67

24:                                               ; preds = %.lr.ph55, %._crit_edge
  %.04653 = phi i32 [ 0, %.lr.ph55 ], [ %39, %._crit_edge ]
  %25 = uitofp nneg i32 %.04653 to float
  %26 = fneg float %25
  %27 = call float @llvm.fmuladd.f32(float %26, float %15, float 0x3FF921FB40000000)
  %28 = load float, ptr %5, align 4, !tbaa !5
  %29 = call noundef float @_ZSt3cosf(float noundef %27)
  %30 = load float, ptr %5, align 4, !tbaa !5
  %31 = call noundef float @_ZSt3sinf(float noundef %27)
  %32 = fmul float %30, %31
  %33 = load i32, ptr %8, align 8, !tbaa !22
  %.not4950 = icmp slt i32 %33, 0
  br i1 %.not4950, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %24
  %34 = fmul float %28, %29
  %35 = fmul float %7, %32
  %36 = insertelement <2 x float> poison, float %34, i64 0
  %37 = shufflevector <2 x float> %36, <2 x float> poison, <2 x i32> zeroinitializer
  br label %41

._crit_edge:                                      ; preds = %41, %24
  %38 = phi i32 [ %33, %24 ], [ %53, %41 ]
  %39 = add nuw nsw i32 %.04653, 1
  %40 = load i32, ptr %12, align 4, !tbaa !23
  %.not.not = icmp slt i32 %.04653, %40
  br i1 %.not.not, label %24, label %.preheader, !llvm.loop !24

41:                                               ; preds = %.lr.ph, %41
  %.04551 = phi i32 [ 0, %.lr.ph ], [ %52, %41 ]
  %42 = uitofp nneg i32 %.04551 to float
  %43 = fmul float %11, %42
  %44 = call noundef float @_ZSt3cosf(float noundef %43)
  %45 = call noundef float @_ZSt3sinf(float noundef %43)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  store float %32, ptr %17, align 4, !tbaa !26
  %46 = insertelement <2 x float> poison, float %44, i64 0
  %47 = insertelement <2 x float> %46, float %45, i64 1
  %48 = fmul <2 x float> %37, %47
  %49 = fmul <2 x float> %21, %48
  %50 = extractelement <2 x float> %48, i64 0
  store float %50, ptr %2, align 4, !tbaa !26
  %51 = extractelement <2 x float> %48, i64 1
  store float %51, ptr %16, align 4, !tbaa !26
  store <2 x float> %49, ptr %18, align 4, !tbaa !26
  store float %35, ptr %19, align 4, !tbaa !26
  call void @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(24) %2)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  %52 = add nuw nsw i32 %.04551, 1
  %53 = load i32, ptr %8, align 8, !tbaa !22
  %.not49.not = icmp slt i32 %.04551, %53
  br i1 %.not49.not, label %41, label %._crit_edge, !llvm.loop !27

._crit_edge67:                                    ; preds = %._crit_edge63, %1, %.preheader
  ret void

.lr.ph66.split:                                   ; preds = %.preheader, %._crit_edge63
  %54 = phi i32 [ %67, %._crit_edge63 ], [ %38, %.preheader ]
  %55 = phi i32 [ %68, %._crit_edge63 ], [ %38, %.preheader ]
  %.04264 = phi i32 [ %69, %._crit_edge63 ], [ 0, %.preheader ]
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %.lr.ph66.split
  %57 = add nuw nsw i32 %55, 1
  %58 = mul nuw nsw i32 %57, %.04264
  %59 = add nuw i32 %58, %55
  %.04356 = add i32 %59, 1
  %.not47 = icmp eq i32 %.04264, 0
  br i1 %.not47, label %.lr.ph62.split.us, label %.lr.ph62.split

.lr.ph62.split.us:                                ; preds = %.lr.ph62, %.lr.ph62.split.us._crit_edge
  %60 = phi i32 [ %64, %.lr.ph62.split.us._crit_edge ], [ %54, %.lr.ph62 ]
  %.04360.us = phi i32 [ %.043.us, %.lr.ph62.split.us._crit_edge ], [ %.04356, %.lr.ph62 ]
  %.059.us = phi i32 [ %65, %.lr.ph62.split.us._crit_edge ], [ 0, %.lr.ph62 ]
  %.043.in58.us = phi i32 [ %.04360.us, %.lr.ph62.split.us._crit_edge ], [ %59, %.lr.ph62 ]
  %.04457.us = phi i32 [ %.pre70, %.lr.ph62.split.us._crit_edge ], [ 0, %.lr.ph62 ]
  %61 = load i32, ptr %12, align 4, !tbaa !23
  %.not48.us = icmp eq i32 %61, 1
  %.pre70 = add i32 %.04457.us, 1
  br i1 %.not48.us, label %.lr.ph62.split.us._crit_edge, label %62

62:                                               ; preds = %.lr.ph62.split.us
  %63 = add i32 %.043.in58.us, 2
  call void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %.pre70, i32 noundef %.04360.us, i32 noundef %63)
  %.pre = load i32, ptr %8, align 8, !tbaa !22
  br label %.lr.ph62.split.us._crit_edge

.lr.ph62.split.us._crit_edge:                     ; preds = %.lr.ph62.split.us, %62
  %64 = phi i32 [ %.pre, %62 ], [ %60, %.lr.ph62.split.us ]
  %65 = add nuw nsw i32 %.059.us, 1
  %.043.us = add i32 %.04360.us, 1
  %66 = icmp slt i32 %65, %64
  br i1 %66, label %.lr.ph62.split.us, label %._crit_edge63, !llvm.loop !28

._crit_edge63:                                    ; preds = %77, %.lr.ph62.split.us._crit_edge, %.lr.ph66.split
  %67 = phi i32 [ %54, %.lr.ph66.split ], [ %64, %.lr.ph62.split.us._crit_edge ], [ %79, %77 ]
  %68 = phi i32 [ %55, %.lr.ph66.split ], [ %64, %.lr.ph62.split.us._crit_edge ], [ %79, %77 ]
  %69 = add nuw nsw i32 %.04264, 1
  %70 = load i32, ptr %12, align 4, !tbaa !23
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %.lr.ph66.split, label %._crit_edge67, !llvm.loop !29

.lr.ph62.split:                                   ; preds = %.lr.ph62, %77
  %.04360 = phi i32 [ %.043, %77 ], [ %.04356, %.lr.ph62 ]
  %.059 = phi i32 [ %78, %77 ], [ 0, %.lr.ph62 ]
  %.043.in58 = phi i32 [ %.04360, %77 ], [ %59, %.lr.ph62 ]
  %.04457 = phi i32 [ %72, %77 ], [ %58, %.lr.ph62 ]
  %72 = add i32 %.04457, 1
  call void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %.04457, i32 noundef %.04360, i32 noundef %72)
  %73 = load i32, ptr %12, align 4, !tbaa !23
  %74 = add nsw i32 %73, -1
  %.not48 = icmp eq i32 %.04264, %74
  br i1 %.not48, label %77, label %75

75:                                               ; preds = %.lr.ph62.split
  %76 = add i32 %.043.in58, 2
  call void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252) %0, i32 noundef %72, i32 noundef %.04360, i32 noundef %76)
  br label %77

77:                                               ; preds = %.lr.ph62.split, %75
  %78 = add nuw nsw i32 %.059, 1
  %.043 = add i32 %.04360, 1
  %79 = load i32, ptr %8, align 8, !tbaa !22
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %.lr.ph62.split, label %._crit_edge63, !llvm.loop !28
}

; 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 @_ZNSt6vectorIN13Visualization10MonoVertexESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13Visualization6Sphere10AddIndicesEjjj(ptr noundef nonnull align 8 dereferenceable(252), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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, !13, i64 164}
!6 = !{!"_ZTSN13Visualization6SphereE", !7, i64 0, !13, i64 164, !12, i64 168, !12, i64 172, !14, i64 176, !18, i64 200, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !12, i64 240, !12, i64 244, !12, i64 248}
!7 = !{!"_ZTSN13Visualization12RendererBaseE", !8, i64 8, !9, i64 12, !9, i64 76, !11, i64 144, !12, i64 152, !12, i64 156, !12, i64 160}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"float", !9, i64 0}
!14 = !{!"_ZTSSt6vectorIN13Visualization10MonoVertexESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN13Visualization10MonoVertexESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"_ZTSSt6vectorIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!6, !12, i64 168}
!23 = !{!6, !12, i64 172}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!13, !13, i64 0}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25, !30}
!30 = !{!"llvm.loop.unswitch.partial.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass