; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/46 Beta Division 2/Problem E (E)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }

@rules = external dso_local global [26 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7buildDPPA51_A26_iRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %43, %2
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %46

26:                                               ; preds = %21
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [51 x [26 x i32]], ptr %27, i64 %29
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [51 x [26 x i32]], ptr %30, i64 0, i64 %32
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %34, i64 noundef %36)
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  %40 = sub nsw i32 %39, 97
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [26 x i32], ptr %33, i64 0, i64 %41
  store i32 1, ptr %42, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %26
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %6, align 4, !tbaa !9
  br label %21, !llvm.loop !12

46:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %158, %46
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %161

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = sub nsw i32 %53, 1
  store i32 %54, ptr %10, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %152, %52
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %157

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %148, %60
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = icmp slt i32 %62, 26
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %151

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 0, ptr %12, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %66 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %66, ptr %13, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %144, %65
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %75

71:                                               ; preds = %67
  %72 = load i8, ptr %12, align 1, !tbaa !14, !range !16, !noundef !17
  %73 = trunc i8 %72 to i1
  %74 = xor i1 %73, true
  br label %75

75:                                               ; preds = %71, %67
  %76 = phi i1 [ false, %67 ], [ %74, %71 ]
  br i1 %76, label %78, label %77

77:                                               ; preds = %75
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %147

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [26 x %"class.std::vector"], ptr @rules, i64 0, i64 %80
  %82 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #4
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  br label %84

84:                                               ; preds = %140, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [26 x %"class.std::vector"], ptr @rules, i64 0, i64 %86
  %88 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %87) #4
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  %90 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br i1 %90, label %92, label %91

91:                                               ; preds = %84
  store i32 17, ptr %8, align 4
  br label %142

92:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %93 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %94 = getelementptr inbounds %"struct.std::pair", ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 4, !tbaa !18
  store i32 %95, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %96 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %97 = getelementptr inbounds %"struct.std::pair", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !20
  store i32 %98, ptr %17, align 4, !tbaa !9
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [51 x [26 x i32]], ptr %99, i64 %101
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [51 x [26 x i32]], ptr %102, i64 0, i64 %104
  %106 = load i32, ptr %16, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [26 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %136

111:                                              ; preds = %92
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [51 x [26 x i32]], ptr %112, i64 %115
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [51 x [26 x i32]], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [26 x i32], ptr %119, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %136

125:                                              ; preds = %111
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [51 x [26 x i32]], ptr %126, i64 %128
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [51 x [26 x i32]], ptr %129, i64 0, i64 %131
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [26 x i32], ptr %132, i64 0, i64 %134
  store i32 1, ptr %135, align 4, !tbaa !9
  store i8 1, ptr %12, align 1, !tbaa !14
  store i32 17, ptr %8, align 4
  br label %137

136:                                              ; preds = %111, %92
  store i32 0, ptr %8, align 4
  br label %137

137:                                              ; preds = %136, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %138 = load i32, ptr %8, align 4
  switch i32 %138, label %142 [
    i32 0, label %139
  ]

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br label %84, !llvm.loop !21

142:                                              ; preds = %137, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %13, align 4, !tbaa !9
  br label %67, !llvm.loop !22

147:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %11, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %11, align 4, !tbaa !9
  br label %61, !llvm.loop !23

151:                                              ; preds = %64
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %9, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %9, align 4, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %10, align 4, !tbaa !9
  br label %55, !llvm.loop !24

157:                                              ; preds = %59
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %7, align 4, !tbaa !9
  br label %47, !llvm.loop !25

161:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!20 = !{!19, !10, i64 4}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@rules = external dso_local global [26 x %"class.std::vector"], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z7buildDPPA51_A26_iRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr nocapture noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #3
  %6 = trunc i64 %5 to i32
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph.preheader, label %._crit_edge69

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = and i64 %5, 2147483647
  br label %.lr.ph

.preheader54:                                     ; preds = %.lr.ph
  %.not66 = icmp eq i32 %6, 1
  br i1 %.not66, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %.preheader54
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 5304
  %wide.trip.count93 = and i64 %5, 2147483647
  br label %.preheader53.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %8 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %10 = sext i8 %9 to i64
  %11 = add nsw i64 %10, -97
  %12 = getelementptr inbounds [51 x [26 x i32]], ptr %0, i64 %indvars.iv, i64 %indvars.iv, i64 %11
  store i32 1, ptr %12, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader54, label %.lr.ph, !llvm.loop !10

._crit_edge69:                                    ; preds = %._crit_edge65, %2, %.preheader54
  ret void

.preheader53.preheader:                           ; preds = %._crit_edge65, %.lr.ph68
  %indvars.iv89.in = phi i32 [ %6, %.lr.ph68 ], [ %indvars.iv89, %._crit_edge65 ]
  %indvars.iv82 = phi i64 [ 1, %.lr.ph68 ], [ %indvars.iv.next83, %._crit_edge65 ]
  %indvars.iv89 = add i32 %indvars.iv89.in, -1
  %wide.trip.count91 = zext i32 %indvars.iv89 to i64
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %.split.us, %.preheader53.preheader
  %indvars.iv84 = phi i64 [ %indvars.iv82, %.preheader53.preheader ], [ %indvars.iv.next85, %.split.us ]
  %indvars.iv74 = phi i64 [ 0, %.preheader53.preheader ], [ %indvars.iv.next75, %.split.us ]
  br label %.preheader

._crit_edge65:                                    ; preds = %.split.us
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count93
  br i1 %exitcond94.not, label %._crit_edge69, label %.preheader53.preheader, !llvm.loop !12

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv78 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next79, %._crit_edge ]
  %13 = getelementptr inbounds [26 x %"class.std::vector"], ptr @rules, i64 0, i64 %indvars.iv78
  %14 = getelementptr inbounds [51 x [26 x i32]], ptr %0, i64 %indvars.iv74, i64 %indvars.iv84, i64 %indvars.iv78
  br label %15

.split.us:                                        ; preds = %._crit_edge
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge65, label %.preheader.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %.loopexit, %.loopexit.thread
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond81.not = icmp eq i64 %indvars.iv.next79, 26
  br i1 %exitcond81.not, label %.split.us, label %.preheader, !llvm.loop !14

15:                                               ; preds = %.preheader, %.loopexit
  %indvars.iv76 = phi i64 [ %indvars.iv74, %.preheader ], [ %indvars.iv.next77, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %16 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  store ptr %16, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %17 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  store ptr %17, ptr %4, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %18, label %.lr.ph57, label %.loopexit

.lr.ph57:                                         ; preds = %15, %31
  %19 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %20 = load i32, ptr %19, align 4, !tbaa !15
  %21 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  %22 = sext i32 %20 to i64
  %23 = getelementptr inbounds [51 x [26 x i32]], ptr %0, i64 %indvars.iv74, i64 %indvars.iv76, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !8
  %.not48 = icmp eq i32 %24, 0
  br i1 %.not48, label %31, label %25

25:                                               ; preds = %.lr.ph57
  %26 = getelementptr inbounds i8, ptr %21, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !17
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [51 x [26 x i32]], ptr %invariant.gep, i64 %indvars.iv76, i64 %indvars.iv84, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !8
  %.not49 = icmp eq i32 %30, 0
  br i1 %.not49, label %31, label %.loopexit.thread

.loopexit.thread:                                 ; preds = %25
  store i32 1, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %._crit_edge

31:                                               ; preds = %25, %.lr.ph57
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %33 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #3
  store ptr %33, ptr %4, align 8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %34, label %.lr.ph57, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %31, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %.not = icmp ult i64 %indvars.iv.next77, %indvars.iv84
  br i1 %.not, label %15, label %._crit_edge, !llvm.loop !19
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIiiE", !9, i64 0, !9, i64 4}
!17 = !{!16, !9, i64 4}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass