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

; 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.__gnu_cxx::__normal_iterator.215" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.193" = type { 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.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::Ruleset" = type { i8, %"class.std::vector.136", %"class.std::vector.141" }
%"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 }
%"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 }

@g_debug_indent_level = external global i32, align 4
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE = external hidden unnamed_addr constant [71 x i8], align 1
@__FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE = external hidden unnamed_addr constant [14 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 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 noundef zeroext i1 @_Z13debug_enabledv() #1

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

; 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 uwtable
define dso_local void @_ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.215", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.193", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.193", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.193", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.193", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  %13 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %12, i32 0, i32 3
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %12, i32 0, i32 4
  %16 = load i64, ptr %15, align 8, !tbaa !21
  %17 = icmp ult i64 %14, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  br label %21

19:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.39, ptr noundef @.str.17, i32 noundef 847, ptr noundef @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE) #6
  unreachable

20:                                               ; No predecessors!
  br label %21

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

27:                                               ; preds = %21
  br label %30

28:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str.17, i32 noundef 848, ptr noundef @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE) #6
  unreachable

29:                                               ; No predecessors!
  br label %30

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

33:                                               ; preds = %78, %30
  %34 = load i64, ptr %5, align 8, !tbaa !22
  %35 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %12, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !21
  %37 = icmp ult i64 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %81

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %40 = getelementptr inbounds %struct.PatternRulesetBuilder, ptr %12, i32 0, i32 2
  %41 = load i64, ptr %5, align 8, !tbaa !22
  %42 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41) #7
  %43 = getelementptr inbounds %"struct.PatternRulesetBuilder::Ruleset", ptr %42, i32 0, i32 2
  store ptr %43, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %8, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK14PatternBindingSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %48 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %9, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  %50 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %10, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.215", ptr %7, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %9, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %10, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8
  %58 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE6insertIN9__gnu_cxx17__normal_iteratorIPS0_S2_EEvEES7_NS5_IPKS0_S2_EET_SB_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr %53, ptr %55, ptr %57)
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.193", ptr %11, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %60

60:                                               ; preds = %39
  %61 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %61, label %62, label %75

62:                                               ; preds = %60
  %63 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !23
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %63, ptr noundef @__FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE)
  %65 = load i64, ptr %5, align 8, !tbaa !22
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %64, i64 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @.str.28)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI14PatternBindingERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef @.str.41)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI14PatternBindingERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(24) %70)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @.str.3)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @_ZSt3decRSt8ios_base)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %75

75:                                               ; preds = %62, %60
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %78

78:                                               ; preds = %77
  %79 = load i64, ptr %5, align 8, !tbaa !22
  %80 = add i64 %79, 1
  store i64 %80, ptr %5, align 8, !tbaa !22
  br label %33, !llvm.loop !25

81:                                               ; preds = %38
  ret void
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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 = { 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 "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 = { noreturn nounwind }
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, !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 = !{!24, !24, i64 0}
!24 = !{!"int", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"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.__gnu_cxx::__normal_iterator.215" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.193" = type { ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE = external hidden unnamed_addr constant [71 x i8], align 1
@__FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE = external hidden unnamed_addr constant [14 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 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 noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

; 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 uwtable
define dso_local void @_ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.215", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.193", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = load i64, ptr %7, align 8, !tbaa !20
  %9 = icmp ult i64 %6, %8
  br i1 %9, label %11, label %10

10:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.17, i32 noundef 847, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE) #6
  unreachable

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

14:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.17, i32 noundef 848, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE) #6
  unreachable

15:                                               ; preds = %11
  %16 = load i64, ptr %5, align 8, !tbaa !5
  %17 = load i64, ptr %7, align 8, !tbaa !20
  %18 = icmp ult i64 %16, %17
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %38, %15
  ret void

.lr.ph:                                           ; preds = %15, %38
  %.010 = phi i64 [ %39, %38 ], [ %16, %15 ]
  %19 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN21PatternRulesetBuilder7RulesetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.010) #7
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %21 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  store ptr %21, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK14PatternBindingSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %22 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %23 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %24 = load ptr, ptr %3, align 8
  %25 = call ptr @_ZNSt6vectorI14PatternBindingSaIS0_EE6insertIN9__gnu_cxx17__normal_iteratorIPS0_S2_EEvEES7_NS5_IPKS0_S2_EET_SB_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr %24, ptr %22, ptr %23)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %26 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %26, label %27, label %38

27:                                               ; preds = %.lr.ph
  %28 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !21
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %28, ptr noundef nonnull @__FUNCTION__._ZN21PatternRulesetBuilder13push_bindingsESt6vectorI14PatternBindingSaIS1_EE)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %29, i64 noundef %.010)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str.28)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI14PatternBindingERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str.41)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsI14PatternBindingERSoS1_RKSt6vectorIT_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(24) %20)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.3)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %38

38:                                               ; preds = %27, %.lr.ph
  %39 = add nuw i64 %.010, 1
  %40 = load i64, ptr %7, align 8, !tbaa !20
  %41 = icmp ult i64 %39, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !23
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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 = { 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 "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 = { noreturn nounwind }
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, !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 = !{!22, !22, i64 0}
!22 = !{!"int", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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