; LLVM IR from goldest-star/seawave-animation :: src/scenes/3D_graphics/01_modeling/modeling.ll (ZN11scene_model14update_terrainEv)

; 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.vcl::mesh_drawable" = type { %"struct.vcl::mesh_drawable_gpu_data", %"struct.vcl::mesh_drawable_uniform", i32, i32 }
%"struct.vcl::mesh_drawable_gpu_data" = type { i32, i32, i32, i32, i32, i32, i32 }
%"struct.vcl::mesh_drawable_uniform" = type { %"struct.vcl::affine_transform", %"struct.vcl::buffer_stack", %"struct.vcl::shading_mesh", float }
%"struct.vcl::affine_transform" = type { %"struct.vcl::buffer_stack", %"struct.vcl::mat", float, %"struct.vcl::buffer_stack" }
%"struct.vcl::mat" = type { float, float, float, float, float, float, float, float, float }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::shading_mesh" = type { float, float, float, i32 }
%"struct.vcl::mesh" = type { %"struct.vcl::buffer.24", %"struct.vcl::buffer.24", %"struct.vcl::buffer.25", %"struct.vcl::buffer.31", %"struct.vcl::buffer.37" }
%"struct.vcl::buffer.24" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.25" = type { %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.31" = type { %"class.std::vector.32" }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.37" = type { %"class.std::vector.38" }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.scene_model = type <{ %"struct.vcl::mesh_drawable", %"struct.vcl::mesh_drawable", %"class.std::vector", %"struct.vcl::mesh_drawable", [4 x i8], %"class.std::vector", %"struct.vcl::mesh_drawable", %"struct.vcl::mesh_drawable", %"struct.vcl::mesh_drawable", %"struct.vcl::mesh_drawable", %"struct.vcl::mesh_drawable", [4 x i8], %"class.std::__cxx11::list", i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %"struct.vcl::buffer", %"struct.vcl::buffer", %"struct.vcl::hierarchy_mesh_drawable", %"struct.vcl::hierarchy_mesh_drawable", %struct.gui_scene_structure, %"class.vcl::timer_interval", %"class.vcl::timer_interval", %"class.vcl::timer_interval", %"class.vcl::timer_interval", %"class.vcl::timer_event", i8, i8, i8, i8, [4 x i8] }>
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<particle_structure, std::allocator<particle_structure>>::_List_impl" }
%"struct.std::__cxx11::_List_base<particle_structure, std::allocator<particle_structure>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.vcl::buffer" = type { %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<vec3t, std::allocator<vec3t>>::_Vector_impl" }
%"struct.std::_Vector_base<vec3t, std::allocator<vec3t>>::_Vector_impl" = type { %"struct.std::_Vector_base<vec3t, std::allocator<vec3t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vec3t, std::allocator<vec3t>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::hierarchy_mesh_drawable" = type { %"class.std::map", %"class.std::vector.11" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<vcl::hierarchy_mesh_drawable_node, std::allocator<vcl::hierarchy_mesh_drawable_node>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::hierarchy_mesh_drawable_node, std::allocator<vcl::hierarchy_mesh_drawable_node>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::hierarchy_mesh_drawable_node, std::allocator<vcl::hierarchy_mesh_drawable_node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::hierarchy_mesh_drawable_node, std::allocator<vcl::hierarchy_mesh_drawable_node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.gui_scene_structure = type { i8, i8, i8, float, float, i32, float }
%"class.vcl::timer_interval" = type { %"class.vcl::timer_basic", float, float }
%"class.vcl::timer_basic" = type { float, float, i8, float }
%"class.vcl::timer_event" = type { %"class.vcl::timer_basic", i8, float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11scene_model14update_terrainEv(ptr noundef nonnull align 8 dereferenceable(1516) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.vcl::mesh_drawable", align 4
  %4 = alloca %"struct.vcl::mesh", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.vcl::buffer_stack", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  %9 = getelementptr inbounds %struct.scene_model, ptr %8, i32 0, i32 0
  call void @_ZN3vcl13mesh_drawable5clearEv(ptr noundef nonnull align 4 dereferenceable(132) %9)
  call void @llvm.lifetime.start.p0(i64 132, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr %4) #6
  %10 = getelementptr inbounds %struct.scene_model, ptr %8, i32 0, i32 27
  call void @_Z14create_terrainRK19gui_scene_structure(ptr dead_on_unwind writable sret(%"struct.vcl::mesh") align 8 %4, ptr noundef nonnull align 4 dereferenceable(20) %10)
  invoke void @_ZN3vcl13mesh_drawableC1ERKNS_4meshEjj(ptr noundef nonnull align 4 dereferenceable(132) %3, ptr noundef nonnull align 8 dereferenceable(120) %4, i32 noundef 0, i32 noundef 0)
          to label %11 unwind label %20

11:                                               ; preds = %1
  %12 = getelementptr inbounds %struct.scene_model, ptr %8, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 4 %3, i64 132, i1 false), !tbaa.struct !9
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 132, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %13 = getelementptr inbounds %struct.scene_model, ptr %8, i32 0, i32 0
  %14 = getelementptr inbounds %"struct.vcl::mesh_drawable", ptr %13, i32 0, i32 1
  %15 = getelementptr inbounds %"struct.vcl::mesh_drawable_uniform", ptr %14, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %7, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  %16 = getelementptr inbounds %struct.scene_model, ptr %8, i32 0, i32 0
  %17 = getelementptr inbounds %"struct.vcl::mesh_drawable", ptr %16, i32 0, i32 1
  %18 = getelementptr inbounds %"struct.vcl::mesh_drawable_uniform", ptr %17, i32 0, i32 2
  %19 = getelementptr inbounds %"struct.vcl::shading_mesh", ptr %18, i32 0, i32 2
  store float 0.000000e+00, ptr %19, align 4, !tbaa !15
  ret void

20:                                               ; preds = %1
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %6, align 4
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %4) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 132, ptr %3) #6
  br label %24

24:                                               ; preds = %20
  %25 = load ptr, ptr %5, align 8
  %26 = load i32, ptr %6, align 4
  %27 = insertvalue { ptr, i32 } poison, ptr %25, 0
  %28 = insertvalue { ptr, i32 } %27, i32 %26, 1
  resume { ptr, i32 } %28
}

; 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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3vcl13mesh_drawableC1ERKNS_4meshEjj(ptr noundef nonnull align 4 dereferenceable(132), ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #2

declare void @_ZN3vcl13mesh_drawable5clearEv(ptr noundef nonnull align 4 dereferenceable(132)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14create_terrainRK19gui_scene_structure(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mesh") align 8, ptr noundef nonnull align 4 dereferenceable(20)) #5

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 = { "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 nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 4, !10, i64 20, i64 4, !10, i64 24, i64 4, !10, i64 28, i64 4, !12, i64 32, i64 4, !12, i64 36, i64 4, !12, i64 40, i64 4, !12, i64 44, i64 4, !12, i64 48, i64 4, !12, i64 52, i64 4, !12, i64 56, i64 4, !12, i64 60, i64 4, !12, i64 64, i64 4, !12, i64 68, i64 4, !12, i64 72, i64 4, !12, i64 76, i64 4, !12, i64 80, i64 4, !12, i64 84, i64 4, !12, i64 88, i64 4, !12, i64 92, i64 4, !12, i64 96, i64 4, !12, i64 100, i64 4, !12, i64 104, i64 4, !12, i64 108, i64 4, !12, i64 112, i64 4, !12, i64 116, i64 4, !10, i64 120, i64 4, !12, i64 124, i64 4, !10, i64 128, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!15 = !{!16, !13, i64 112}
!16 = !{!"_ZTS11scene_model", !17, i64 0, !17, i64 132, !24, i64 264, !17, i64 288, !24, i64 424, !17, i64 448, !17, i64 580, !17, i64 712, !17, i64 844, !17, i64 976, !28, i64 1112, !11, i64 1136, !11, i64 1140, !11, i64 1144, !11, i64 1148, !11, i64 1152, !11, i64 1156, !11, i64 1160, !11, i64 1164, !11, i64 1168, !11, i64 1172, !34, i64 1176, !34, i64 1200, !39, i64 1224, !39, i64 1296, !52, i64 1368, !54, i64 1388, !54, i64 1412, !54, i64 1436, !54, i64 1460, !56, i64 1484, !53, i64 1512, !53, i64 1513, !53, i64 1514, !53, i64 1515}
!17 = !{!"_ZTSN3vcl13mesh_drawableE", !18, i64 0, !19, i64 28, !11, i64 124, !11, i64 128}
!18 = !{!"_ZTSN3vcl22mesh_drawable_gpu_dataE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!19 = !{!"_ZTSN3vcl21mesh_drawable_uniformE", !20, i64 0, !21, i64 64, !23, i64 76, !13, i64 92}
!20 = !{!"_ZTSN3vcl16affine_transformE", !21, i64 0, !22, i64 12, !13, i64 48, !21, i64 52}
!21 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !13, i64 0, !13, i64 4, !13, i64 8}
!22 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!23 = !{!"_ZTSN3vcl12shading_meshE", !13, i64 0, !13, i64 4, !13, i64 8, !11, i64 12}
!24 = !{!"_ZTSSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSNSt7__cxx114listI18particle_structureSaIS1_EEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EEE", !30, i64 0}
!30 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EE10_List_implE", !31, i64 0}
!31 = !{!"_ZTSNSt8__detail17_List_node_headerE", !32, i64 0, !33, i64 16}
!32 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSN3vcl6bufferI5vec3tEE", !35, i64 0}
!35 = !{!"_ZTSSt6vectorI5vec3tSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseI5vec3tSaIS0_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"_ZTSN3vcl23hierarchy_mesh_drawableE", !40, i64 0, !48, i64 48}
!40 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE", !41, i64 0}
!41 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !42, i64 0}
!42 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !43, i64 0, !45, i64 8}
!43 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !44, i64 0}
!44 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!45 = !{!"_ZTSSt15_Rb_tree_header", !46, i64 0, !33, i64 32}
!46 = !{!"_ZTSSt18_Rb_tree_node_base", !47, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!47 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!48 = !{!"_ZTSSt6vectorIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!52 = !{!"_ZTS19gui_scene_structure", !53, i64 0, !53, i64 1, !53, i64 2, !13, i64 4, !13, i64 8, !11, i64 12, !13, i64 16}
!53 = !{!"bool", !7, i64 0}
!54 = !{!"_ZTSN3vcl14timer_intervalE", !55, i64 0, !13, i64 16, !13, i64 20}
!55 = !{!"_ZTSN3vcl11timer_basicE", !13, i64 0, !13, i64 4, !53, i64 8, !13, i64 12}
!56 = !{!"_ZTSN3vcl11timer_eventE", !55, i64 0, !53, i64 16, !13, i64 20, !13, i64 24}


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

%"struct.vcl::mesh_drawable" = type { %"struct.vcl::mesh_drawable_gpu_data", %"struct.vcl::mesh_drawable_uniform", i32, i32 }
%"struct.vcl::mesh_drawable_gpu_data" = type { i32, i32, i32, i32, i32, i32, i32 }
%"struct.vcl::mesh_drawable_uniform" = type { %"struct.vcl::affine_transform", %"struct.vcl::buffer_stack", %"struct.vcl::shading_mesh", float }
%"struct.vcl::affine_transform" = type { %"struct.vcl::buffer_stack", %"struct.vcl::mat", float, %"struct.vcl::buffer_stack" }
%"struct.vcl::mat" = type { float, float, float, float, float, float, float, float, float }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::shading_mesh" = type { float, float, float, i32 }
%"struct.vcl::mesh" = type { %"struct.vcl::buffer.24", %"struct.vcl::buffer.24", %"struct.vcl::buffer.25", %"struct.vcl::buffer.31", %"struct.vcl::buffer.37" }
%"struct.vcl::buffer.24" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.25" = type { %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 4>, std::allocator<vcl::buffer_stack<float, 4>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.31" = type { %"class.std::vector.32" }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 2>, std::allocator<vcl::buffer_stack<float, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer.37" = type { %"class.std::vector.38" }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<unsigned int, 3>, std::allocator<std::array<unsigned int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11scene_model14update_terrainEv(ptr noundef nonnull align 8 dereferenceable(1516) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.vcl::mesh_drawable", align 4
  %3 = alloca %"struct.vcl::mesh", align 8
  %4 = alloca %"struct.vcl::buffer_stack", align 4
  tail call void @_ZN3vcl13mesh_drawable5clearEv(ptr noundef nonnull align 4 dereferenceable(132) %0)
  call void @llvm.lifetime.start.p0(i64 132, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %3) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 1368
  call void @_Z14create_terrainRK19gui_scene_structure(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mesh") align 8 %3, ptr noundef nonnull align 4 dereferenceable(20) %5)
  invoke void @_ZN3vcl13mesh_drawableC1ERKNS_4meshEjj(ptr noundef nonnull align 4 dereferenceable(132) %2, ptr noundef nonnull align 8 dereferenceable(120) %3, i32 noundef 0, i32 noundef 0)
          to label %6 unwind label %9

6:                                                ; preds = %1
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(132) %0, ptr noundef nonnull align 4 dereferenceable(132) %2, i64 132, i1 false), !tbaa.struct !5
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 132, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %7 = getelementptr inbounds i8, ptr %0, i64 92
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 112
  store float 0.000000e+00, ptr %8, align 8, !tbaa !13
  ret void

9:                                                ; preds = %1
  %10 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 132, ptr nonnull %2) #6
  resume { ptr, i32 } %10
}

; 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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3vcl13mesh_drawableC1ERKNS_4meshEjj(ptr noundef nonnull align 4 dereferenceable(132), ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3vcl4meshD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #2

declare void @_ZN3vcl13mesh_drawable5clearEv(ptr noundef nonnull align 4 dereferenceable(132)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14create_terrainRK19gui_scene_structure(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mesh") align 8, ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #5

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 = { "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 nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 4, !6, i64 20, i64 4, !6, i64 24, i64 4, !6, i64 28, i64 4, !10, i64 32, i64 4, !10, i64 36, i64 4, !10, i64 40, i64 4, !10, i64 44, i64 4, !10, i64 48, i64 4, !10, i64 52, i64 4, !10, i64 56, i64 4, !10, i64 60, i64 4, !10, i64 64, i64 4, !10, i64 68, i64 4, !10, i64 72, i64 4, !10, i64 76, i64 4, !10, i64 80, i64 4, !10, i64 84, i64 4, !10, i64 88, i64 4, !10, i64 92, i64 4, !10, i64 96, i64 4, !10, i64 100, i64 4, !10, i64 104, i64 4, !10, i64 108, i64 4, !10, i64 112, i64 4, !10, i64 116, i64 4, !6, i64 120, i64 4, !10, i64 124, i64 4, !6, i64 128, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10}
!13 = !{!14, !11, i64 112}
!14 = !{!"_ZTS11scene_model", !15, i64 0, !15, i64 132, !22, i64 264, !15, i64 288, !22, i64 424, !15, i64 448, !15, i64 580, !15, i64 712, !15, i64 844, !15, i64 976, !27, i64 1112, !7, i64 1136, !7, i64 1140, !7, i64 1144, !7, i64 1148, !7, i64 1152, !7, i64 1156, !7, i64 1160, !7, i64 1164, !7, i64 1168, !7, i64 1172, !33, i64 1176, !33, i64 1200, !38, i64 1224, !38, i64 1296, !51, i64 1368, !53, i64 1388, !53, i64 1412, !53, i64 1436, !53, i64 1460, !55, i64 1484, !52, i64 1512, !52, i64 1513, !52, i64 1514, !52, i64 1515}
!15 = !{!"_ZTSN3vcl13mesh_drawableE", !16, i64 0, !17, i64 28, !7, i64 124, !7, i64 128}
!16 = !{!"_ZTSN3vcl22mesh_drawable_gpu_dataE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!17 = !{!"_ZTSN3vcl21mesh_drawable_uniformE", !18, i64 0, !19, i64 64, !21, i64 76, !11, i64 92}
!18 = !{!"_ZTSN3vcl16affine_transformE", !19, i64 0, !20, i64 12, !11, i64 48, !19, i64 52}
!19 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !11, i64 0, !11, i64 4, !11, i64 8}
!20 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!21 = !{!"_ZTSN3vcl12shading_meshE", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 12}
!22 = !{!"_ZTSSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE17_Vector_impl_dataE", !26, i64 0, !26, i64 8, !26, i64 16}
!26 = !{!"any pointer", !8, i64 0}
!27 = !{!"_ZTSNSt7__cxx114listI18particle_structureSaIS1_EEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !32, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !26, i64 0, !26, i64 8}
!32 = !{!"long", !8, i64 0}
!33 = !{!"_ZTSN3vcl6bufferI5vec3tEE", !34, i64 0}
!34 = !{!"_ZTSSt6vectorI5vec3tSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseI5vec3tSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE17_Vector_impl_dataE", !26, i64 0, !26, i64 8, !26, i64 16}
!38 = !{!"_ZTSN3vcl23hierarchy_mesh_drawableE", !39, i64 0, !47, i64 48}
!39 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE", !40, i64 0}
!40 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !41, i64 0}
!41 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !42, i64 0, !44, i64 8}
!42 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !43, i64 0}
!43 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!44 = !{!"_ZTSSt15_Rb_tree_header", !45, i64 0, !32, i64 32}
!45 = !{!"_ZTSSt18_Rb_tree_node_base", !46, i64 0, !26, i64 8, !26, i64 16, !26, i64 24}
!46 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!47 = !{!"_ZTSSt6vectorIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE17_Vector_impl_dataE", !26, i64 0, !26, i64 8, !26, i64 16}
!51 = !{!"_ZTS19gui_scene_structure", !52, i64 0, !52, i64 1, !52, i64 2, !11, i64 4, !11, i64 8, !7, i64 12, !11, i64 16}
!52 = !{!"bool", !8, i64 0}
!53 = !{!"_ZTSN3vcl14timer_intervalE", !54, i64 0, !11, i64 16, !11, i64 20}
!54 = !{!"_ZTSN3vcl11timer_basicE", !11, i64 0, !11, i64 4, !52, i64 8, !11, i64 12}
!55 = !{!"_ZTSN3vcl11timer_eventE", !54, i64 0, !52, i64 16, !11, i64 20, !11, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass