; 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_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = 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::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.std::basic_string_view" = type { i64, ptr }
%"struct.P3D::Graphics::Parser::Version" = type <{ i64, i8, [7 x i8] }>
%"class.P3D::Graphics::Lexer" = type { i64, ptr }
%"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" }
%"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 }

@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE(i64, ptr, i64, ptr) #0

; 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) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #0 align 2

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

; 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)) #3

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

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

; Function Attrs: nounwind
declare void @_ZN3P3D8Graphics5Lexer7advanceEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZNK3P3D8Graphics5Lexer5Token4viewEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics12parseVersionERNS0_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 i64, align 8
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %17 = alloca %"class.std::basic_string_view", align 8
  %18 = alloca %"class.std::basic_string_view", align 8
  %19 = alloca %"struct.P3D::Graphics::Parser::Version", 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) #6
  %20 = 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) %20) #6
  %21 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %22 = load i8, ptr %21, align 8, !tbaa !9
  %23 = sext i8 %22 to i32
  %24 = icmp ne i32 %23, 21
  br i1 %24, label %25, label %26

25:                                               ; preds = %3
  store i32 1, ptr %8, align 4
  br label %101

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 392, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.P3D::Graphics::Lexer", ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = call noundef ptr @_ZNK3P3D8Graphics5Lexer5Token5firstEPKc(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef %29)
  %31 = call noundef i64 @_ZNK3P3D8Graphics5Lexer5Token4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %30, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %32 unwind label %45

32:                                               ; preds = %26
  %33 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 8)
          to label %34 unwind label %49

34:                                               ; preds = %32
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef %33)
          to label %35 unwind label %49

35:                                               ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERm(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %37 unwind label %54

37:                                               ; preds = %35
  %38 = load ptr, ptr %10, align 8, !tbaa !16
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %10, i64 %40
  %42 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264) %41)
          to label %43 unwind label %54

43:                                               ; preds = %37
  br i1 %42, label %44, label %58

44:                                               ; preds = %43
  store i32 1, ptr %8, align 4
  br label %100

45:                                               ; preds = %26
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %13, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %14, align 4
  br label %53

49:                                               ; preds = %34, %32
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %53

53:                                               ; preds = %49, %45
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %105

54:                                               ; preds = %37, %35
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  br label %104

58:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 0, ptr %15, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D8Graphics5Lexer4peekEm(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %59, i64 noundef 0) #6
  %60 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %16, i32 0, i32 0
  %61 = load i8, ptr %60, align 8, !tbaa !9
  %62 = sext i8 %61 to i32
  %63 = icmp eq i32 %62, 16
  br i1 %63, label %64, label %91

64:                                               ; preds = %58
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.P3D::Graphics::Lexer", ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  %68 = invoke { i64, ptr } @_ZNK3P3D8Graphics5Lexer5Token4viewEPKc(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef %67)
          to label %69 unwind label %87

69:                                               ; preds = %64
  %70 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 0
  %71 = extractvalue { i64, ptr } %68, 0
  store i64 %71, ptr %70, align 8
  %72 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 1
  %73 = extractvalue { i64, ptr } %68, 1
  store ptr %73, ptr %72, align 8
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef @.str.16) #6
  %74 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 0
  %75 = load i64, ptr %74, align 8
  %76 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8
  %78 = getelementptr inbounds { i64, ptr }, ptr %18, i32 0, i32 0
  %79 = load i64, ptr %78, align 8
  %80 = getelementptr inbounds { i64, ptr }, ptr %18, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8
  %82 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE(i64 %75, ptr %77, i64 %79, ptr %81) #6
  br i1 %82, label %83, label %91

83:                                               ; preds = %69
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = invoke noundef i64 @_ZNK3P3D8Graphics5Lexer5Token4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %86 unwind label %87

86:                                               ; preds = %83
  call void @_ZN3P3D8Graphics5Lexer7advanceEm(ptr noundef nonnull align 8 dereferenceable(16) %84, i64 noundef %85) #6
  store i8 1, ptr %15, align 1, !tbaa !18
  br label %91

87:                                               ; preds = %83, %64
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %104

91:                                               ; preds = %86, %69, %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %92 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Version", ptr %19, i32 0, i32 0
  %93 = load i64, ptr %9, align 8, !tbaa !20
  store i64 %93, ptr %92, align 8, !tbaa !21
  %94 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Version", ptr %19, i32 0, i32 1
  %95 = load i8, ptr %15, align 1, !tbaa !18, !range !23, !noundef !24
  %96 = trunc i8 %95 to i1
  %97 = zext i1 %96 to i8
  store i8 %97, ptr %94, align 8, !tbaa !25
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.P3D::Graphics::Parser::Parse", ptr %98, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 8 %19, i64 9, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  store i32 0, ptr %8, align 4
  br label %100

100:                                              ; preds = %91, %44
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %101

101:                                              ; preds = %100, %25
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  %102 = load i32, ptr %8, align 4
  switch i32 %102, label %111 [
    i32 0, label %103
    i32 1, label %103
  ]

103:                                              ; preds = %101, %101
  ret void

104:                                              ; preds = %87, %54
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #6
  br label %105

105:                                              ; preds = %104, %53
  call void @llvm.lifetime.end.p0(i64 392, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %13, align 8
  %108 = load i32, ptr %14, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110

111:                                              ; preds = %101
  unreachable
}

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { 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 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !13, i64 0}
!22 = !{!"_ZTSN3P3D8Graphics6Parser7VersionE", !13, i64 0, !19, i64 8}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!22, !19, i64 8}
!26 = !{i64 0, i64 8, !20, i64 8, i64 1, !18}


; 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_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = 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::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE(i64, ptr, i64, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #0 align 2

; 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: nounwind
declare void @_ZN3P3D8Graphics5Lexer4peekEm(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8, ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN3P3D8Graphics5Lexer7advanceEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3P3D8Graphics5Lexer5Token5firstEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #3 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, ptr } @_ZNK3P3D8Graphics5Lexer5Token4viewEPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics12parseVersionERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(24) %1, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(248) %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %10 = alloca %"class.std::basic_string_view", 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
  %11 = load i8, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i8 %11, 21
  br i1 %.not, label %12, label %56

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = call noundef ptr @_ZNK3P3D8Graphics5Lexer5Token5firstEPKc(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %14)
  %16 = call noundef i64 @_ZNK3P3D8Graphics5Lexer5Token4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %15, i64 noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %17 unwind label %28

17:                                               ; preds = %12
  %18 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 8)
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %18)
          to label %19 unwind label %30

19:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERm(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %21 unwind label %33

21:                                               ; preds = %19
  %22 = load ptr, ptr %6, align 8, !tbaa !15
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %6, i64 %24
  %26 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264) %25)
          to label %27 unwind label %33

27:                                               ; preds = %21
  br i1 %26, label %55, label %35

28:                                               ; preds = %12
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %58

33:                                               ; preds = %21, %19
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %57

35:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @_ZN3P3D8Graphics5Lexer4peekEm(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef 0) #5
  %36 = load i8, ptr %9, align 8, !tbaa !5
  %37 = icmp eq i8 %36, 16
  br i1 %37, label %38, label %53

38:                                               ; preds = %35
  %39 = load ptr, ptr %13, align 8, !tbaa !12
  %40 = invoke { i64, ptr } @_ZNK3P3D8Graphics5Lexer5Token4viewEPKc(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %39)
          to label %41 unwind label %51

41:                                               ; preds = %38
  %42 = extractvalue { i64, ptr } %40, 0
  %43 = extractvalue { i64, ptr } %40, 1
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef @.str.16) #5
  %44 = load i64, ptr %10, align 8
  %45 = getelementptr inbounds i8, ptr %10, i64 8
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE(i64 %42, ptr %43, i64 %44, ptr %46) #5
  br i1 %47, label %48, label %53

48:                                               ; preds = %41
  %49 = invoke noundef i64 @_ZNK3P3D8Graphics5Lexer5Token4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %50 unwind label %51

50:                                               ; preds = %48
  call void @_ZN3P3D8Graphics5Lexer7advanceEm(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef %49) #5
  br label %53

51:                                               ; preds = %48, %38
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %57

53:                                               ; preds = %50, %41, %35
  %.012 = phi i8 [ 1, %50 ], [ 0, %41 ], [ 0, %35 ]
  %54 = load i64, ptr %5, align 8, !tbaa !17
  store i64 %54, ptr %2, align 8, !tbaa !17
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store i8 %.012, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %55

55:                                               ; preds = %27, %53
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #5
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %56

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

57:                                               ; preds = %51, %33
  %.pn14 = phi { ptr, i32 } [ %52, %51 ], [ %34, %33 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #5
  br label %58

58:                                               ; preds = %57, %32
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %57 ], [ %.pn, %32 ]
  call void @llvm.lifetime.end.p0(i64 392, 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 } %.pn14.pn
}

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

attributes #0 = { 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 #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 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN3P3D8Graphics5Lexer5TokenE", !7, i64 0, !10, i64 8}
!7 = !{!"_ZTSN3P3D8Graphics5Lexer5Token4TypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3P3D8Graphics5Lexer5RangeE", !11, i64 0, !11, i64 8}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"_ZTSN3P3D8Graphics5LexerE", !11, i64 0, !14, i64 8}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !9, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}


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