; LLVM IR from thepowersgang/mrustc :: src/mir/from_hir_match.ll (ZN21PatternRulesetBuilder9push_ruleE11PatternRule)

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

%class.PatternRule = type { i32, %"union.PatternRule::DataUnion", %struct.field_path_t }
%"union.PatternRule::DataUnion" = type { %"struct.PatternRule::Data_SplitSlice", [32 x i8] }
%"struct.PatternRule::Data_SplitSlice" = type { i32, i32, %"class.std::vector.136", %"class.std::vector.136" }
%"class.std::vector.136" = type { %"struct.std::_Vector_base.137" }
%"struct.std::_Vector_base.137" = type { %"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl" }
%"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl" = type { %"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.field_path_t = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.PatternRulesetBuilder = type { ptr, ptr, %"class.std::vector.70", i64, i64, %struct.field_path_t }
%"class.std::vector.70" = type { %"struct.std::_Vector_base.71" }
%"struct.std::_Vector_base.71" = type { %"struct.std::_Vector_base<PatternRulesetBuilder::Ruleset, std::allocator<PatternRulesetBuilder::Ruleset>>::_Vector_impl" }
%"struct.std::_Vector_base<PatternRulesetBuilder::Ruleset, std::allocator<PatternRulesetBuilder::Ruleset>>::_Vector_impl" = type { %"struct.std::_Vector_base<PatternRulesetBuilder::Ruleset, std::allocator<PatternRulesetBuilder::Ruleset>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PatternRulesetBuilder::Ruleset, std::allocator<PatternRulesetBuilder::Ruleset>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.PatternRulesetBuilder::Ruleset" = type { i8, %"class.std::vector.136", %"class.std::vector.141" }
%"class.std::vector.141" = type { %"struct.std::_Vector_base.142" }
%"struct.std::_Vector_base.142" = type { %"struct.std::_Vector_base<PatternBinding, std::allocator<PatternBinding>>::_Vector_impl" }
%"struct.std::_Vector_base<PatternBinding, std::allocator<PatternBinding>>::_Vector_impl" = type { %"struct.std::_Vector_base<PatternBinding, std::allocator<PatternBinding>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PatternBinding, std::allocator<PatternBinding>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule = external hidden unnamed_addr constant [51 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11PatternRule5cloneEv(ptr dead_on_unwind noalias writable sret(%class.PatternRule) align 8, ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21PatternRulesetBuilder9push_ruleE11PatternRule(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca %class.PatternRule, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 3
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 4
  %13 = load i64, ptr %12, align 8, !tbaa !21
  %14 = icmp ult i64 %11, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %18

16:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.39, ptr noundef @.str.17, i32 noundef 827, ptr noundef @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule) #5
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  %19 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 4
  %20 = load i64, ptr %19, align 8, !tbaa !21
  %21 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 2
  %22 = call noundef i64 @_ZNKSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = icmp ule i64 %20, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %18
  br label %27

25:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str.17, i32 noundef 828, ptr noundef @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule) #5
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %28 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 3
  %29 = load i64, ptr %28, align 8, !tbaa !9
  store i64 %29, ptr %5, align 8, !tbaa !22
  br label %30

30:                                               ; preds = %58, %27
  %31 = load i64, ptr %5, align 8, !tbaa !22
  %32 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 4
  %33 = load i64, ptr %32, align 8, !tbaa !21
  %34 = icmp ult i64 %31, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %65

36:                                               ; preds = %30
  %37 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 2
  %38 = load i64, ptr %5, align 8, !tbaa !22
  %39 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %38) #6
  %40 = getelementptr inbounds %"struct.PatternRulesetBuilder::Ruleset", ptr %39, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 120, ptr %6) #6
  %41 = load i64, ptr %5, align 8, !tbaa !22
  %42 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 4
  %43 = load i64, ptr %42, align 8, !tbaa !21
  %44 = sub i64 %43, 1
  %45 = icmp eq i64 %41, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %36
  call void @_ZN11PatternRuleC2EOS_(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(120) %1) #6
  br label %48

47:                                               ; preds = %36
  call void @_ZNK11PatternRule5cloneEv(ptr dead_on_unwind writable sret(%class.PatternRule) align 8 %6, ptr noundef nonnull align 8 dereferenceable(120) %1)
  br label %48

48:                                               ; preds = %47, %46
  invoke void @_ZNSt6vectorI11PatternRuleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %49 unwind label %61

49:                                               ; preds = %48
  call void @_ZN11PatternRuleD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #6
  %50 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 5
  %51 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %9, i32 0, i32 2
  %52 = load i64, ptr %5, align 8, !tbaa !22
  %53 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52) #6
  %54 = getelementptr inbounds %"struct.PatternRulesetBuilder::Ruleset", ptr %53, i32 0, i32 1
  %55 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI11PatternRuleSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #6
  %56 = getelementptr inbounds %class.PatternRule, ptr %55, i32 0, i32 2
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN12field_path_taSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %50)
  br label %58

58:                                               ; preds = %49
  %59 = load i64, ptr %5, align 8, !tbaa !22
  %60 = add i64 %59, 1
  store i64 %60, ptr %5, align 8, !tbaa !22
  br label %30, !llvm.loop !23

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  call void @_ZN11PatternRuleD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %66

65:                                               ; preds = %35
  ret void

66:                                               ; preds = %61
  %67 = load ptr, ptr %7, align 8
  %68 = load i32, ptr %8, align 4
  %69 = insertvalue { ptr, i32 } poison, ptr %67, 0
  %70 = insertvalue { ptr, i32 } %69, i32 %68, 1
  resume { ptr, i32 } %70
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11PatternRuleC2EOS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #2 = { 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 #3 = { 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 #4 = { 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 = { noreturn nounwind }
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, !15, i64 40}
!10 = !{!"_ZTS21PatternRulesetBuilder", !6, i64 0, !6, i64 8, !11, i64 16, !15, i64 40, !15, i64 48, !16, i64 56}
!11 = !{!"_ZTSSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS12field_path_t", !17, i64 0}
!17 = !{!"_ZTSSt6vectorIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!10, !15, i64 48}
!22 = !{!15, !15, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"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"

%class.PatternRule = type { i32, %"union.PatternRule::DataUnion", %struct.field_path_t }
%"union.PatternRule::DataUnion" = type { %"struct.PatternRule::Data_SplitSlice", [32 x i8] }
%"struct.PatternRule::Data_SplitSlice" = type { i32, i32, %"class.std::vector.136", %"class.std::vector.136" }
%"class.std::vector.136" = type { %"struct.std::_Vector_base.137" }
%"struct.std::_Vector_base.137" = type { %"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl" }
%"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl" = type { %"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PatternRule, std::allocator<PatternRule>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.field_path_t = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule = external hidden unnamed_addr constant [51 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11PatternRule5cloneEv(ptr dead_on_unwind noalias writable sret(%class.PatternRule) align 8, ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21PatternRulesetBuilder9push_ruleE11PatternRule(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.PatternRule, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  %7 = load i64, ptr %6, align 8, !tbaa !20
  %8 = icmp ult i64 %5, %7
  br i1 %8, label %10, label %9

9:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.17, i32 noundef 827, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule) #5
  unreachable

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = tail call noundef i64 @_ZNKSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %.not = icmp ugt i64 %7, %12
  br i1 %.not, label %13, label %14

13:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.17, i32 noundef 828, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder9push_ruleE11PatternRule) #5
  unreachable

14:                                               ; preds = %10
  %15 = load i64, ptr %4, align 8, !tbaa !5
  %16 = load i64, ptr %6, align 8, !tbaa !20
  %17 = icmp ult i64 %15, %16
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  br label %19

._crit_edge:                                      ; preds = %28, %14
  ret void

19:                                               ; preds = %.lr.ph, %28
  %.08 = phi i64 [ %15, %.lr.ph ], [ %34, %28 ]
  %20 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.08) #6
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %3) #6
  %22 = load i64, ptr %6, align 8, !tbaa !20
  %23 = add i64 %22, -1
  %24 = icmp eq i64 %.08, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %19
  call void @_ZN11PatternRuleC2EOS_(ptr noundef nonnull align 8 dereferenceable(120) %3, ptr noundef nonnull align 8 dereferenceable(120) %1) #6
  br label %27

26:                                               ; preds = %19
  call void @_ZNK11PatternRule5cloneEv(ptr dead_on_unwind nonnull writable sret(%class.PatternRule) align 8 %3, ptr noundef nonnull align 8 dereferenceable(120) %1)
  br label %27

27:                                               ; preds = %26, %25
  invoke void @_ZNSt6vectorI11PatternRuleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(120) %3)
          to label %28 unwind label %37

28:                                               ; preds = %27
  call void @_ZN11PatternRuleD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #6
  %29 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %.08) #6
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI11PatternRuleSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = getelementptr inbounds i8, ptr %31, i64 96
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN12field_path_taSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %18)
  %34 = add nuw i64 %.08, 1
  %35 = load i64, ptr %6, align 8, !tbaa !20
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %19, label %._crit_edge, !llvm.loop !21

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11PatternRuleD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #6
  resume { ptr, i32 } %38
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11PatternRuleC2EOS_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZNSt6vectorI11PatternRuleSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #2 = { 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 #3 = { 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 #4 = { 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 = { noreturn nounwind }
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, !14, i64 40}
!6 = !{!"_ZTS21PatternRulesetBuilder", !7, i64 0, !7, i64 8, !10, i64 16, !14, i64 40, !14, i64 48, !15, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN21PatternRulesetBuilder7RulesetESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!"_ZTS12field_path_t", !16, i64 0}
!16 = !{!"_ZTSSt6vectorIhSaIhEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!6, !14, i64 48}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass