; LLVM IR from ThePhysicsGuys/Physics3D :: graphics/legacy (shaderLexer)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.P3D::Graphics::TokenType" = type <{ i8, [7 x i8], %"class.std::__cxx11::basic_regex", i8, i8, [6 x i8] }>
%"class.std::__cxx11::basic_regex" = type { i32, %"class.std::locale", %"class.std::shared_ptr" }
%"class.std::locale" = type { 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 }

@_ZN3P3D8Graphics11ShaderLexer5typesE = external dso_local global %"class.std::vector", align 8

; 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 nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics11ShaderLexer8getMatchERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::TokenType") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.P3D::Graphics::TokenType", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #5
  %10 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef 0) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %5, ptr noundef nonnull align 8 dereferenceable(42) %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %64, %2
  %12 = load i32, ptr %6, align 4, !tbaa !9
  %13 = sext i32 %12 to i64
  %14 = call noundef i64 @_ZNKSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE) #5
  %15 = icmp ult i64 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  store i32 2, ptr %7, align 4
  br label %67

17:                                               ; preds = %11
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %19) #5
  %21 = getelementptr inbounds %"struct.P3D::Graphics::TokenType", ptr %20, i32 0, i32 4
  %22 = load i8, ptr %21, align 1, !tbaa !11, !range !21, !noundef !22
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %50

24:                                               ; preds = %17
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  %27 = icmp eq i64 %26, 1
  br i1 %27, label %28, label %49

28:                                               ; preds = %24
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %29, i64 noundef 0)
          to label %31 unwind label %45

31:                                               ; preds = %28
  %32 = load i8, ptr %30, align 1, !tbaa !23
  %33 = sext i8 %32 to i32
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %35) #5
  %37 = getelementptr inbounds %"struct.P3D::Graphics::TokenType", ptr %36, i32 0, i32 3
  %38 = load i8, ptr %37, align 8, !tbaa !24
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 %33, %39
  br i1 %40, label %41, label %49

41:                                               ; preds = %31
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %43) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %44) #5
  store i32 1, ptr %7, align 4
  br label %67

45:                                               ; preds = %50, %28
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %8, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #5
  br label %71

49:                                               ; preds = %31, %24
  br label %64

50:                                               ; preds = %17
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %53) #5
  %55 = getelementptr inbounds %"struct.P3D::Graphics::TokenType", ptr %54, i32 0, i32 2
  %56 = invoke noundef zeroext i1 @_ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef nonnull align 8 dereferenceable(32) %55, i32 noundef 0)
          to label %57 unwind label %45

57:                                               ; preds = %50
  br i1 %56, label %58, label %62

58:                                               ; preds = %57
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %60) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %61) #5
  store i32 1, ptr %7, align 4
  br label %67

62:                                               ; preds = %57
  br label %63

63:                                               ; preds = %62
  br label %64

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

67:                                               ; preds = %58, %41, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %68 = load i32, ptr %7, align 4
  switch i32 %68, label %70 [
    i32 2, label %69
  ]

69:                                               ; preds = %67
  call void @_ZN3P3D8Graphics9TokenTypeC2EOS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %5) #5
  store i32 1, ptr %7, align 4
  br label %70

70:                                               ; preds = %69, %67
  call void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #5
  ret void

71:                                               ; preds = %45
  %72 = load ptr, ptr %8, align 8
  %73 = load i32, ptr %9, align 4
  %74 = insertvalue { ptr, i32 } poison, ptr %72, 0
  %75 = insertvalue { ptr, i32 } %74, i32 %73, 1
  resume { ptr, i32 } %75
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42), ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeC2EOS1_(ptr noundef nonnull align 8 dereferenceable(42), ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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, !20, i64 41}
!12 = !{!"_ZTSN3P3D8Graphics9TokenTypeE", !13, i64 0, !14, i64 8, !7, i64 40, !20, i64 41}
!13 = !{!"_ZTSN3P3D8Graphics9TokenType4TypeE", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEE", !15, i64 0, !16, i64 8, !17, i64 16}
!15 = !{!"_ZTSNSt15regex_constants18syntax_option_typeE", !7, i64 0}
!16 = !{!"_ZTSSt6locale", !6, i64 0}
!17 = !{!"_ZTSSt10shared_ptrIKNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEEEE", !18, i64 0}
!18 = !{!"_ZTSSt12__shared_ptrIKNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !19, i64 8}
!19 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !7, i64 40}
!25 = distinct !{!25, !26}
!26 = !{!"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::TokenType, std::allocator<P3D::Graphics::TokenType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.P3D::Graphics::TokenType" = type <{ i8, [7 x i8], %"class.std::__cxx11::basic_regex", i8, i8, [6 x i8] }>
%"class.std::__cxx11::basic_regex" = type { i32, %"class.std::locale", %"class.std::shared_ptr" }
%"class.std::locale" = type { 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 }

@_ZN3P3D8Graphics11ShaderLexer5typesE = external dso_local global %"class.std::vector", align 8

; 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 nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics11ShaderLexer8getMatchERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::TokenType") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.P3D::Graphics::TokenType", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  %4 = tail call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef 0) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %3, ptr noundef nonnull align 8 dereferenceable(42) %4) #5
  %5 = call noundef i64 @_ZNKSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE) #5
  %.not17 = icmp ugt i64 %5, 1
  br i1 %.not17, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %2, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 1, %2 ]
  %6 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %indvars.iv) #5
  %7 = getelementptr inbounds i8, ptr %6, i64 41
  %8 = load i8, ptr %7, align 1, !tbaa !5, !range !18, !noundef !19
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %25

10:                                               ; preds = %.lr.ph
  %11 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %12 = icmp eq i64 %11, 1
  br i1 %12, label %13, label %32

13:                                               ; preds = %10
  %14 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0)
          to label %15 unwind label %23

15:                                               ; preds = %13
  %16 = load i8, ptr %14, align 1, !tbaa !20
  %17 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %indvars.iv) #5
  %18 = getelementptr inbounds i8, ptr %17, i64 40
  %19 = load i8, ptr %18, align 8, !tbaa !21
  %20 = icmp eq i8 %16, %19
  br i1 %20, label %21, label %32

21:                                               ; preds = %15
  %22 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %indvars.iv) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %22) #5
  br label %34

23:                                               ; preds = %25, %13
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  resume { ptr, i32 } %24

25:                                               ; preds = %.lr.ph
  %26 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %indvars.iv) #5
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = invoke noundef zeroext i1 @_ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 0)
          to label %29 unwind label %23

29:                                               ; preds = %25
  br i1 %28, label %30, label %32

30:                                               ; preds = %29
  %31 = call noundef nonnull align 8 dereferenceable(42) ptr @_ZNSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE, i64 noundef %indvars.iv) #5
  call void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %31) #5
  br label %34

32:                                               ; preds = %29, %10, %15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = call noundef i64 @_ZNKSt6vectorIN3P3D8Graphics9TokenTypeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D8Graphics11ShaderLexer5typesE) #5
  %.not = icmp ugt i64 %33, %indvars.iv.next
  br i1 %.not, label %.lr.ph, label %.critedge, !llvm.loop !22

.critedge:                                        ; preds = %32, %2
  call void @_ZN3P3D8Graphics9TokenTypeC2EOS1_(ptr noundef nonnull align 8 dereferenceable(42) %0, ptr noundef nonnull align 8 dereferenceable(42) %3) #5
  br label %34

34:                                               ; preds = %21, %30, %.critedge
  call void @_ZN3P3D8Graphics9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(42), ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics9TokenTypeC2EOS1_(ptr noundef nonnull align 8 dereferenceable(42), ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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, !17, i64 41}
!6 = !{!"_ZTSN3P3D8Graphics9TokenTypeE", !7, i64 0, !10, i64 8, !8, i64 40, !17, i64 41}
!7 = !{!"_ZTSN3P3D8Graphics9TokenType4TypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEE", !11, i64 0, !12, i64 8, !14, i64 16}
!11 = !{!"_ZTSNSt15regex_constants18syntax_option_typeE", !8, i64 0}
!12 = !{!"_ZTSSt6locale", !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSSt10shared_ptrIKNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEEEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIKNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEEELN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!8, !8, i64 0}
!21 = !{!6, !8, i64 40}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass