; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core (Geometry)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Glip::CoreGL::HdlVBO *>, std::_Select1st<std::pair<const int, Glip::CoreGL::HdlVBO *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Glip::CoreGL::HdlVBO *>, std::_Select1st<std::pair<const int, Glip::CoreGL::HdlVBO *>>, std::less<int>>::_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::map.19" = type { %"class.std::_Rb_tree.20" }
%"class.std::_Rb_tree.20" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Glip::CorePipeline::GeometryModel *>, std::_Select1st<std::pair<const int, Glip::CorePipeline::GeometryModel *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Glip::CorePipeline::GeometryModel *>, std::_Select1st<std::pair<const int, Glip::CorePipeline::GeometryModel *>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
%"class.std::_Rb_tree.25" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.Glip::CorePipeline::GeometryInstance" = type { i32 }
%"struct.std::pair" = type { i32, ptr }

@_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE = external dso_local global i32, align 4
@_ZN4Glip12CorePipeline16GeometryInstance4vbosE = external dso_local global %"class.std::map", align 8
@_ZN4Glip12CorePipeline16GeometryInstance6modelsE = external dso_local global %"class.std::map.19", align 8
@_ZN4Glip12CorePipeline16GeometryInstance8countersE = external dso_local global %"class.std::map.24", align 8

declare i32 @__gxx_personality_v0(...)

; 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4Glip12CorePipeline13GeometryModeleqERKS1_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK4Glip12CorePipeline13GeometryModel6getVBOEj(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #2 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip12CorePipeline16GeometryInstanceC2ERKNS0_13GeometryModelEj(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8
  %14 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  store i32 -1, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %15 = call ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE) #5
  %16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %7, i32 0, i32 0
  store ptr %15, ptr %16, align 8
  br label %17

17:                                               ; preds = %43, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %18 = call ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE) #5
  %19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  %20 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store i32 2, ptr %9, align 4
  br label %46

22:                                               ; preds = %17
  %23 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %24 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %42

27:                                               ; preds = %22
  %28 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %29 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef zeroext i1 @_ZNK4Glip12CorePipeline13GeometryModeleqERKS1_(ptr noundef nonnull align 8 dereferenceable(128) %30, ptr noundef nonnull align 8 dereferenceable(128) %31)
  br i1 %32, label %33, label %42

33:                                               ; preds = %27
  %34 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %35 = getelementptr inbounds %"struct.std::pair", ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  store i32 %36, ptr %37, align 4, !tbaa !11
  %38 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance8countersE, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %39, align 4, !tbaa !9
  store i32 2, ptr %9, align 4
  br label %46

42:                                               ; preds = %27, %22
  br label %43

43:                                               ; preds = %42
  %44 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #5
  %45 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %10, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  br label %17, !llvm.loop !16

46:                                               ; preds = %33, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %47

47:                                               ; preds = %46
  %48 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %51, label %72

51:                                               ; preds = %47
  %52 = load i32, ptr @_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE, align 4, !tbaa !9
  %53 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  store i32 %52, ptr %53, align 4, !tbaa !11
  %54 = load i32, ptr @_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr @_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE, align 4, !tbaa !9
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = call noundef ptr @_ZNK4Glip12CorePipeline13GeometryModel6getVBOEj(ptr noundef nonnull align 8 dereferenceable(128) %56, i32 noundef %57)
  %59 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiPN4Glip6CoreGL6HdlVBOESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance4vbosE, ptr noundef nonnull align 4 dereferenceable(4) %59)
  store ptr %58, ptr %60, align 8, !tbaa !5
  %61 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #6
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4Glip12CorePipeline13GeometryModelC1ERKS1_(ptr noundef nonnull align 8 dereferenceable(128) %61, ptr noundef nonnull align 8 dereferenceable(128) %62)
          to label %63 unwind label %68

63:                                               ; preds = %51
  %64 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE, ptr noundef nonnull align 4 dereferenceable(4) %64)
  store ptr %61, ptr %65, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.Glip::CorePipeline::GeometryInstance", ptr %13, i32 0, i32 0
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance8countersE, ptr noundef nonnull align 4 dereferenceable(4) %66)
  store i32 1, ptr %67, align 4, !tbaa !9
  br label %72

68:                                               ; preds = %51
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %61, i64 noundef 128) #7
  br label %73

72:                                               ; preds = %63, %47
  ret void

73:                                               ; preds = %68
  %74 = load ptr, ptr %11, align 8
  %75 = load i32, ptr %12, align 4
  %76 = insertvalue { ptr, i32 } poison, ptr %74, 0
  %77 = insertvalue { ptr, i32 } %76, i32 %75, 1
  resume { ptr, i32 } %77
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

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

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

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

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

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

declare void @_ZN4Glip12CorePipeline13GeometryModelC1ERKS1_(ptr, ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 0}
!12 = !{!"_ZTSN4Glip12CorePipeline16GeometryInstanceE", !10, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSSt4pairIKiPN4Glip12CorePipeline13GeometryModelEE", !10, i64 0, !6, i64 8}
!15 = !{!14, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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"

%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Glip::CoreGL::HdlVBO *>, std::_Select1st<std::pair<const int, Glip::CoreGL::HdlVBO *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Glip::CoreGL::HdlVBO *>, std::_Select1st<std::pair<const int, Glip::CoreGL::HdlVBO *>>, std::less<int>>::_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::map.19" = type { %"class.std::_Rb_tree.20" }
%"class.std::_Rb_tree.20" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Glip::CorePipeline::GeometryModel *>, std::_Select1st<std::pair<const int, Glip::CorePipeline::GeometryModel *>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Glip::CorePipeline::GeometryModel *>, std::_Select1st<std::pair<const int, Glip::CorePipeline::GeometryModel *>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
%"class.std::_Rb_tree.25" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE = external dso_local local_unnamed_addr global i32, align 4
@_ZN4Glip12CorePipeline16GeometryInstance4vbosE = external dso_local global %"class.std::map", align 8
@_ZN4Glip12CorePipeline16GeometryInstance6modelsE = external dso_local global %"class.std::map.19", align 8
@_ZN4Glip12CorePipeline16GeometryInstance8countersE = external dso_local global %"class.std::map.24", align 8

declare i32 @__gxx_personality_v0(...)

; 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4Glip12CorePipeline13GeometryModeleqERKS1_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK4Glip12CorePipeline13GeometryModel6getVBOEj(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Glip12CorePipeline16GeometryInstanceC2ERKNS0_13GeometryModelEj(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i32 -1, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %6 = tail call ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE) #5
  store ptr %6, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %7 = tail call ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE) #5
  store ptr %7, ptr %5, align 8
  %8 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %8, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %3, %23
  %9 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !10
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %23, label %12

12:                                               ; preds = %.lr.ph
  %13 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !10
  %16 = call noundef zeroext i1 @_ZNK4Glip12CorePipeline13GeometryModeleqERKS1_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(128) %1)
  br i1 %16, label %17, label %23

17:                                               ; preds = %12
  %18 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %19 = load i32, ptr %18, align 8, !tbaa !13
  store i32 %19, ptr %0, align 4, !tbaa !5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance8countersE, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %21 = load i32, ptr %20, align 4, !tbaa !14
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !14
  br label %.loopexit

23:                                               ; preds = %.lr.ph, %12
  %24 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %25 = call ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE) #5
  store ptr %25, ptr %5, align 8
  %26 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiPN4Glip12CorePipeline13GeometryModelEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %26, label %.lr.ph, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %23, %3, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %27 = load i32, ptr %0, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 0
  br i1 %28, label %29, label %40

29:                                               ; preds = %.loopexit
  %30 = load i32, ptr @_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE, align 4, !tbaa !14
  store i32 %30, ptr %0, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr @_ZN4Glip12CorePipeline16GeometryInstance9nextIndexE, align 4, !tbaa !14
  %32 = call noundef ptr @_ZNK4Glip12CorePipeline13GeometryModel6getVBOEj(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef %2)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiPN4Glip6CoreGL6HdlVBOESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance4vbosE, ptr noundef nonnull align 4 dereferenceable(4) %0)
  store ptr %32, ptr %33, align 8, !tbaa !17
  %34 = call noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #6
  invoke void @_ZN4Glip12CorePipeline13GeometryModelC1ERKS1_(ptr noundef nonnull align 8 dereferenceable(128) %34, ptr noundef nonnull align 8 dereferenceable(128) %1)
          to label %35 unwind label %38

35:                                               ; preds = %29
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance6modelsE, ptr noundef nonnull align 4 dereferenceable(4) %0)
  store ptr %34, ptr %36, align 8, !tbaa !17
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN4Glip12CorePipeline16GeometryInstance8countersE, ptr noundef nonnull align 4 dereferenceable(4) %0)
  store i32 1, ptr %37, align 4, !tbaa !14
  br label %40

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %34, i64 noundef 128) #7
  resume { ptr, i32 } %39

40:                                               ; preds = %35, %.loopexit
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiPN4Glip12CorePipeline13GeometryModelESt4lessIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

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

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

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

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

declare void @_ZN4Glip12CorePipeline13GeometryModelC1ERKS1_(ptr, ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }

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

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


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