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

; 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.P3D::Graphics::Token" = type { %"struct.P3D::Graphics::TokenType", %"class.std::__cxx11::basic_string" }
%"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 }
%"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::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.P3D::Graphics::ShaderLocal" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i32 }
%"struct.std::__detail::_Node_const_iterator.19" = type { %"struct.std::__detail::_Node_iterator_base.20" }
%"struct.std::__detail::_Node_iterator_base.20" = type { ptr }

; 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

declare noundef zeroext i1 @_ZNK3P3D8Graphics10TokenStack9availableEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

declare void @_ZNK3P3D8Graphics10TokenStack4peekEm(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Token") align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1

declare void @_ZN3P3D8Graphics10TokenStack7discardEv(ptr noundef nonnull align 8 dereferenceable(40)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK3P3D8Graphics9TokenTypecvNS1_4TypeEEv(ptr noundef nonnull align 8 dereferenceable(42)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics18parseStructContentERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12ShaderStructESt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_SA_EEERKS3_IS9_fSC_SE_SaISF_ISG_fEEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.14") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3) #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.P3D::Graphics::Token", align 8
  %14 = alloca %"struct.P3D::Graphics::ShaderLocal", align 8
  %15 = alloca %"struct.std::__detail::_Node_const_iterator.19", align 8
  %16 = alloca %"struct.std::__detail::_Node_const_iterator.19", align 8
  %17 = alloca %"struct.P3D::Graphics::ShaderLocal", align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store i1 false, ptr %9, align 1
  call void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %19

19:                                               ; preds = %95, %93, %4
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = invoke noundef zeroext i1 @_ZNK3P3D8Graphics10TokenStack9availableEm(ptr noundef nonnull align 8 dereferenceable(40) %20, i64 noundef 0)
          to label %22 unwind label %31

22:                                               ; preds = %19
  br i1 %21, label %23, label %98

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3P3D8Graphics10TokenStack4peekEm(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Token") align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %24, i64 noundef 0)
          to label %25 unwind label %35

25:                                               ; preds = %23
  store ptr %13, ptr %12, align 8, !tbaa !5
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.P3D::Graphics::Token", ptr %26, i32 0, i32 0
  %28 = invoke noundef signext i8 @_ZNK3P3D8Graphics9TokenTypecvNS1_4TypeEEv(ptr noundef nonnull align 8 dereferenceable(42) %27)
          to label %29 unwind label %39

29:                                               ; preds = %25
  %30 = sext i8 %28 to i32
  switch i32 %30, label %89 [
    i32 25, label %43
    i32 1, label %57
  ]

31:                                               ; preds = %19
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %10, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %11, align 4
  br label %102

35:                                               ; preds = %23
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %10, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %11, align 4
  br label %97

39:                                               ; preds = %89, %25
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %10, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %11, align 4
  br label %96

43:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 72, ptr %14) #5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8 %14, ptr noundef nonnull align 8 dereferenceable(40) %44, ptr noundef nonnull align 8 dereferenceable(56) %45)
          to label %46 unwind label %48

46:                                               ; preds = %43
  invoke void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %14)
          to label %47 unwind label %52

47:                                               ; preds = %46
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %14) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #5
  br label %92

48:                                               ; preds = %43
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  br label %56

52:                                               ; preds = %46
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %10, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %11, align 4
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %14) #5
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 72, ptr %14) #5
  br label %96

57:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.P3D::Graphics::Token", ptr %59, i32 0, i32 1
  %61 = invoke ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE4findERSE_(ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 8 dereferenceable(32) %60)
          to label %62 unwind label %75

62:                                               ; preds = %57
  %63 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.19", ptr %15, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %63, i32 0, i32 0
  store ptr %61, ptr %64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #5
  %67 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator.19", ptr %16, i32 0, i32 0
  %68 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %67, i32 0, i32 0
  store ptr %66, ptr %68, align 8
  %69 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructEELb1EEESF_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br i1 %69, label %70, label %88

70:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8 %17, ptr noundef nonnull align 8 dereferenceable(40) %71, ptr noundef nonnull align 8 dereferenceable(56) %72)
          to label %73 unwind label %79

73:                                               ; preds = %70
  invoke void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %17)
          to label %74 unwind label %83

74:                                               ; preds = %73
  store i32 2, ptr %18, align 4
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %17) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #5
  br label %93

75:                                               ; preds = %57
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %96

79:                                               ; preds = %70
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %87

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %17) #5
  br label %87

87:                                               ; preds = %83, %79
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #5
  br label %96

88:                                               ; preds = %62
  br label %89

89:                                               ; preds = %88, %29
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3P3D8Graphics10TokenStack7discardEv(ptr noundef nonnull align 8 dereferenceable(40) %90)
          to label %91 unwind label %39

91:                                               ; preds = %89
  br label %92

92:                                               ; preds = %91, %47
  store i32 0, ptr %18, align 4
  br label %93

93:                                               ; preds = %92, %74
  call void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %94 = load i32, ptr %18, align 4
  switch i32 %94, label %108 [
    i32 0, label %95
    i32 2, label %19
  ]

95:                                               ; preds = %93
  br label %19, !llvm.loop !9

96:                                               ; preds = %87, %75, %56, %39
  call void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  br label %97

97:                                               ; preds = %96, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %102

98:                                               ; preds = %22
  store i1 true, ptr %9, align 1
  store i32 1, ptr %18, align 4
  %99 = load i1, ptr %9, align 1
  br i1 %99, label %101, label %100

100:                                              ; preds = %98
  call void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %101

101:                                              ; preds = %100, %98
  ret void

102:                                              ; preds = %97, %31
  call void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %10, align 8
  %105 = load i32, ptr %11, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107

108:                                              ; preds = %93
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(56)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { 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 = distinct !{!9, !10}
!10 = !{!"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.P3D::Graphics::Token" = type { %"struct.P3D::Graphics::TokenType", %"class.std::__cxx11::basic_string" }
%"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 }
%"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::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::ShaderLocal, std::allocator<P3D::Graphics::ShaderLocal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.P3D::Graphics::ShaderLocal" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i32 }
%"struct.std::__detail::_Node_const_iterator.19" = type { %"struct.std::__detail::_Node_iterator_base.20" }
%"struct.std::__detail::_Node_iterator_base.20" = type { ptr }

; 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

declare noundef zeroext i1 @_ZNK3P3D8Graphics10TokenStack9availableEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

declare void @_ZNK3P3D8Graphics10TokenStack4peekEm(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Token") align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1

declare void @_ZN3P3D8Graphics10TokenStack7discardEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK3P3D8Graphics9TokenTypecvNS1_4TypeEEv(ptr noundef nonnull align 8 dereferenceable(42)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics18parseStructContentERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_12ShaderStructESt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_SA_EEERKS3_IS9_fSC_SE_SaISF_ISG_fEEE(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.14") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.P3D::Graphics::Token", align 8
  %6 = alloca %"struct.P3D::Graphics::ShaderLocal", align 8
  %7 = alloca %"struct.std::__detail::_Node_const_iterator.19", align 8
  %8 = alloca %"struct.std::__detail::_Node_const_iterator.19", align 8
  %9 = alloca %"struct.P3D::Graphics::ShaderLocal", align 8
  tail call void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %10 = getelementptr inbounds i8, ptr %5, i64 48
  br label %11

11:                                               ; preds = %47, %4
  %12 = invoke noundef zeroext i1 @_ZNK3P3D8Graphics10TokenStack9availableEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 0)
          to label %13 unwind label %17

13:                                               ; preds = %11
  br i1 %12, label %14, label %49

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  invoke void @_ZNK3P3D8Graphics10TokenStack4peekEm(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::Token") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 0)
          to label %15 unwind label %19

15:                                               ; preds = %14
  %16 = call noundef signext i8 @_ZNK3P3D8Graphics9TokenTypecvNS1_4TypeEEv(ptr noundef nonnull align 8 dereferenceable(42) %5)
  switch i8 %16, label %46 [
    i8 25, label %23
    i8 1, label %31
  ]

17:                                               ; preds = %11
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %50

19:                                               ; preds = %14
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %50

21:                                               ; preds = %46
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %48

23:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #5
  invoke void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %24 unwind label %26

24:                                               ; preds = %23
  invoke void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %6)
          to label %25 unwind label %28

25:                                               ; preds = %24
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  br label %47

26:                                               ; preds = %23
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %6) #5
  br label %30

30:                                               ; preds = %28, %26
  %.pn19 = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  br label %48

31:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %32 = invoke ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE4findERSE_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %33 unwind label %39

33:                                               ; preds = %31
  store ptr %32, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %34 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  store ptr %34, ptr %8, align 8
  %35 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics12ShaderStructEELb1EEESF_(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 nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %35, label %36, label %46

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #5
  invoke void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %37 unwind label %41

37:                                               ; preds = %36
  invoke void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %9)
          to label %38 unwind label %43

38:                                               ; preds = %37
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  br label %47

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %48

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #5
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #5
  br label %48

46:                                               ; preds = %33, %15
  invoke void @_ZN3P3D8Graphics10TokenStack7discardEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %47 unwind label %21

47:                                               ; preds = %25, %46, %38
  call void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  br label %11

48:                                               ; preds = %45, %39, %30, %21
  %.pn21 = phi { ptr, i32 } [ %22, %21 ], [ %.pn, %45 ], [ %40, %39 ], [ %.pn19, %30 ]
  call void @_ZN3P3D8Graphics5TokenD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  br label %50

49:                                               ; preds = %13
  ret void

50:                                               ; preds = %19, %48, %17
  %.pn21.pn.pn = phi { ptr, i32 } [ %18, %17 ], [ %.pn21, %48 ], [ %20, %19 ]
  call void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn21.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics10parseLocalERNS0_10TokenStackERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_fEEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ShaderLocal") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics11ShaderLocalD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics11ShaderLocalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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


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