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

; 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::buffer_stack" = type { float, float, float }
%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::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::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::shading_mesh" = type { float, float, float, i32 }
%"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: 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: 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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_Z25evaluate_perlin_terrain_zffRK19gui_scene_structure(float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(20)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11scene_model10update_boxEv(ptr noundef nonnull align 8 dereferenceable(1516) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.vcl::buffer_stack", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %41, %1
  %9 = load i32, ptr %3, align 4, !tbaa !9
  %10 = getelementptr inbounds %struct.scene_model, ptr %7, i32 0, i32 13
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = icmp slt i32 %9, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %44

14:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %15 = getelementptr inbounds %struct.scene_model, ptr %7, i32 0, i32 2
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %17) #5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %18, i64 noundef 0)
  %20 = load float, ptr %19, align 4, !tbaa !54
  store float %20, ptr %4, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %21 = getelementptr inbounds %struct.scene_model, ptr %7, i32 0, i32 2
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %23) #5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %24, i64 noundef 1)
  %26 = load float, ptr %25, align 4, !tbaa !54
  store float %26, ptr %5, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #5
  %27 = load float, ptr %4, align 4, !tbaa !54
  %28 = load float, ptr %5, align 4, !tbaa !54
  %29 = load float, ptr %4, align 4, !tbaa !54
  %30 = fdiv float %29, 2.000000e+01
  %31 = fadd float %30, 5.000000e-01
  %32 = load float, ptr %5, align 4, !tbaa !54
  %33 = fdiv float %32, 2.000000e+01
  %34 = fadd float %33, 5.000000e-01
  %35 = getelementptr inbounds %struct.scene_model, ptr %7, i32 0, i32 27
  %36 = call noundef float @_Z25evaluate_perlin_terrain_zffRK19gui_scene_structure(float noundef %31, float noundef %34, ptr noundef nonnull align 4 dereferenceable(20) %35)
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef %27, float noundef %28, float noundef %36)
  %37 = getelementptr inbounds %struct.scene_model, ptr %7, i32 0, i32 2
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %6, i64 12, i1 false), !tbaa.struct !55
  call void @llvm.lifetime.end.p0(i64 12, 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
  br label %41

41:                                               ; preds = %14
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %3, align 4, !tbaa !9
  br label %8, !llvm.loop !56

44:                                               ; preds = %13
  ret void
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) #2

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

!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, !10, i64 1136}
!12 = !{!"_ZTS11scene_model", !13, i64 0, !13, i64 132, !21, i64 264, !13, i64 288, !21, i64 424, !13, i64 448, !13, i64 580, !13, i64 712, !13, i64 844, !13, i64 976, !25, i64 1112, !10, i64 1136, !10, i64 1140, !10, i64 1144, !10, i64 1148, !10, i64 1152, !10, i64 1156, !10, i64 1160, !10, i64 1164, !10, i64 1168, !10, i64 1172, !31, i64 1176, !31, i64 1200, !36, i64 1224, !36, i64 1296, !49, i64 1368, !51, i64 1388, !51, i64 1412, !51, i64 1436, !51, i64 1460, !53, i64 1484, !50, i64 1512, !50, i64 1513, !50, i64 1514, !50, i64 1515}
!13 = !{!"_ZTSN3vcl13mesh_drawableE", !14, i64 0, !15, i64 28, !10, i64 124, !10, i64 128}
!14 = !{!"_ZTSN3vcl22mesh_drawable_gpu_dataE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!15 = !{!"_ZTSN3vcl21mesh_drawable_uniformE", !16, i64 0, !17, i64 64, !20, i64 76, !18, i64 92}
!16 = !{!"_ZTSN3vcl16affine_transformE", !17, i64 0, !19, i64 12, !18, i64 48, !17, i64 52}
!17 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !18, i64 0, !18, i64 4, !18, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32}
!20 = !{!"_ZTSN3vcl12shading_meshE", !18, i64 0, !18, i64 4, !18, i64 8, !10, i64 12}
!21 = !{!"_ZTSSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSNSt7__cxx114listI18particle_structureSaIS1_EEE", !26, i64 0}
!26 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EE10_List_implE", !28, i64 0}
!28 = !{!"_ZTSNSt8__detail17_List_node_headerE", !29, i64 0, !30, i64 16}
!29 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSN3vcl6bufferI5vec3tEE", !32, i64 0}
!32 = !{!"_ZTSSt6vectorI5vec3tSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseI5vec3tSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSN3vcl23hierarchy_mesh_drawableE", !37, i64 0, !45, i64 48}
!37 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE", !38, i64 0}
!38 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !39, i64 0}
!39 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !40, i64 0, !42, i64 8}
!40 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !41, i64 0}
!41 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!42 = !{!"_ZTSSt15_Rb_tree_header", !43, i64 0, !30, i64 32}
!43 = !{!"_ZTSSt18_Rb_tree_node_base", !44, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!44 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!45 = !{!"_ZTSSt6vectorIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTS19gui_scene_structure", !50, i64 0, !50, i64 1, !50, i64 2, !18, i64 4, !18, i64 8, !10, i64 12, !18, i64 16}
!50 = !{!"bool", !7, i64 0}
!51 = !{!"_ZTSN3vcl14timer_intervalE", !52, i64 0, !18, i64 16, !18, i64 20}
!52 = !{!"_ZTSN3vcl11timer_basicE", !18, i64 0, !18, i64 4, !50, i64 8, !18, i64 12}
!53 = !{!"_ZTSN3vcl11timer_eventE", !52, i64 0, !50, i64 16, !18, i64 20, !18, i64 24}
!54 = !{!18, !18, i64 0}
!55 = !{i64 0, i64 4, !54, i64 4, i64 4, !54, i64 8, i64 4, !54}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}


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

%"struct.vcl::buffer_stack" = type { float, float, float }

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

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

; Function Attrs: mustprogress 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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_Z25evaluate_perlin_terrain_zffRK19gui_scene_structure(float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11scene_model10update_boxEv(ptr noundef nonnull align 8 dereferenceable(1516) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"struct.vcl::buffer_stack", align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 1136
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 264
  %7 = getelementptr inbounds i8, ptr %0, i64 1368
  br label %8

._crit_edge:                                      ; preds = %8, %1
  ret void

8:                                                ; preds = %.lr.ph, %8
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %8 ]
  %9 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  %10 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %9, i64 noundef 0)
  %11 = load float, ptr %10, align 4, !tbaa !52
  %12 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %12, i64 noundef 1)
  %14 = load float, ptr %13, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #5
  %15 = fdiv float %11, 2.000000e+01
  %16 = fadd float %15, 5.000000e-01
  %17 = fdiv float %14, 2.000000e+01
  %18 = fadd float %17, 5.000000e-01
  %19 = call noundef float @_Z25evaluate_perlin_terrain_zffRK19gui_scene_structure(float noundef %16, float noundef %18, ptr noundef nonnull align 4 dereferenceable(20) %7)
  call void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %11, float noundef %14, float noundef %19)
  %20 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %2, i64 12, i1 false), !tbaa.struct !53
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %3, align 8, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next, %22
  br i1 %23, label %8, label %._crit_edge, !llvm.loop !54
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vcl12buffer_stackIfLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) local_unnamed_addr #2

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

!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, !9, i64 1136}
!6 = !{!"_ZTS11scene_model", !7, i64 0, !7, i64 132, !18, i64 264, !7, i64 288, !18, i64 424, !7, i64 448, !7, i64 580, !7, i64 712, !7, i64 844, !7, i64 976, !23, i64 1112, !9, i64 1136, !9, i64 1140, !9, i64 1144, !9, i64 1148, !9, i64 1152, !9, i64 1156, !9, i64 1160, !9, i64 1164, !9, i64 1168, !9, i64 1172, !29, i64 1176, !29, i64 1200, !34, i64 1224, !34, i64 1296, !47, i64 1368, !49, i64 1388, !49, i64 1412, !49, i64 1436, !49, i64 1460, !51, i64 1484, !48, i64 1512, !48, i64 1513, !48, i64 1514, !48, i64 1515}
!7 = !{!"_ZTSN3vcl13mesh_drawableE", !8, i64 0, !12, i64 28, !9, i64 124, !9, i64 128}
!8 = !{!"_ZTSN3vcl22mesh_drawable_gpu_dataE", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3vcl21mesh_drawable_uniformE", !13, i64 0, !14, i64 64, !17, i64 76, !15, i64 92}
!13 = !{!"_ZTSN3vcl16affine_transformE", !14, i64 0, !16, i64 12, !15, i64 48, !14, i64 52}
!14 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !15, i64 0, !15, i64 4, !15, i64 8}
!15 = !{!"float", !10, i64 0}
!16 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32}
!17 = !{!"_ZTSN3vcl12shading_meshE", !15, i64 0, !15, i64 4, !15, i64 8, !9, i64 12}
!18 = !{!"_ZTSSt6vectorIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3vcl12buffer_stackIfLm3EEESaIS2_EE17_Vector_impl_dataE", !22, i64 0, !22, i64 8, !22, i64 16}
!22 = !{!"any pointer", !10, i64 0}
!23 = !{!"_ZTSNSt7__cxx114listI18particle_structureSaIS1_EEE", !24, i64 0}
!24 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EEE", !25, i64 0}
!25 = !{!"_ZTSNSt7__cxx1110_List_baseI18particle_structureSaIS1_EE10_List_implE", !26, i64 0}
!26 = !{!"_ZTSNSt8__detail17_List_node_headerE", !27, i64 0, !28, i64 16}
!27 = !{!"_ZTSNSt8__detail15_List_node_baseE", !22, i64 0, !22, i64 8}
!28 = !{!"long", !10, i64 0}
!29 = !{!"_ZTSN3vcl6bufferI5vec3tEE", !30, i64 0}
!30 = !{!"_ZTSSt6vectorI5vec3tSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseI5vec3tSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI5vec3tSaIS0_EE17_Vector_impl_dataE", !22, i64 0, !22, i64 8, !22, i64 16}
!34 = !{!"_ZTSN3vcl23hierarchy_mesh_drawableE", !35, i64 0, !43, i64 48}
!35 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE", !36, i64 0}
!36 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !37, i64 0}
!37 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !38, i64 0, !40, i64 8}
!38 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !39, i64 0}
!39 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!40 = !{!"_ZTSSt15_Rb_tree_header", !41, i64 0, !28, i64 32}
!41 = !{!"_ZTSSt18_Rb_tree_node_base", !42, i64 0, !22, i64 8, !22, i64 16, !22, i64 24}
!42 = !{!"_ZTSSt14_Rb_tree_color", !10, i64 0}
!43 = !{!"_ZTSSt6vectorIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN3vcl28hierarchy_mesh_drawable_nodeESaIS1_EE17_Vector_impl_dataE", !22, i64 0, !22, i64 8, !22, i64 16}
!47 = !{!"_ZTS19gui_scene_structure", !48, i64 0, !48, i64 1, !48, i64 2, !15, i64 4, !15, i64 8, !9, i64 12, !15, i64 16}
!48 = !{!"bool", !10, i64 0}
!49 = !{!"_ZTSN3vcl14timer_intervalE", !50, i64 0, !15, i64 16, !15, i64 20}
!50 = !{!"_ZTSN3vcl11timer_basicE", !15, i64 0, !15, i64 4, !48, i64 8, !15, i64 12}
!51 = !{!"_ZTSN3vcl11timer_eventE", !50, i64 0, !48, i64 16, !15, i64 20, !15, i64 24}
!52 = !{!15, !15, i64 0}
!53 = !{i64 0, i64 4, !52, i64 4, i64 4, !52, i64 8, i64 4, !52}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}


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