; LLVM IR from jzimmerman/langcc :: gen/meta (gen)

; 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.langcc::rc_ptr.269" = type { ptr, ptr }
%"struct.langcc::rc_ptr.49" = type { ptr, 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::allocator" = type { i8 }
%"struct.lang::meta::Node::AttrMatchCasePattern::Alt::_T" = type { %"struct.lang::meta::Node::AttrMatchCasePattern::_T.base", %"struct.langcc::rc_ptr.239" }
%"struct.lang::meta::Node::AttrMatchCasePattern::_T.base" = type <{ %"struct.lang::meta::Node::_T", i32 }>
%"struct.lang::meta::Node::_T" = type { ptr, %"struct.langcc::hash_obj", %"struct.langcc::enable_rc_from_this_poly", i32, i64, %"struct.langcc::TokenBounds", i8, i64, %"struct.langcc::ParserAttrMask", %"struct.langcc::ParserLookahead" }
%"struct.langcc::hash_obj" = type { %"struct.langcc::Option::_T" }
%"struct.langcc::Option::_T" = type { i32, [32 x i8] }
%"struct.langcc::enable_rc_from_this_poly" = type { ptr, ptr }
%"struct.langcc::TokenBounds" = type { i32, i32 }
%"struct.langcc::ParserAttrMask" = type { [16 x i8] }
%"struct.langcc::ParserLookahead" = type { [8 x i16] }
%"struct.langcc::rc_ptr.239" = type { ptr, ptr }

@.str.308 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6langcc24enable_rc_from_this_poly17rc_from_this_polyIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEENS_6rc_ptrIT_EEv(ptr dead_on_unwind noalias writable sret(%"struct.langcc::rc_ptr.269") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrINS_3VecINS0_IN4lang4meta4Node2Id2_TEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6langcc3VecINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEE12at_uncheckedEl(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrINS_11PrBufStream2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6langcc11PrBufStream2_T11push_stringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4lang4meta4Node2Id2_T5writeERN6langcc6rc_ptrINS4_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4lang4meta4Node20AttrMatchCasePattern3Alt2_T5writeERN6langcc6rc_ptrINS5_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.langcc::rc_ptr.269", align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.langcc::rc_ptr.49", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %15 = getelementptr inbounds i8, ptr %14, i64 48
  call void @_ZN6langcc24enable_rc_from_this_poly17rc_from_this_polyIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEENS_6rc_ptrIT_EEv(ptr dead_on_unwind writable sret(%"struct.langcc::rc_ptr.269") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  store i8 0, ptr %8, align 1, !tbaa !9
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %16

16:                                               ; preds = %72, %2
  %17 = load i64, ptr %6, align 8, !tbaa !11
  %18 = invoke noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %19 unwind label %42

19:                                               ; preds = %16
  %20 = getelementptr inbounds %"struct.lang::meta::Node::AttrMatchCasePattern::Alt::_T", ptr %18, i32 0, i32 1
  %21 = invoke noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %22 unwind label %42

22:                                               ; preds = %19
  %23 = icmp slt i64 %17, %21
  br i1 %23, label %24, label %77

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %25 = invoke noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %26 unwind label %46

26:                                               ; preds = %24
  %27 = getelementptr inbounds %"struct.lang::meta::Node::AttrMatchCasePattern::Alt::_T", ptr %25, i32 0, i32 1
  %28 = invoke noundef ptr @_ZN6langcc6rc_ptrINS_3VecINS0_IN4lang4meta4Node2Id2_TEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %29 unwind label %46

29:                                               ; preds = %26
  %30 = load i64, ptr %6, align 8, !tbaa !11
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6langcc3VecINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEE12at_uncheckedEl(ptr noundef nonnull align 8 dereferenceable(64) %28, i64 noundef %30)
          to label %32 unwind label %46

32:                                               ; preds = %29
  invoke void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %33 unwind label %46

33:                                               ; preds = %32
  %34 = load i8, ptr %7, align 1, !tbaa !9, !range !13, !noundef !14
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %63

36:                                               ; preds = %33
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = invoke noundef ptr @_ZN6langcc6rc_ptrINS_11PrBufStream2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %37)
          to label %39 unwind label %50

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.308, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %40 unwind label %54

40:                                               ; preds = %39
  invoke void @_ZN6langcc11PrBufStream2_T11push_stringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(80) %38, ptr noundef %12)
          to label %41 unwind label %58

41:                                               ; preds = %40
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %63

42:                                               ; preds = %19, %16
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %78

46:                                               ; preds = %32, %29, %26, %24
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  br label %76

50:                                               ; preds = %69, %67, %36
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  br label %75

54:                                               ; preds = %39
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %9, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %10, align 4
  br label %62

58:                                               ; preds = %40
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %9, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %62

62:                                               ; preds = %58, %54
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %75

63:                                               ; preds = %41, %33
  %64 = load i8, ptr %7, align 1, !tbaa !9, !range !13, !noundef !14
  %65 = trunc i8 %64 to i1
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i8 1, ptr %8, align 1, !tbaa !9
  br label %67

67:                                               ; preds = %66, %63
  store i8 1, ptr %7, align 1, !tbaa !9
  %68 = invoke noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %69 unwind label %50

69:                                               ; preds = %67
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN4lang4meta4Node2Id2_T5writeERN6langcc6rc_ptrINS4_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(152) %68, ptr noundef nonnull align 8 dereferenceable(16) %70)
          to label %71 unwind label %50

71:                                               ; preds = %69
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %72

72:                                               ; preds = %71
  %73 = load i64, ptr %6, align 8, !tbaa !11
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %6, align 8, !tbaa !11
  br label %16, !llvm.loop !15

75:                                               ; preds = %62, %50
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %76

76:                                               ; preds = %75, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %78

77:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void

78:                                               ; preds = %76, %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %79

79:                                               ; preds = %78
  %80 = load ptr, ptr %9, align 8
  %81 = load i32, ptr %10, align 4
  %82 = insertvalue { ptr, i32 } poison, ptr %80, 0
  %83 = insertvalue { ptr, i32 } %82, i32 %81, 1
  resume { ptr, i32 } %83
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"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.langcc::rc_ptr.269" = type { ptr, ptr }
%"struct.langcc::rc_ptr.49" = type { ptr, 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::allocator" = type { i8 }

@.str.308 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6langcc24enable_rc_from_this_poly17rc_from_this_polyIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEENS_6rc_ptrIT_EEv(ptr dead_on_unwind noalias writable sret(%"struct.langcc::rc_ptr.269") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrINS_3VecINS0_IN4lang4meta4Node2Id2_TEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6langcc3VecINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEE12at_uncheckedEl(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6langcc6rc_ptrINS_11PrBufStream2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6langcc11PrBufStream2_T11push_stringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4lang4meta4Node20AttrMatchCasePattern3Alt2_T5writeERN6langcc6rc_ptrINS5_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.langcc::rc_ptr.269", align 8
  %4 = alloca %"struct.langcc::rc_ptr.49", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZN6langcc24enable_rc_from_this_poly17rc_from_this_polyIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEENS_6rc_ptrIT_EEv(ptr dead_on_unwind nonnull writable sret(%"struct.langcc::rc_ptr.269") align 8 %3, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %8 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %9 = getelementptr inbounds i8, ptr %8, i64 144
  %10 = call noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %12 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %13 = getelementptr inbounds i8, ptr %12, i64 144
  %14 = call noundef ptr @_ZN6langcc6rc_ptrINS_3VecINS0_IN4lang4meta4Node2Id2_TEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6langcc3VecINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEE12at_uncheckedEl(ptr noundef nonnull align 8 dereferenceable(64) %14, i64 noundef 0)
  invoke void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %.critedge.peel unwind label %.loopexit.split-lp

.critedge.peel:                                   ; preds = %.lr.ph.preheader
  %16 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  invoke void @_ZN4lang4meta4Node2Id2_T5writeERN6langcc6rc_ptrINS4_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(152) %16, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %17 unwind label %.loopexit.split-lp32

17:                                               ; preds = %.critedge.peel
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %18 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %19 = getelementptr inbounds i8, ptr %18, i64 144
  %20 = call noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %21 = icmp sgt i64 %20, 1
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17, %33
  %.01318 = phi i64 [ %34, %33 ], [ 1, %17 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %22 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %23 = getelementptr inbounds i8, ptr %22, i64 144
  %24 = call noundef ptr @_ZN6langcc6rc_ptrINS_3VecINS0_IN4lang4meta4Node2Id2_TEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6langcc3VecINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEE12at_uncheckedEl(ptr noundef nonnull align 8 dereferenceable(64) %24, i64 noundef %.01318)
  invoke void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %26 unwind label %.loopexit

26:                                               ; preds = %.lr.ph
  %27 = call noundef ptr @_ZN6langcc6rc_ptrINS_11PrBufStream2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.308, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %28 unwind label %29

28:                                               ; preds = %26
  invoke void @_ZN6langcc11PrBufStream2_T11push_stringENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(80) %27, ptr noundef nonnull %5)
          to label %.critedge unwind label %30

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %40

.loopexit.split-lp:                               ; preds = %.lr.ph.preheader
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %40

.loopexit31:                                      ; preds = %.critedge
  %lpad.loopexit33 = landingpad { ptr, i32 }
          cleanup
  br label %39

.loopexit.split-lp32:                             ; preds = %.critedge.peel
  %lpad.loopexit.split-lp34 = landingpad { ptr, i32 }
          cleanup
  br label %39

29:                                               ; preds = %26
  %lpad.loopexit23 = landingpad { ptr, i32 }
          cleanup
  br label %31

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

31:                                               ; preds = %30, %29
  %.pn = phi { ptr, i32 } [ %lpad.loopexit28, %30 ], [ %lpad.loopexit23, %29 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %39

.critedge:                                        ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  %32 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  invoke void @_ZN4lang4meta4Node2Id2_T5writeERN6langcc6rc_ptrINS4_11PrBufStream2_TEEE(ptr noundef nonnull align 8 dereferenceable(152) %32, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %33 unwind label %.loopexit31

33:                                               ; preds = %.critedge
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %34 = add nuw nsw i64 %.01318, 1
  %35 = call noundef ptr @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %36 = getelementptr inbounds i8, ptr %35, i64 144
  %37 = call noundef i64 @_ZN6langcc3lenINS_6rc_ptrIN4lang4meta4Node2Id2_TEEEEElRKNS1_INS_3VecIT_EEEE(ptr noundef nonnull align 8 dereferenceable(16) %36)
  %38 = icmp slt i64 %34, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !5

39:                                               ; preds = %.loopexit31, %.loopexit.split-lp32, %31
  %.pn15 = phi { ptr, i32 } [ %.pn, %31 ], [ %lpad.loopexit33, %.loopexit31 ], [ %lpad.loopexit.split-lp34, %.loopexit.split-lp32 ]
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node2Id2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  br label %40

40:                                               ; preds = %.loopexit, %.loopexit.split-lp, %39
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %39 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn15.pn

._crit_edge:                                      ; preds = %33, %17, %2
  call void @_ZN6langcc6rc_ptrIN4lang4meta4Node20AttrMatchCasePattern3Alt2_TEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = distinct !{!5, !6, !7}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass