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

; 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 }
%"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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics11parseGlobalERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12parseVersionERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics17parsePreprocessorERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics15parseIdentifierERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics13parseDatatypeERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics11parseStructERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics6Parser5parseEPKc(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::Parser::Parse") align 8 %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.P3D::Graphics::Lexer", align 8
  %7 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZN3P3D8Graphics6Parser5ParseC2Ev(ptr noundef nonnull align 8 dereferenceable(248) %0) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D8Graphics5LexerC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %11) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #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) %6) #5
  br label %12

12:                                               ; preds = %41, %2
  %13 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %14 = load i8, ptr %13, align 8, !tbaa !9
  %15 = sext i8 %14 to i32
  %16 = icmp ne i32 %15, 28
  br i1 %16, label %17, label %42

17:                                               ; preds = %12
  %18 = getelementptr inbounds %"struct.P3D::Graphics::Lexer::Token", ptr %7, i32 0, i32 0
  %19 = load i8, ptr %18, align 8, !tbaa !9
  %20 = sext i8 %19 to i32
  switch i32 %20, label %40 [
    i32 10, label %21
    i32 8, label %27
    i32 15, label %29
    i32 9, label %31
    i32 13, label %32
    i32 14, label %34
    i32 12, label %36
    i32 16, label %38
  ]

21:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %22 unwind label %23

22:                                               ; preds = %21
  br label %41

23:                                               ; preds = %38, %36, %34, %32, %29, %27, %21
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %8, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @_ZN3P3D8Graphics6Parser5ParseD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %0) #5
  br label %46

27:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics11parseGlobalERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %28 unwind label %23

28:                                               ; preds = %27
  br label %41

29:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics13parseDatatypeERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %30 unwind label %23

30:                                               ; preds = %29
  br label %41

31:                                               ; preds = %17
  br label %41

32:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics12parseVersionERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %33 unwind label %23

33:                                               ; preds = %32
  br label %41

34:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics17parsePreprocessorERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %35 unwind label %23

35:                                               ; preds = %34
  br label %41

36:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics11parseStructERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %37 unwind label %23

37:                                               ; preds = %36
  br label %41

38:                                               ; preds = %17
  invoke void @_ZN3P3D8Graphics15parseIdentifierERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %39 unwind label %23

39:                                               ; preds = %38
  br label %41

40:                                               ; preds = %17
  br label %41

41:                                               ; preds = %40, %39, %37, %35, %33, %31, %30, %28, %22
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %10, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %12, !llvm.loop !17

42:                                               ; preds = %12
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  %43 = load i1, ptr %5, align 1
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  call void @_ZN3P3D8Graphics6Parser5ParseD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %0) #5
  br label %45

45:                                               ; preds = %44, %42
  ret void

46:                                               ; preds = %23
  %47 = load ptr, ptr %8, align 8
  %48 = load i32, ptr %9, align 4
  %49 = insertvalue { ptr, i32 } poison, ptr %47, 0
  %50 = insertvalue { ptr, i32 } %49, i32 %48, 1
  resume { ptr, i32 } %50
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics6Parser5ParseD2Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #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 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, !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 = !{i64 0, i64 1, !15, i64 8, i64 8, !16, i64 16, i64 8, !16}
!15 = !{!11, !11, i64 0}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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::Lexer::Token" = type { i8, %"struct.P3D::Graphics::Lexer::Range" }
%"struct.P3D::Graphics::Lexer::Range" = type { i64, 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: 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics11parseGlobalERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12parseVersionERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics17parsePreprocessorERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics15parseIdentifierERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics13parseDatatypeERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics11parseStructERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics6Parser5parseEPKc(ptr dead_on_unwind noalias nonnull writable sret(%"struct.P3D::Graphics::Parser::Parse") align 8 %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.P3D::Graphics::Lexer", align 8
  %4 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  %5 = alloca %"struct.P3D::Graphics::Lexer::Token", align 8
  tail call void @_ZN3P3D8Graphics6Parser5ParseC2Ev(ptr noundef nonnull align 8 dereferenceable(248) %0) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3P3D8Graphics5LexerC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %1) #5
  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) %3) #5
  br label %6

6:                                                ; preds = %17, %2
  %7 = load i8, ptr %4, align 8, !tbaa !5
  switch i8 %7, label %17 [
    i8 28, label %18
    i8 10, label %8
    i8 8, label %11
    i8 15, label %12
    i8 16, label %16
    i8 13, label %13
    i8 14, label %14
    i8 12, label %15
  ]

8:                                                ; preds = %6
  invoke void @_ZN3P3D8Graphics12parseUniformERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

9:                                                ; preds = %16, %15, %14, %13, %12, %11, %8
  %10 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3P3D8Graphics6Parser5ParseD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %0) #5
  resume { ptr, i32 } %10

11:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics11parseGlobalERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

12:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics13parseDatatypeERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

13:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics12parseVersionERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

14:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics17parsePreprocessorERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

15:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics11parseStructERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

16:                                               ; preds = %6
  invoke void @_ZN3P3D8Graphics15parseIdentifierERNS0_5LexerERKNS1_5TokenERNS0_6Parser5ParseE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(248) %0)
          to label %17 unwind label %9

17:                                               ; preds = %6, %16, %15, %14, %13, %12, %11, %8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN3P3D8Graphics5Lexer4nextEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Graphics::Lexer::Token") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, i64 24, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %6, !llvm.loop !15

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics6Parser5ParseD2Ev(ptr noundef nonnull align 8 dereferenceable(248)) 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 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 = !{i64 0, i64 1, !13, i64 8, i64 8, !14, i64 16, i64 8, !14}
!13 = !{!7, !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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