; LLVM IR from Lut1n/ImpGears :: src/OGLPlugin/VertexArray.ll (ZN3imp11VertexArray4drawEv)

; 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::__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] }
%"class.std::allocator.0" = type { i8 }
%"class.imp::VertexArray" = type <{ %"class.imp::Object", i32, [4 x i8], %"class.std::vector", i32, i8, [3 x i8], i32, i8, [3 x i8], i32, [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__glewDrawElementsInstanced = external global ptr, align 8
@__glewDrawArraysInstanced = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp11VertexArray3useEv(ptr noundef nonnull align 8 dereferenceable(76)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11VertexArray4drawEv(ptr noundef nonnull align 8 dereferenceable(76) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @_ZN3imp11VertexArray3useEv(ptr noundef nonnull align 8 dereferenceable(76) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 4, ptr %3, align 4, !tbaa !9
  %9 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 7
  %10 = load i32, ptr %9, align 8, !tbaa !11
  %11 = icmp eq i32 %10, 2
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %25

13:                                               ; preds = %1
  %14 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 7
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %18

17:                                               ; preds = %13
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %24

18:                                               ; preds = %13
  %19 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 7
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  store i32 4, ptr %3, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %22, %18
  br label %24

24:                                               ; preds = %23, %17
  br label %25

25:                                               ; preds = %24, %12
  %26 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 5
  %27 = load i8, ptr %26, align 4, !tbaa !23, !range !24, !noundef !25
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %40

29:                                               ; preds = %25
  %30 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 8
  %31 = load i8, ptr %30, align 4, !tbaa !26, !range !24, !noundef !25
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %40

33:                                               ; preds = %29
  %34 = load ptr, ptr @__glewDrawElementsInstanced, align 8, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !27
  %38 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 10
  %39 = load i32, ptr %38, align 8, !tbaa !28
  call void %34(i32 noundef %35, i32 noundef %37, i32 noundef 5125, ptr noundef null, i32 noundef %39)
  br label %65

40:                                               ; preds = %29, %25
  %41 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 5
  %42 = load i8, ptr %41, align 4, !tbaa !23, !range !24, !noundef !25
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %48

44:                                               ; preds = %40
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 4
  %47 = load i32, ptr %46, align 8, !tbaa !27
  call void @glDrawElements(i32 noundef %45, i32 noundef %47, i32 noundef 5125, ptr noundef null)
  br label %64

48:                                               ; preds = %40
  %49 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 8
  %50 = load i8, ptr %49, align 4, !tbaa !26, !range !24, !noundef !25
  %51 = trunc i8 %50 to i1
  br i1 %51, label %52, label %59

52:                                               ; preds = %48
  %53 = load ptr, ptr @__glewDrawArraysInstanced, align 8, !tbaa !5
  %54 = load i32, ptr %3, align 4, !tbaa !9
  %55 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 4
  %56 = load i32, ptr %55, align 8, !tbaa !27
  %57 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 10
  %58 = load i32, ptr %57, align 8, !tbaa !28
  call void %53(i32 noundef %54, i32 noundef 0, i32 noundef %56, i32 noundef %58)
  br label %63

59:                                               ; preds = %48
  %60 = load i32, ptr %3, align 4, !tbaa !9
  %61 = getelementptr inbounds %"class.imp::VertexArray", ptr %8, i32 0, i32 4
  %62 = load i32, ptr %61, align 8, !tbaa !27
  call void @glDrawArrays(i32 noundef %60, i32 noundef 0, i32 noundef %62)
  br label %63

63:                                               ; preds = %59, %52
  br label %64

64:                                               ; preds = %63, %44
  br label %65

65:                                               ; preds = %64, %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %66 unwind label %69

66:                                               ; preds = %65
  %67 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.1, i32 noundef 169)
          to label %68 unwind label %73

68:                                               ; preds = %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

69:                                               ; preds = %65
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  br label %77

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %77

77:                                               ; preds = %73, %69
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %6, align 8
  %80 = load i32, ptr %7, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

declare void @glDrawArrays(i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { "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, !22, i64 64}
!12 = !{!"_ZTSN3imp11VertexArrayE", !13, i64 0, !10, i64 24, !17, i64 32, !10, i64 56, !21, i64 60, !22, i64 64, !21, i64 68, !10, i64 72}
!13 = !{!"_ZTSN3imp6ObjectE", !14, i64 8}
!14 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!17 = !{!"_ZTSSt6vectorIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !7, i64 0}
!23 = !{!12, !21, i64 60}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !21, i64 68}
!27 = !{!12, !10, i64 56}
!28 = !{!12, !10, i64 72}


; 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::__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] }
%"class.std::allocator.0" = type { i8 }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__glewDrawElementsInstanced = external local_unnamed_addr global ptr, align 8
@__glewDrawArraysInstanced = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1
@switch.table._ZN3imp11VertexArray4drawEv = private unnamed_addr constant [3 x i32] [i32 4, i32 1, i32 0], align 4

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp11VertexArray3useEv(ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11VertexArray4drawEv(ptr noundef nonnull align 8 dereferenceable(76) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  tail call void @_ZN3imp11VertexArray3useEv(ptr noundef nonnull align 8 dereferenceable(76) %0)
  %4 = getelementptr inbounds i8, ptr %0, i64 64
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp ult i32 %5, 3
  br i1 %6, label %switch.lookup, label %.fold.split

switch.lookup:                                    ; preds = %1
  %7 = zext nneg i32 %5 to i64
  %switch.gep = getelementptr inbounds [3 x i32], ptr @switch.table._ZN3imp11VertexArray4drawEv, i64 0, i64 %7
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %.fold.split

.fold.split:                                      ; preds = %1, %switch.lookup
  %.07 = phi i32 [ %switch.load, %switch.lookup ], [ 4, %1 ]
  %8 = getelementptr inbounds i8, ptr %0, i64 60
  %9 = load i8, ptr %8, align 4, !tbaa !21, !range !22, !noundef !23
  %10 = trunc nuw i8 %9 to i1
  %11 = getelementptr inbounds i8, ptr %0, i64 68
  %12 = load i8, ptr %11, align 4, !tbaa !24, !range !22, !noundef !23
  %13 = trunc nuw i8 %12 to i1
  br i1 %10, label %14, label %24

14:                                               ; preds = %.fold.split
  br i1 %13, label %15, label %21

15:                                               ; preds = %14
  %16 = load ptr, ptr @__glewDrawElementsInstanced, align 8, !tbaa !25
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load i32, ptr %17, align 8, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = load i32, ptr %19, align 8, !tbaa !27
  tail call void %16(i32 noundef %.07, i32 noundef %18, i32 noundef 5125, ptr noundef null, i32 noundef %20)
  br label %34

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = load i32, ptr %22, align 8, !tbaa !26
  tail call void @glDrawElements(i32 noundef %.07, i32 noundef %23, i32 noundef 5125, ptr noundef null)
  br label %34

24:                                               ; preds = %.fold.split
  br i1 %13, label %25, label %31

25:                                               ; preds = %24
  %26 = load ptr, ptr @__glewDrawArraysInstanced, align 8, !tbaa !25
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = load i32, ptr %27, align 8, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %0, i64 72
  %30 = load i32, ptr %29, align 8, !tbaa !27
  tail call void %26(i32 noundef %.07, i32 noundef 0, i32 noundef %28, i32 noundef %30)
  br label %34

31:                                               ; preds = %24
  %32 = getelementptr inbounds i8, ptr %0, i64 56
  %33 = load i32, ptr %32, align 8, !tbaa !26
  tail call void @glDrawArrays(i32 noundef %.07, i32 noundef 0, i32 noundef %33)
  br label %34

34:                                               ; preds = %21, %31, %25, %15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %35 unwind label %38

35:                                               ; preds = %34
  %36 = invoke noundef zeroext i1 @_Z12GLcheckErrorRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKci(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.1, i32 noundef 169)
          to label %37 unwind label %40

37:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  ret void

38:                                               ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %35
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @glDrawArrays(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { "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, !20, i64 64}
!6 = !{!"_ZTSN3imp11VertexArrayE", !7, i64 0, !14, i64 24, !15, i64 32, !14, i64 56, !19, i64 60, !20, i64 64, !19, i64 68, !14, i64 72}
!7 = !{!"_ZTSN3imp6ObjectE", !8, i64 8}
!8 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !9, i64 0}
!9 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"int", !11, i64 0}
!15 = !{!"_ZTSSt6vectorIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!"bool", !11, i64 0}
!20 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !11, i64 0}
!21 = !{!6, !19, i64 60}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!6, !19, i64 68}
!25 = !{!10, !10, i64 0}
!26 = !{!6, !14, i64 56}
!27 = !{!6, !14, i64 72}


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