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

; 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.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.212 = type { ptr }
%class.anon.213 = type { ptr }
%class.anon.214 = type { ptr }
%"struct.PatternRule::Data_Variant" = type { i32, %"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.PatternRule::Data_Slice" = type { i32, %"class.std::vector.136" }

@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_ = external hidden unnamed_addr constant [91 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_ = external hidden unnamed_addr constant [15 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

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL3ordbb(i1 noundef zeroext, i1 noundef zeroext) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %struct.Span, align 8
  %28 = alloca %"class.std::function", align 8
  %29 = alloca %class.anon.212, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca i8, align 1
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca i8, align 1
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %struct.Span, align 8
  %40 = alloca %"class.std::function", align 8
  %41 = alloca %class.anon.213, align 8
  %42 = alloca i8, align 1
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %struct.Span, align 8
  %47 = alloca %"class.std::function", align 8
  %48 = alloca %class.anon.214, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %49)
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %51)
  %53 = icmp ne i32 %50, %52
  br i1 %53, label %54, label %62

54:                                               ; preds = %2
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %55)
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %57)
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  store i32 1, ptr %3, align 4
  br label %429

61:                                               ; preds = %54
  store i32 -1, ptr %3, align 4
  br label %429

62:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 1, ptr %6, align 1, !tbaa !9
  br label %63

63:                                               ; preds = %424, %62
  %64 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %65 = trunc i8 %64 to i1
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 2, ptr %7, align 4
  br label %425

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %68, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %69, ptr %9, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %419, %67
  %71 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %72 = trunc i8 %71 to i1
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  store i32 5, ptr %7, align 4
  br label %420

74:                                               ; preds = %70
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %75)
  switch i32 %76, label %418 [
    i32 0, label %77
    i32 7, label %78
    i32 1, label %103
    i32 2, label %189
    i32 3, label %275
    i32 4, label %312
    i32 5, label %344
    i32 6, label %381
  ]

77:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.17, i32 noundef 765, ptr noundef @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #8
  unreachable

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  store i8 1, ptr %10, align 1, !tbaa !9
  br label %79

79:                                               ; preds = %99, %78
  %80 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %81 = trunc i8 %80 to i1
  br i1 %81, label %83, label %82

82:                                               ; preds = %79
  store i32 9, ptr %7, align 4
  br label %100

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120) %84)
  store ptr %85, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120) %86)
  store ptr %87, ptr %12, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %95, %83
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %92 = trunc i8 %91 to i1
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  store i32 12, ptr %7, align 4
  br label %96

94:                                               ; preds = %88
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %96

95:                                               ; No predecessors!
  store i8 0, ptr %10, align 1, !tbaa !9
  br label %88, !llvm.loop !13

96:                                               ; preds = %94, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %97 = load i32, ptr %7, align 4
  switch i32 %97, label %100 [
    i32 12, label %98
  ]

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98
  store i8 0, ptr %10, align 1, !tbaa !9
  br label %79, !llvm.loop !15

100:                                              ; preds = %96, %82
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  %101 = load i32, ptr %7, align 4
  switch i32 %101, label %420 [
    i32 9, label %102
  ]

102:                                              ; preds = %100
  br label %418

103:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  store i8 1, ptr %13, align 1, !tbaa !9
  br label %104

104:                                              ; preds = %185, %103
  %105 = load i8, ptr %13, align 1, !tbaa !9, !range !11, !noundef !12
  %106 = trunc i8 %105 to i1
  br i1 %106, label %108, label %107

107:                                              ; preds = %104
  store i32 15, ptr %7, align 4
  br label %186

108:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120) %109)
  store ptr %110, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120) %111)
  store ptr %112, ptr %15, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %181, %108
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = load ptr, ptr %15, align 8, !tbaa !5
  %116 = load i8, ptr %13, align 1, !tbaa !9, !range !11, !noundef !12
  %117 = trunc i8 %116 to i1
  br i1 %117, label %119, label %118

118:                                              ; preds = %113
  store i32 18, ptr %7, align 4
  br label %182

119:                                              ; preds = %113
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !16
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 8, !tbaa !16
  %126 = icmp ne i32 %122, %125
  br i1 %126, label %127, label %135

127:                                              ; preds = %119
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !16
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 8, !tbaa !16
  %134 = call noundef i32 @_ZL3ordjj(i32 noundef %130, i32 noundef %133)
  store i32 %134, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %182

135:                                              ; preds = %119
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %136, i32 0, i32 1
  %138 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #7
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %139, i32 0, i32 1
  %141 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %140) #7
  %142 = icmp eq i64 %138, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %135
  br label %146

144:                                              ; preds = %135
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.17, i32 noundef 772, ptr noundef @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #8
  unreachable

145:                                              ; No predecessors!
  br label %146

146:                                              ; preds = %145, %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !23
  br label %147

147:                                              ; preds = %175, %146
  %148 = load i32, ptr %16, align 4, !tbaa !23
  %149 = zext i32 %148 to i64
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %150, i32 0, i32 1
  %152 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #7
  %153 = icmp ult i64 %149, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %147
  store i32 21, ptr %7, align 4
  br label %178

155:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %156, i32 0, i32 1
  %158 = load i32, ptr %16, align 4, !tbaa !23
  %159 = zext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159) #7
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.PatternRule::Data_Variant", ptr %161, i32 0, i32 1
  %163 = load i32, ptr %16, align 4, !tbaa !23
  %164 = zext i32 %163 to i64
  %165 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %164) #7
  %166 = call noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %160, ptr noundef nonnull align 8 dereferenceable(120) %165)
  store i32 %166, ptr %17, align 4, !tbaa !24
  %167 = load i32, ptr %17, align 4, !tbaa !24
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %171

169:                                              ; preds = %155
  %170 = load i32, ptr %17, align 4, !tbaa !24
  store i32 %170, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %172

171:                                              ; preds = %155
  store i32 0, ptr %7, align 4
  br label %172

172:                                              ; preds = %171, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %173 = load i32, ptr %7, align 4
  switch i32 %173, label %178 [
    i32 0, label %174
  ]

174:                                              ; preds = %172
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %16, align 4, !tbaa !23
  %177 = add i32 %176, 1
  store i32 %177, ptr %16, align 4, !tbaa !23
  br label %147, !llvm.loop !26

178:                                              ; preds = %172, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %179 = load i32, ptr %7, align 4
  switch i32 %179, label %182 [
    i32 21, label %180
  ]

180:                                              ; preds = %178
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %182

181:                                              ; No predecessors!
  store i8 0, ptr %13, align 1, !tbaa !9
  br label %113, !llvm.loop !27

182:                                              ; preds = %180, %178, %127, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %183 = load i32, ptr %7, align 4
  switch i32 %183, label %186 [
    i32 18, label %184
  ]

184:                                              ; preds = %182
  br label %185

185:                                              ; preds = %184
  store i8 0, ptr %13, align 1, !tbaa !9
  br label %104, !llvm.loop !28

186:                                              ; preds = %182, %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  %187 = load i32, ptr %7, align 4
  switch i32 %187, label %420 [
    i32 15, label %188
  ]

188:                                              ; preds = %186
  br label %418

189:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %190

190:                                              ; preds = %271, %189
  %191 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %192 = trunc i8 %191 to i1
  br i1 %192, label %194, label %193

193:                                              ; preds = %190
  store i32 24, ptr %7, align 4
  br label %272

194:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120) %195)
  store ptr %196, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120) %197)
  store ptr %198, ptr %20, align 8, !tbaa !5
  br label %199

199:                                              ; preds = %267, %194
  %200 = load ptr, ptr %19, align 8, !tbaa !5
  %201 = load ptr, ptr %20, align 8, !tbaa !5
  %202 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %203 = trunc i8 %202 to i1
  br i1 %203, label %205, label %204

204:                                              ; preds = %199
  store i32 27, ptr %7, align 4
  br label %268

205:                                              ; preds = %199
  %206 = load ptr, ptr %19, align 8, !tbaa !5
  %207 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !29
  %209 = load ptr, ptr %20, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 8, !tbaa !29
  %212 = icmp ne i32 %208, %211
  br i1 %212, label %213, label %221

213:                                              ; preds = %205
  %214 = load ptr, ptr %19, align 8, !tbaa !5
  %215 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %214, i32 0, i32 0
  %216 = load i32, ptr %215, align 8, !tbaa !29
  %217 = load ptr, ptr %20, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %217, i32 0, i32 0
  %219 = load i32, ptr %218, align 8, !tbaa !29
  %220 = call noundef i32 @_ZL3ordjj(i32 noundef %216, i32 noundef %219)
  store i32 %220, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %268

221:                                              ; preds = %205
  %222 = load ptr, ptr %19, align 8, !tbaa !5
  %223 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %222, i32 0, i32 1
  %224 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %223) #7
  %225 = load ptr, ptr %20, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %225, i32 0, i32 1
  %227 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %226) #7
  %228 = icmp eq i64 %224, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %221
  br label %232

230:                                              ; preds = %221
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.17, i32 noundef 785, ptr noundef @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #8
  unreachable

231:                                              ; No predecessors!
  br label %232

232:                                              ; preds = %231, %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !23
  br label %233

233:                                              ; preds = %261, %232
  %234 = load i32, ptr %21, align 4, !tbaa !23
  %235 = zext i32 %234 to i64
  %236 = load ptr, ptr %19, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %236, i32 0, i32 1
  %238 = call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %237) #7
  %239 = icmp ult i64 %235, %238
  br i1 %239, label %241, label %240

240:                                              ; preds = %233
  store i32 30, ptr %7, align 4
  br label %264

241:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %242, i32 0, i32 1
  %244 = load i32, ptr %21, align 4, !tbaa !23
  %245 = zext i32 %244 to i64
  %246 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %243, i64 noundef %245) #7
  %247 = load ptr, ptr %20, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.PatternRule::Data_Slice", ptr %247, i32 0, i32 1
  %249 = load i32, ptr %21, align 4, !tbaa !23
  %250 = zext i32 %249 to i64
  %251 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %248, i64 noundef %250) #7
  %252 = call noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %246, ptr noundef nonnull align 8 dereferenceable(120) %251)
  store i32 %252, ptr %22, align 4, !tbaa !24
  %253 = load i32, ptr %22, align 4, !tbaa !24
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %257

255:                                              ; preds = %241
  %256 = load i32, ptr %22, align 4, !tbaa !24
  store i32 %256, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %258

257:                                              ; preds = %241
  store i32 0, ptr %7, align 4
  br label %258

258:                                              ; preds = %257, %255
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  %259 = load i32, ptr %7, align 4
  switch i32 %259, label %264 [
    i32 0, label %260
  ]

260:                                              ; preds = %258
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %21, align 4, !tbaa !23
  %263 = add i32 %262, 1
  store i32 %263, ptr %21, align 4, !tbaa !23
  br label %233, !llvm.loop !31

264:                                              ; preds = %258, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  %265 = load i32, ptr %7, align 4
  switch i32 %265, label %268 [
    i32 30, label %266
  ]

266:                                              ; preds = %264
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %268

267:                                              ; No predecessors!
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %199, !llvm.loop !32

268:                                              ; preds = %266, %264, %213, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %269 = load i32, ptr %7, align 4
  switch i32 %269, label %272 [
    i32 27, label %270
  ]

270:                                              ; preds = %268
  br label %271

271:                                              ; preds = %270
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %190, !llvm.loop !33

272:                                              ; preds = %268, %193
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  %273 = load i32, ptr %7, align 4
  switch i32 %273, label %420 [
    i32 24, label %274
  ]

274:                                              ; preds = %272
  br label %418

275:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  store i8 1, ptr %23, align 1, !tbaa !9
  br label %276

276:                                              ; preds = %310, %275
  %277 = load i8, ptr %23, align 1, !tbaa !9, !range !11, !noundef !12
  %278 = trunc i8 %277 to i1
  br i1 %278, label %280, label %279

279:                                              ; preds = %276
  store i32 33, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  br label %311

280:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %281 = load ptr, ptr %8, align 8, !tbaa !5
  %282 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120) %281)
  store ptr %282, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %283 = load ptr, ptr %9, align 8, !tbaa !5
  %284 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120) %283)
  store ptr %284, ptr %25, align 8, !tbaa !5
  br label %285

285:                                              ; preds = %308, %280
  %286 = load ptr, ptr %24, align 8, !tbaa !5
  %287 = load ptr, ptr %25, align 8, !tbaa !5
  %288 = load i8, ptr %23, align 1, !tbaa !9, !range !11, !noundef !12
  %289 = trunc i8 %288 to i1
  br i1 %289, label %291, label %290

290:                                              ; preds = %285
  store i32 36, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %309

291:                                              ; preds = %285
  br label %292

292:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %293 = getelementptr inbounds %class.anon.212, ptr %29, i32 0, i32 0
  store ptr %26, ptr %293, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef %28)
          to label %294 unwind label %297

294:                                              ; preds = %292
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  %295 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %295, ptr noundef @.str.5)
          to label %296 unwind label %301

296:                                              ; preds = %294
  call void @__cxa_throw(ptr %295, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
  unreachable

297:                                              ; preds = %292
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %30, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %31, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %305

301:                                              ; preds = %294
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %30, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %31, align 4
  call void @__cxa_free_exception(ptr %295) #7
  br label %305

305:                                              ; preds = %301, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  br label %422

306:                                              ; No predecessors!
  br label %307

307:                                              ; preds = %306
  br label %308

308:                                              ; preds = %307
  store i8 0, ptr %23, align 1, !tbaa !9
  br label %285, !llvm.loop !34

309:                                              ; preds = %290
  br label %310

310:                                              ; preds = %309
  store i8 0, ptr %23, align 1, !tbaa !9
  br label %276, !llvm.loop !35

311:                                              ; preds = %279
  br label %418

312:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  store i8 1, ptr %32, align 1, !tbaa !9
  br label %313

313:                                              ; preds = %340, %312
  %314 = load i8, ptr %32, align 1, !tbaa !9, !range !11, !noundef !12
  %315 = trunc i8 %314 to i1
  br i1 %315, label %317, label %316

316:                                              ; preds = %313
  store i32 41, ptr %7, align 4
  br label %341

317:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %318 = load ptr, ptr %8, align 8, !tbaa !5
  %319 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120) %318)
  store ptr %319, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %320 = load ptr, ptr %9, align 8, !tbaa !5
  %321 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120) %320)
  store ptr %321, ptr %34, align 8, !tbaa !5
  br label %322

322:                                              ; preds = %336, %317
  %323 = load ptr, ptr %33, align 8, !tbaa !5
  %324 = load ptr, ptr %34, align 8, !tbaa !5
  %325 = load i8, ptr %32, align 1, !tbaa !9, !range !11, !noundef !12
  %326 = trunc i8 %325 to i1
  br i1 %326, label %328, label %327

327:                                              ; preds = %322
  store i32 44, ptr %7, align 4
  br label %337

328:                                              ; preds = %322
  %329 = load ptr, ptr %33, align 8, !tbaa !5
  %330 = load i8, ptr %329, align 1, !tbaa !9, !range !11, !noundef !12
  %331 = trunc i8 %330 to i1
  %332 = load ptr, ptr %34, align 8, !tbaa !5
  %333 = load i8, ptr %332, align 1, !tbaa !9, !range !11, !noundef !12
  %334 = trunc i8 %333 to i1
  %335 = call noundef i32 @_ZL3ordbb(i1 noundef zeroext %331, i1 noundef zeroext %334)
  store i32 %335, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %337

336:                                              ; No predecessors!
  store i8 0, ptr %32, align 1, !tbaa !9
  br label %322, !llvm.loop !36

337:                                              ; preds = %328, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  %338 = load i32, ptr %7, align 4
  switch i32 %338, label %341 [
    i32 44, label %339
  ]

339:                                              ; preds = %337
  br label %340

340:                                              ; preds = %339
  store i8 0, ptr %32, align 1, !tbaa !9
  br label %313, !llvm.loop !37

341:                                              ; preds = %337, %316
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  %342 = load i32, ptr %7, align 4
  switch i32 %342, label %420 [
    i32 41, label %343
  ]

343:                                              ; preds = %341
  br label %418

344:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #7
  store i8 1, ptr %35, align 1, !tbaa !9
  br label %345

345:                                              ; preds = %379, %344
  %346 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %347 = trunc i8 %346 to i1
  br i1 %347, label %349, label %348

348:                                              ; preds = %345
  store i32 47, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  br label %380

349:                                              ; preds = %345
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %350 = load ptr, ptr %8, align 8, !tbaa !5
  %351 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120) %350)
  store ptr %351, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %352 = load ptr, ptr %9, align 8, !tbaa !5
  %353 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120) %352)
  store ptr %353, ptr %37, align 8, !tbaa !5
  br label %354

354:                                              ; preds = %377, %349
  %355 = load ptr, ptr %36, align 8, !tbaa !5
  %356 = load ptr, ptr %37, align 8, !tbaa !5
  %357 = load i8, ptr %35, align 1, !tbaa !9, !range !11, !noundef !12
  %358 = trunc i8 %357 to i1
  br i1 %358, label %360, label %359

359:                                              ; preds = %354
  store i32 50, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %378

360:                                              ; preds = %354
  br label %361

361:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %362 = getelementptr inbounds %class.anon.213, ptr %41, i32 0, i32 0
  store ptr %38, ptr %362, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef %40)
          to label %363 unwind label %366

363:                                              ; preds = %361
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  %364 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %364, ptr noundef @.str.5)
          to label %365 unwind label %370

365:                                              ; preds = %363
  call void @__cxa_throw(ptr %364, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
  unreachable

366:                                              ; preds = %361
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %30, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %31, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %374

370:                                              ; preds = %363
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %30, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %31, align 4
  call void @__cxa_free_exception(ptr %364) #7
  br label %374

374:                                              ; preds = %370, %366
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  br label %422

375:                                              ; No predecessors!
  br label %376

376:                                              ; preds = %375
  br label %377

377:                                              ; preds = %376
  store i8 0, ptr %35, align 1, !tbaa !9
  br label %354, !llvm.loop !38

378:                                              ; preds = %359
  br label %379

379:                                              ; preds = %378
  store i8 0, ptr %35, align 1, !tbaa !9
  br label %345, !llvm.loop !39

380:                                              ; preds = %348
  br label %418

381:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #7
  store i8 1, ptr %42, align 1, !tbaa !9
  br label %382

382:                                              ; preds = %416, %381
  %383 = load i8, ptr %42, align 1, !tbaa !9, !range !11, !noundef !12
  %384 = trunc i8 %383 to i1
  br i1 %384, label %386, label %385

385:                                              ; preds = %382
  store i32 55, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #7
  br label %417

386:                                              ; preds = %382
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %387 = load ptr, ptr %8, align 8, !tbaa !5
  %388 = call noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120) %387)
  store ptr %388, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %389 = load ptr, ptr %9, align 8, !tbaa !5
  %390 = call noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120) %389)
  store ptr %390, ptr %44, align 8, !tbaa !5
  br label %391

391:                                              ; preds = %414, %386
  %392 = load ptr, ptr %43, align 8, !tbaa !5
  %393 = load ptr, ptr %44, align 8, !tbaa !5
  %394 = load i8, ptr %42, align 1, !tbaa !9, !range !11, !noundef !12
  %395 = trunc i8 %394 to i1
  br i1 %395, label %397, label %396

396:                                              ; preds = %391
  store i32 58, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %415

397:                                              ; preds = %391
  br label %398

398:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %46)
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  %399 = getelementptr inbounds %class.anon.214, ptr %48, i32 0, i32 0
  store ptr %45, ptr %399, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(8) %48) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef %47)
          to label %400 unwind label %403

400:                                              ; preds = %398
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  %401 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %401, ptr noundef @.str.5)
          to label %402 unwind label %407

402:                                              ; preds = %400
  call void @__cxa_throw(ptr %401, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
  unreachable

403:                                              ; preds = %398
  %404 = landingpad { ptr, i32 }
          cleanup
  %405 = extractvalue { ptr, i32 } %404, 0
  store ptr %405, ptr %30, align 8
  %406 = extractvalue { ptr, i32 } %404, 1
  store i32 %406, ptr %31, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  br label %411

407:                                              ; preds = %400
  %408 = landingpad { ptr, i32 }
          cleanup
  %409 = extractvalue { ptr, i32 } %408, 0
  store ptr %409, ptr %30, align 8
  %410 = extractvalue { ptr, i32 } %408, 1
  store i32 %410, ptr %31, align 4
  call void @__cxa_free_exception(ptr %401) #7
  br label %411

411:                                              ; preds = %407, %403
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #7
  br label %422

412:                                              ; No predecessors!
  br label %413

413:                                              ; preds = %412
  br label %414

414:                                              ; preds = %413
  store i8 0, ptr %42, align 1, !tbaa !9
  br label %391, !llvm.loop !40

415:                                              ; preds = %396
  br label %416

416:                                              ; preds = %415
  store i8 0, ptr %42, align 1, !tbaa !9
  br label %382, !llvm.loop !41

417:                                              ; preds = %385
  br label %418

418:                                              ; preds = %417, %380, %343, %311, %274, %188, %102, %74
  br label %419

419:                                              ; preds = %418
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %70, !llvm.loop !42

420:                                              ; preds = %341, %272, %186, %100, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %421 = load i32, ptr %7, align 4
  switch i32 %421, label %425 [
    i32 5, label %423
  ]

422:                                              ; preds = %411, %374, %305
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %431

423:                                              ; preds = %420
  br label %424

424:                                              ; preds = %423
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %63, !llvm.loop !43

425:                                              ; preds = %420, %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %426 = load i32, ptr %7, align 4
  switch i32 %426, label %436 [
    i32 2, label %427
    i32 1, label %429
  ]

427:                                              ; preds = %425
  %428 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.22, ptr %428, align 16, !tbaa !5
  call void @__cxa_throw(ptr %428, ptr @_ZTIPKc, ptr null) #9
  unreachable

429:                                              ; preds = %425, %61, %60
  %430 = load i32, ptr %3, align 4
  ret i32 %430

431:                                              ; preds = %422
  %432 = load ptr, ptr %30, align 8
  %433 = load i32, ptr %31, align 4
  %434 = insertvalue { ptr, i32 } poison, ptr %432, 0
  %435 = insertvalue { ptr, i32 } %434, i32 %433, 1
  resume { ptr, i32 } %435

436:                                              ; preds = %425
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 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 = { 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 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 #4 = { 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 #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 = { 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 }
attributes #8 = { noreturn nounwind }
attributes #9 = { noreturn }

!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 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSN11PatternRule12Data_VariantE", !18, i64 0, !19, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSSt6vectorI11PatternRuleSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI11PatternRuleSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI11PatternRuleSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI11PatternRuleSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!18, !18, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTS8Ordering", !7, i64 0}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = !{!30, !18, i64 0}
!30 = !{!"_ZTSN11PatternRule10Data_SliceE", !18, i64 0, !19, i64 8}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = distinct !{!33, !14}
!34 = distinct !{!34, !14}
!35 = distinct !{!35, !14}
!36 = distinct !{!36, !14}
!37 = distinct !{!37, !14}
!38 = distinct !{!38, !14}
!39 = distinct !{!39, !14}
!40 = distinct !{!40, !14}
!41 = distinct !{!41, !14}
!42 = distinct !{!42, !14}
!43 = distinct !{!43, !14}


; 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.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.212 = type { ptr }
%class.anon.213 = type { ptr }
%class.anon.214 = type { ptr }

@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_ = external hidden unnamed_addr constant [91 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_ = external hidden unnamed_addr constant [15 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

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), 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 #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL3ordjj(i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL3ordbb(i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(120) %1) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.Span, align 8
  %5 = alloca %"class.std::function", align 8
  %6 = alloca %class.anon.212, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.Span, align 8
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %class.anon.213, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.Span, align 8
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon.214, align 8
  %15 = tail call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %16 = tail call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  %.not = icmp eq i32 %15, %16
  %17 = tail call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  br i1 %.not, label %.preheader197, label %18

18:                                               ; preds = %2
  %19 = tail call noundef i32 @_ZNK11PatternRule3tagEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  %20 = icmp slt i32 %17, %19
  %. = select i1 %20, i32 1, i32 -1
  br label %.thread177

.preheader197:                                    ; preds = %2
  switch i32 %17, label %.thread171 [
    i32 0, label %.split.us
    i32 7, label %.split201.us
    i32 1, label %.split203.us
    i32 2, label %.split205.us
    i32 3, label %.split207.us
    i32 4, label %.split209.us
    i32 5, label %.split211.us
    i32 6, label %.split213.us
  ], !llvm.loop !5

.split.us:                                        ; preds = %.preheader197
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.17, i32 noundef 765, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #7
  unreachable

.split201.us:                                     ; preds = %.preheader197
  %21 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %22 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule6as_AnyEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  br label %.thread177

.split203.us:                                     ; preds = %.preheader197
  %23 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %24 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule10as_VariantEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  %25 = load i32, ptr %23, align 8, !tbaa !7
  %26 = load i32, ptr %24, align 8, !tbaa !7
  %.not161 = icmp eq i32 %25, %26
  br i1 %.not161, label %29, label %27

27:                                               ; preds = %.split203.us
  %28 = tail call noundef i32 @_ZL3ordjj(i32 noundef %25, i32 noundef %26)
  br label %.thread177

29:                                               ; preds = %.split203.us
  %30 = getelementptr inbounds i8, ptr %23, i64 8
  %31 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %32 = getelementptr inbounds i8, ptr %24, i64 8
  %33 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  %34 = icmp eq i64 %31, %33
  br i1 %34, label %.preheader, label %36

.preheader:                                       ; preds = %29
  %35 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %.not163218.not = icmp eq i64 %35, 0
  br i1 %.not163218.not, label %.thread177, label %.lr.ph220

36:                                               ; preds = %29
  tail call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.17, i32 noundef 772, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #7
  unreachable

37:                                               ; preds = %.lr.ph220
  %38 = add i32 %.0131219, 1
  %39 = zext i32 %38 to i64
  %40 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %.not163 = icmp ugt i64 %40, %39
  br i1 %.not163, label %.lr.ph220, label %.thread177, !llvm.loop !17

.lr.ph220:                                        ; preds = %.preheader, %37
  %41 = phi i64 [ %39, %37 ], [ 0, %.preheader ]
  %.0131219 = phi i32 [ %38, %37 ], [ 0, %.preheader ]
  %42 = tail call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %41) #8
  %43 = tail call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %41) #8
  %44 = tail call noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %42, ptr noundef nonnull align 8 dereferenceable(120) %43)
  %.not162 = icmp eq i32 %44, 0
  br i1 %.not162, label %37, label %.thread177

.split205.us:                                     ; preds = %.preheader197
  %45 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %46 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11PatternRule8as_SliceEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  %47 = load i32, ptr %45, align 8, !tbaa !18
  %48 = load i32, ptr %46, align 8, !tbaa !18
  %.not158 = icmp eq i32 %47, %48
  br i1 %.not158, label %51, label %49

49:                                               ; preds = %.split205.us
  %50 = tail call noundef i32 @_ZL3ordjj(i32 noundef %47, i32 noundef %48)
  br label %.thread177

51:                                               ; preds = %.split205.us
  %52 = getelementptr inbounds i8, ptr %45, i64 8
  %53 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #8
  %54 = getelementptr inbounds i8, ptr %46, i64 8
  %55 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #8
  %56 = icmp eq i64 %53, %55
  br i1 %56, label %.preheader194, label %58

.preheader194:                                    ; preds = %51
  %57 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #8
  %.not160214.not = icmp eq i64 %57, 0
  br i1 %.not160214.not, label %.thread177, label %.lr.ph

58:                                               ; preds = %51
  tail call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.17, i32 noundef 785, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_) #7
  unreachable

59:                                               ; preds = %.lr.ph
  %60 = add i32 %.0142215, 1
  %61 = zext i32 %60 to i64
  %62 = tail call noundef i64 @_ZNKSt6vectorI11PatternRuleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #8
  %.not160 = icmp ugt i64 %62, %61
  br i1 %.not160, label %.lr.ph, label %.thread177, !llvm.loop !20

.lr.ph:                                           ; preds = %.preheader194, %59
  %63 = phi i64 [ %61, %59 ], [ 0, %.preheader194 ]
  %.0142215 = phi i32 [ %60, %59 ], [ 0, %.preheader194 ]
  %64 = tail call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %63) #8
  %65 = tail call noundef nonnull align 8 dereferenceable(120) ptr @_ZNKSt6vectorI11PatternRuleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %63) #8
  %66 = tail call noundef i32 @_ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_(ptr noundef nonnull align 8 dereferenceable(120) %64, ptr noundef nonnull align 8 dereferenceable(120) %65)
  %.not159 = icmp eq i32 %66, 0
  br i1 %.not159, label %59, label %.thread177

.split207.us:                                     ; preds = %.preheader197
  %67 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %68 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK11PatternRule13as_SplitSliceEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %3, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store ptr %3, ptr %6, align 8, !tbaa !21
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %5)
          to label %69 unwind label %72

69:                                               ; preds = %.split207.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %70 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull @.str.5)
          to label %71 unwind label %74

71:                                               ; preds = %69
  call void @__cxa_throw(ptr nonnull %70, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
  unreachable

72:                                               ; preds = %.split207.us
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %76

74:                                               ; preds = %69
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %70) #8
  br label %76

76:                                               ; preds = %74, %72
  %.pn155 = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %104

.split209.us:                                     ; preds = %.preheader197
  %77 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %78 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK11PatternRule7as_BoolEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  %79 = load i8, ptr %77, align 1, !tbaa !22, !range !24, !noundef !25
  %80 = trunc nuw i8 %79 to i1
  %81 = load i8, ptr %78, align 1, !tbaa !22, !range !24, !noundef !25
  %82 = trunc nuw i8 %81 to i1
  %83 = tail call noundef i32 @_ZL3ordbb(i1 noundef zeroext %80, i1 noundef zeroext %82)
  br label %.thread177

.split211.us:                                     ; preds = %.preheader197
  %84 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %85 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK11PatternRule8as_ValueEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %7, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store ptr %7, ptr %10, align 8, !tbaa !21
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %9)
          to label %86 unwind label %89

86:                                               ; preds = %.split211.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %87 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull @.str.5)
          to label %88 unwind label %91

88:                                               ; preds = %86
  call void @__cxa_throw(ptr nonnull %87, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
  unreachable

89:                                               ; preds = %.split211.us
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %93

91:                                               ; preds = %86
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %87) #8
  br label %93

93:                                               ; preds = %91, %89
  %.pn153 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %104

.split213.us:                                     ; preds = %.preheader197
  %94 = tail call noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %95 = tail call noundef nonnull align 8 dereferenceable(81) ptr @_ZNK11PatternRule13as_ValueRangeEv(ptr noundef nonnull align 8 dereferenceable(120) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store ptr @__func__._ZN14PatternRuleset14rule_is_beforeERK11PatternRuleS2_, ptr %11, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  store ptr %11, ptr %14, align 8, !tbaa !21
  call void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %13)
          to label %96 unwind label %99

96:                                               ; preds = %.split213.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %97 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %97, ptr noundef nonnull @.str.5)
          to label %98 unwind label %101

98:                                               ; preds = %96
  call void @__cxa_throw(ptr nonnull %97, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
  unreachable

99:                                               ; preds = %.split213.us
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %103

101:                                              ; preds = %96
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %97) #8
  br label %103

103:                                              ; preds = %101, %99
  %.pn = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %104

104:                                              ; preds = %103, %93, %76
  %.pn.pn = phi { ptr, i32 } [ %.pn, %103 ], [ %.pn153, %93 ], [ %.pn155, %76 ]
  resume { ptr, i32 } %.pn.pn

.thread171:                                       ; preds = %.preheader197
  %105 = tail call ptr @__cxa_allocate_exception(i64 8) #8
  store ptr @.str.22, ptr %105, align 16, !tbaa !21
  tail call void @__cxa_throw(ptr nonnull %105, ptr nonnull @_ZTIPKc, ptr null) #9
  unreachable

.thread177:                                       ; preds = %59, %.lr.ph, %37, %.lr.ph220, %.preheader194, %.preheader, %.split209.us, %.split201.us, %27, %49, %18
  %.23 = phi i32 [ %., %18 ], [ %83, %.split209.us ], [ 0, %.split201.us ], [ %28, %27 ], [ %50, %49 ], [ 0, %.preheader ], [ 0, %.preheader194 ], [ 0, %37 ], [ %44, %.lr.ph220 ], [ 0, %59 ], [ %66, %.lr.ph ]
  ret i32 %.23
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZN14PatternRuleset14rule_is_beforeERK11PatternRuleS7_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 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 = { 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 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 #4 = { 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 #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 = { 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 = { noreturn nounwind }
attributes #8 = { nounwind }
attributes #9 = { noreturn }

!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}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTSN11PatternRule12Data_VariantE", !9, i64 0, !12, i64 8}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSSt6vectorI11PatternRuleSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI11PatternRuleSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI11PatternRuleSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI11PatternRuleSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !10, i64 0}
!17 = distinct !{!17, !6}
!18 = !{!19, !9, i64 0}
!19 = !{!"_ZTSN11PatternRule10Data_SliceE", !9, i64 0, !12, i64 8}
!20 = distinct !{!20, !6}
!21 = !{!16, !16, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !10, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}


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