; LLVM IR from ThePhysicsGuys/Physics3D :: graphics/shader (parser)

; 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::Lexer::Token" = type { i8, %"struct.P3D::Graphics::Lexer::Range" }
%"struct.P3D::Graphics::Lexer::Range" = type { i64, i64 }
%"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] }
%"struct.std::__detail::_Node_iterator.37" = type { %"struct.std::__detail::_Node_iterator_base.38" }
%"struct.std::__detail::_Node_iterator_base.38" = type { ptr }
%"struct.P3D::Graphics::Parser::Local" = type { %"struct.P3D::Graphics::Lexer::Range", %"struct.P3D::Graphics::Lexer::Range", i64 }
%"struct.P3D::Graphics::Parser::Parse" = type { %"struct.P3D::Graphics::Parser::Version", %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.3", %"class.std::unordered_map", %"class.std::unordered_map.23" }
%"struct.P3D::Graphics::Parser::Version" = type <{ i64, i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Layout, std::allocator<P3D::Graphics::Parser::Layout>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Layout, std::allocator<P3D::Graphics::Parser::Layout>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Layout, std::allocator<P3D::Graphics::Parser::Layout>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Layout, std::allocator<P3D::Graphics::Parser::Layout>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Global, std::allocator<P3D::Graphics::Parser::Global>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Global, std::allocator<P3D::Graphics::Parser::Global>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Global, std::allocator<P3D::Graphics::Parser::Global>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Global, std::allocator<P3D::Graphics::Parser::Global>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::VSOut, std::allocator<P3D::Graphics::Parser::VSOut>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::VSOut, std::allocator<P3D::Graphics::Parser::VSOut>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::VSOut, std::allocator<P3D::Graphics::Parser::VSOut>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::VSOut, std::allocator<P3D::Graphics::Parser::VSOut>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Local, std::allocator<P3D::Graphics::Parser::Local>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Local, std::allocator<P3D::Graphics::Parser::Local>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::Parser::Local, std::allocator<P3D::Graphics::Parser::Local>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::Parser::Local, std::allocator<P3D::Graphics::Parser::Local>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.23" = type { %"class.std::_Hashtable.24" }
%"class.std::_Hashtable.24" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.P3D::Graphics::Lexer" = type { i64, ptr }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

; Function Attrs: nounwind
declare void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics10parseUntilERNS0_5LexerENS1_5Token4TypeE(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3P3D8Graphics10parseArrayERNS0_5LexerERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(248)) #4

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3P3D8Graphics5Lexer5Token6stringB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(248) %2) #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::__detail::_Node_iterator.37", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i1, align 1
  %12 = alloca i1, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::__detail::_Node_iterator.37", align 8
  %16 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.P3D::Graphics::Parser::Local", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  %20 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %21 = load i8, ptr %20, align 8, !tbaa !9
  %22 = sext i8 %21 to i32
  %23 = icmp ne i32 %22, 15
  br i1 %23, label %24, label %30

24:                                               ; preds = %3
  %25 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %26 = load i8, ptr %25, align 8, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp ne i32 %27, 16
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i32 1, ptr %8, align 4
  br label %96

30:                                               ; preds = %24, %3
  %31 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %32 = load i8, ptr %31, align 8, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i1 false, ptr %11, align 1
  store i1 false, ptr %12, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  br i1 %34, label %35, label %51

35:                                               ; preds = %30
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Parse", ptr %36, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  store i1 true, ptr %11, align 1
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.P3D::Graphics::Lexer", ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  call void @_ZNK3P3D8Graphics5Lexer5Token6stringB5cxx11EPKc(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %40)
  store i1 true, ptr %12, align 1
  %41 = invoke ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE4findERSF_(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %42 unwind label %60

42:                                               ; preds = %35
  %43 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.37", ptr %9, i32 0, i32 0
  %44 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.38", ptr %43, i32 0, i32 0
  store ptr %41, ptr %44, align 8
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Parse", ptr %45, i32 0, i32 7
  %47 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %46) #5
  %48 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.37", ptr %15, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.38", ptr %48, i32 0, i32 0
  store ptr %47, ptr %49, align 8
  %50 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructEELb1EEESG_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %51

51:                                               ; preds = %42, %30
  %52 = phi i1 [ false, %30 ], [ %50, %42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %53 = load i1, ptr %12, align 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %55

55:                                               ; preds = %54, %51
  %56 = load i1, ptr %11, align 1
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  br label %58

58:                                               ; preds = %57, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br i1 %52, label %59, label %70

59:                                               ; preds = %58
  store i32 1, ptr %8, align 4
  br label %96

60:                                               ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %13, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %14, align 4
  %64 = load i1, ptr %12, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %60
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %66

66:                                               ; preds = %65, %60
  %67 = load i1, ptr %11, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  br label %69

69:                                               ; preds = %68, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %99

70:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %71) #5
  %72 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %16, i32 0, i32 0
  %73 = load i8, ptr %72, align 8, !tbaa !9
  %74 = sext i8 %73 to i32
  %75 = icmp ne i32 %74, 16
  br i1 %75, label %76, label %77

76:                                               ; preds = %70
  store i32 1, ptr %8, align 4
  br label %95

77:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call noundef i64 @_ZN3P3D8Graphics10parseArrayERNS0_5LexerERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(248) %79)
  store i64 %80, ptr %17, align 8, !tbaa !16
  %81 = load i64, ptr %17, align 8, !tbaa !16
  %82 = icmp eq i64 %81, -1
  br i1 %82, label %83, label %84

83:                                               ; preds = %77
  store i32 1, ptr %8, align 4
  br label %94

84:                                               ; preds = %77
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D8Graphics10parseUntilERNS0_5LexerENS1_5Token4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %85, i8 noundef signext 2)
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Parse", ptr %86, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #5
  %88 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Local", ptr %18, i32 0, i32 0
  %89 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %88, ptr align 8 %89, i64 16, i1 false), !tbaa.struct !17
  %90 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Local", ptr %18, i32 0, i32 1
  %91 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %16, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %90, ptr align 8 %91, i64 16, i1 false), !tbaa.struct !17
  %92 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Local", ptr %18, i32 0, i32 2
  %93 = load i64, ptr %17, align 8, !tbaa !16
  store i64 %93, ptr %92, align 8, !tbaa !18
  call void @_ZNSt6vectorIN3P3D8Graphics6Parser5LocalESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 8 dereferenceable(40) %18)
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #5
  store i32 0, ptr %8, align 4
  br label %94

94:                                               ; preds = %84, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %95

95:                                               ; preds = %94, %76
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %96

96:                                               ; preds = %95, %59, %29
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  %97 = load i32, ptr %8, align 4
  switch i32 %97, label %104 [
    i32 0, label %98
    i32 1, label %98
  ]

98:                                               ; preds = %96, %96
  ret void

99:                                               ; preds = %69
  %100 = load ptr, ptr %13, align 8
  %101 = load i32, ptr %14, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103

104:                                              ; preds = %96
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE4findERSF_(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 @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) #3 align 2

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN3P3D8Graphics5Lexer5TokenE", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTSN3P3D8Graphics5Lexer5Token4TypeE", !7, i64 0}
!12 = !{!"_ZTSN3P3D8Graphics5Lexer5RangeE", !13, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTSN3P3D8Graphics5LexerE", !13, i64 0, !6, i64 8}
!16 = !{!13, !13, i64 0}
!17 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!18 = !{!19, !13, i64 32}
!19 = !{!"_ZTSN3P3D8Graphics6Parser5LocalE", !12, i64 0, !12, i64 16, !13, i64 32}


; 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::Lexer::Token" = type { i8, %"struct.P3D::Graphics::Lexer::Range" }
%"struct.P3D::Graphics::Lexer::Range" = type { i64, i64 }
%"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] }
%"struct.std::__detail::_Node_iterator.37" = type { %"struct.std::__detail::_Node_iterator_base.38" }
%"struct.std::__detail::_Node_iterator_base.38" = type { ptr }
%"struct.P3D::Graphics::Parser::Local" = type { %"struct.P3D::Graphics::Lexer::Range", %"struct.P3D::Graphics::Lexer::Range", i64 }

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

; Function Attrs: nounwind
declare void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics10parseUntilERNS0_5LexerENS1_5Token4TypeE(ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3P3D8Graphics10parseArrayERNS0_5LexerERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3P3D8Graphics5Lexer5Token6stringB5cxx11EPKc(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(248) %2) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator.37", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator.37", align 8
  %8 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %9 = alloca %"struct.P3D::Graphics::Parser::Local", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  %10 = load i8, ptr %4, align 8
  %11 = add i8 %10, -17
  %or.cond = icmp ult i8 %11, -2
  br i1 %or.cond, label %35, label %12

12:                                               ; preds = %3
  %13 = icmp eq i8 %10, 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  br i1 %13, label %14, label %.critedge.thread

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %2, i64 192
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZNK3P3D8Graphics5Lexer5Token6stringB5cxx11EPKc(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %17)
  %18 = invoke ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE4findERSF_(ptr noundef nonnull align 8 dereferenceable(56) %15, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %.critedge unwind label %21

.critedge.thread:                                 ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %23

.critedge:                                        ; preds = %14
  store ptr %18, ptr %5, align 8
  %19 = call ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  store ptr %19, ptr %7, align 8
  %20 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructEELb1EEESG_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %20, label %35, label %23

21:                                               ; preds = %14
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %22

23:                                               ; preds = %.critedge.thread, %.critedge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  %24 = load i8, ptr %8, align 8, !tbaa !11
  %.not = icmp eq i8 %24, 16
  br i1 %.not, label %25, label %34

25:                                               ; preds = %23
  %26 = call noundef i64 @_ZN3P3D8Graphics10parseArrayERNS0_5LexerERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(248) %2)
  %27 = icmp eq i64 %26, -1
  br i1 %27, label %34, label %28

28:                                               ; preds = %25
  call void @_ZN3P3D8Graphics10parseUntilERNS0_5LexerENS1_5Token4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %0, i8 noundef signext 2)
  %29 = getelementptr inbounds i8, ptr %2, i64 40
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #5
  %30 = getelementptr inbounds i8, ptr %4, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %30, i64 16, i1 false), !tbaa.struct !15
  %31 = getelementptr inbounds i8, ptr %9, i64 16
  %32 = getelementptr inbounds i8, ptr %8, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %32, i64 16, i1 false), !tbaa.struct !15
  %33 = getelementptr inbounds i8, ptr %9, i64 32
  store i64 %26, ptr %33, align 8, !tbaa !17
  call void @_ZNSt6vectorIN3P3D8Graphics6Parser5LocalESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(40) %9)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  br label %34

34:                                               ; preds = %28, %25, %23
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %35

35:                                               ; preds = %.critedge, %3, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructEELb1EEESG_(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 @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE4findERSF_(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 @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3P3D8Graphics6Parser6StructESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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, !10, i64 8}
!6 = !{!"_ZTSN3P3D8Graphics5LexerE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3P3D8Graphics5Lexer5TokenE", !13, i64 0, !14, i64 8}
!13 = !{!"_ZTSN3P3D8Graphics5Lexer5Token4TypeE", !8, i64 0}
!14 = !{!"_ZTSN3P3D8Graphics5Lexer5RangeE", !7, i64 0, !7, i64 8}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 32}
!18 = !{!"_ZTSN3P3D8Graphics6Parser5LocalE", !14, i64 0, !14, i64 16, !7, i64 32}


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