; LLVM IR from drohmer/cgp :: library/cgp/16_drawable/hierarchy_mesh_drawable (hierarchy_mesh_drawable)

; 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.cgp::affine_rts" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.13", float }
%"struct.cgp::rotation_transform" = type { %"struct.cgp::quaternion" }
%"struct.cgp::quaternion" = type { %"struct.cgp::numarray_stack" }
%"struct.cgp::numarray_stack" = type { float, float, float, float }
%"struct.cgp::numarray_stack.13" = type { float, float, float }
%"struct.cgp::hierarchy_mesh_drawable" = type { %"class.std::vector", %"class.std::map" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<cgp::hierarchy_mesh_drawable_node, std::allocator<cgp::hierarchy_mesh_drawable_node>>::_Vector_impl" }
%"struct.std::_Vector_base<cgp::hierarchy_mesh_drawable_node, std::allocator<cgp::hierarchy_mesh_drawable_node>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgp::hierarchy_mesh_drawable_node, std::allocator<cgp::hierarchy_mesh_drawable_node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgp::hierarchy_mesh_drawable_node, std::allocator<cgp::hierarchy_mesh_drawable_node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"struct.cgp::hierarchy_mesh_drawable_node" = type { %"struct.cgp::mesh_drawable", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"struct.cgp::affine_rts" }
%"struct.cgp::mesh_drawable" = type <{ %"struct.cgp::opengl_shader_structure", %"struct.cgp::opengl_texture_image_structure", %"class.std::map.3", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"class.std::vector.8", %"struct.cgp::opengl_ebo_structure", i32, %"struct.cgp::affine", %"struct.cgp::affine_rts", %"struct.cgp::matrix_stack", %"struct.cgp::material_mesh_drawable_phong", [4 x i8] }>
%"struct.cgp::opengl_shader_structure" = type { i32 }
%"struct.cgp::opengl_texture_image_structure" = type { i32, i32, i32, i32, i32 }
%"class.std::map.3" = type { %"class.std::_Rb_tree.4" }
%"class.std::_Rb_tree.4" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, 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>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.cgp::opengl_vbo_structure" = type { %"struct.cgp::opengl_gpu_buffer", i32 }
%"struct.cgp::opengl_gpu_buffer" = type { i32, i32, i32, %"struct.cgp::opengl_gpu_buffer_details" }
%"struct.cgp::opengl_gpu_buffer_details" = type { i32, i32, i32 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.cgp::opengl_ebo_structure" = type { %"struct.cgp::opengl_gpu_buffer" }
%"struct.cgp::affine" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.13", float, %"struct.cgp::numarray_stack.13" }
%"struct.cgp::matrix_stack" = type { %"struct.cgp::numarray_stack.14" }
%"struct.cgp::numarray_stack.14" = type { %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack" }
%"struct.cgp::material_mesh_drawable_phong" = type <{ %"struct.cgp::numarray_stack.13", float, %"struct.cgp::phong_parameters", %"struct.cgp::texture_settings_parameters", i8 }>
%"struct.cgp::phong_parameters" = type { float, float, float, float }
%"struct.cgp::texture_settings_parameters" = type { i8, i8, i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3cgpL22assert_valid_hierarchyERKNS_23hierarchy_mesh_drawableE(ptr noundef nonnull align 8 dereferenceable(72)) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp23hierarchy_mesh_drawable34update_local_to_global_coordinatesEv(ptr noundef nonnull align 8 dereferenceable(72) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.cgp::affine_rts", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  %13 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 0
  %14 = call noundef i64 @_ZNKSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %15 = icmp eq i64 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %1
  br label %68

17:                                               ; preds = %1
  call void @_ZN3cgpL22assert_valid_hierarchyERKNS_23hierarchy_mesh_drawableE(ptr noundef nonnull align 8 dereferenceable(72) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %18 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 0
  %19 = call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef 0) #6
  %20 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %19, i32 0, i32 2
  store ptr %20, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %21 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 0
  %22 = call noundef i64 @_ZNKSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %64, %17
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %67

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %30 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 0
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %32) #6
  store ptr %33, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %34, i32 0, i32 2
  store ptr %35, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  br i1 %38, label %39, label %45

39:                                               ; preds = %29
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %43, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %41, i64 32, i1 false)
  br label %63

45:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %46 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 1
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %46, ptr noundef nonnull align 8 dereferenceable(32) %47)
  %49 = load i32, ptr %48, align 4, !tbaa !9
  store i32 %49, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %50, i32 0, i32 3
  store ptr %51, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %52 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable", ptr %12, i32 0, i32 0
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #6
  %56 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %56, i32 0, i32 11
  store ptr %57, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3cgpmlERKNS_10affine_rtsES2_(ptr dead_on_unwind writable sret(%"struct.cgp::affine_rts") align 4 %11, ptr noundef nonnull align 4 dereferenceable(32) %58, ptr noundef nonnull align 4 dereferenceable(32) %59)
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.cgp::hierarchy_mesh_drawable_node", ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %61, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 4 %11, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %63

63:                                               ; preds = %45, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %5, align 4, !tbaa !9
  br label %24, !llvm.loop !11

67:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %68

68:                                               ; preds = %67, %16
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare void @_ZN3cgpmlERKNS_10affine_rtsES2_(ptr dead_on_unwind writable sret(%"struct.cgp::affine_rts") align 4, ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(32)) #5

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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.cgp::affine_rts" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.13", float }
%"struct.cgp::rotation_transform" = type { %"struct.cgp::quaternion" }
%"struct.cgp::quaternion" = type { %"struct.cgp::numarray_stack" }
%"struct.cgp::numarray_stack" = type { float, float, float, float }
%"struct.cgp::numarray_stack.13" = type { float, float, float }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3cgpL22assert_valid_hierarchyERKNS_23hierarchy_mesh_drawableE(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp23hierarchy_mesh_drawable34update_local_to_global_coordinatesEv(ptr noundef nonnull align 8 dereferenceable(72) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca %"struct.cgp::affine_rts", align 4
  %3 = tail call noundef i64 @_ZNKSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %4 = icmp eq i64 %3, 0
  br i1 %4, label %.loopexit, label %5

5:                                                ; preds = %1
  tail call void @_ZN3cgpL22assert_valid_hierarchyERKNS_23hierarchy_mesh_drawableE(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %6 = tail call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %7 = getelementptr inbounds i8, ptr %6, i64 448
  %8 = tail call noundef i64 @_ZNKSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %9 = trunc i64 %8 to i32
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count = and i64 %8, 2147483647
  br label %12

12:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %13 = call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  %14 = getelementptr inbounds i8, ptr %13, i64 448
  %15 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br i1 %15, label %16, label %19

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %13, i64 480
  %18 = getelementptr inbounds i8, ptr %13, i64 280
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %17, i64 32, i1 false)
  br label %27

19:                                               ; preds = %12
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(32) %14)
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %13, i64 480
  %23 = sext i32 %21 to i64
  %24 = call noundef nonnull align 8 dereferenceable(512) ptr @_ZNSt6vectorIN3cgp28hierarchy_mesh_drawable_nodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %23) #6
  %25 = getelementptr inbounds i8, ptr %24, i64 280
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @_ZN3cgpmlERKNS_10affine_rtsES2_(ptr dead_on_unwind nonnull writable sret(%"struct.cgp::affine_rts") align 4 %2, ptr noundef nonnull align 4 dereferenceable(32) %25, ptr noundef nonnull align 4 dereferenceable(32) %22)
  %26 = getelementptr inbounds i8, ptr %13, i64 280
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 4 dereferenceable(32) %2, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  br label %27

27:                                               ; preds = %19, %16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %12, !llvm.loop !9

.loopexit:                                        ; preds = %27, %5, %1
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare void @_ZN3cgpmlERKNS_10affine_rtsES2_(ptr dead_on_unwind writable sret(%"struct.cgp::affine_rts") align 4, ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #5

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


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