; LLVM IR from tangjz/acm-icpc :: hdu (6136)

; 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.Node = type { i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<Event, Event, std::_Identity<Event>, std::less<Event>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Event, Event, std::_Identity<Event>, std::less<Event>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%struct.Event = type { i32 }
%"struct.std::pair.6" = type <{ %"struct.std::_Rb_tree_const_iterator.8", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator.8" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [100001 x i32], align 16
@b = external dso_local global [100001 x i32], align 16
@ord = external dso_local global [100001 x i32], align 16
@f = external dso_local global [100001 x %struct.Node], align 16
@sp = external dso_local global %"class.std::set", align 8
@tim = external dso_local global %"class.std::set.0", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::set", align 8
  %3 = alloca %"class.std::set.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.Event, align 4
  %12 = alloca %"struct.std::pair.6", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator.8", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.Event, align 4
  %18 = alloca %struct.Event, align 4
  %19 = alloca %struct.Event, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.Event, align 4
  %23 = alloca %"struct.std::pair.6", align 8
  store i32 0, ptr %1, align 4
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %25

25:                                               ; preds = %326, %0
  %26 = load i32, ptr @t, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr @t, align 4, !tbaa !5
  %28 = icmp ne i32 %26, 0
  br i1 %28, label %29, label %327

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 48, ptr %2) #7
  call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 48, i1 false)
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) @sp) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #7
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 48, i1 false)
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE4swapERS4_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) @tim) #7
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #7
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %45, %29
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %48

36:                                               ; preds = %31
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i32, ptr @a, i64 %38
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %39)
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %43
  store i32 %41, ptr %44, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %36
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !9

48:                                               ; preds = %35
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @ord, i64 %50
  %52 = getelementptr inbounds i32, ptr %51, i64 1
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef getelementptr inbounds (i32, ptr @ord, i64 1), ptr noundef %52, ptr noundef @_Z3cmpRKiS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %68, %48
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %71

58:                                               ; preds = %53
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr @b, i64 %60
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %61)
  %63 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %64 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %65 = extractvalue { ptr, i8 } %63, 0
  store ptr %65, ptr %64, align 8
  %66 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %67 = extractvalue { ptr, i8 } %63, 1
  store i8 %67, ptr %66, align 8
  br label %68

68:                                               ; preds = %58
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %5, align 4, !tbaa !5
  br label %53, !llvm.loop !11

71:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %182, %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp sle i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %185

77:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = load i32, ptr @n, align 4, !tbaa !5
  br label %85

82:                                               ; preds = %77
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  br label %85

85:                                               ; preds = %82, %80
  %86 = phi i32 [ %81, %80 ], [ %84, %82 ]
  store i32 %86, ptr %8, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp ne i32 %93, %100
  br i1 %101, label %102, label %153

102:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sub nsw i32 %109, %116
  store i32 %117, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %118 = load i32, ptr %7, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sub nsw i32 %124, %131
  store i32 %132, ptr %10, align 4, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = icmp slt i32 %133, 0
  br i1 %134, label %135, label %140

135:                                              ; preds = %102
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = sub nsw i32 0, %136
  store i32 %137, ptr %9, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sub nsw i32 0, %138
  store i32 %139, ptr %10, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %135, %102
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = icmp slt i32 %141, 0
  br i1 %142, label %143, label %147

143:                                              ; preds = %140
  %144 = load i32, ptr @m, align 4, !tbaa !5
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = add nsw i32 %145, %144
  store i32 %146, ptr %9, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %143, %140
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %149
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = load i32, ptr %10, align 4, !tbaa !5
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %150, i32 noundef %151, i32 noundef %152)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %174

153:                                              ; preds = %85
  %154 = load i32, ptr %7, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %155
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr %7, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = icmp eq i32 %163, %170
  %172 = zext i1 %171 to i64
  %173 = select i1 %171, i32 0, i32 1061109567
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %156, i32 noundef %173, i32 noundef 1)
  br label %174

174:                                              ; preds = %153, %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %175 = getelementptr inbounds %struct.Event, ptr %11, i32 0, i32 0
  %176 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %176, ptr %175, align 4, !tbaa !12
  %177 = call { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %178 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %179 = extractvalue { ptr, i8 } %177, 0
  store ptr %179, ptr %178, align 8
  %180 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %181 = extractvalue { ptr, i8 } %177, 1
  store i8 %181, ptr %180, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %182

182:                                              ; preds = %174
  %183 = load i32, ptr %7, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %7, align 4, !tbaa !5
  br label %72, !llvm.loop !14

185:                                              ; preds = %76
  br label %186

186:                                              ; preds = %325, %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %187 = call ptr @_ZNKSt3setI5EventSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @tim) #7
  %188 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.8", ptr %14, i32 0, i32 0
  store ptr %187, ptr %188, align 8
  %189 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI5EventEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %190 = getelementptr inbounds %struct.Event, ptr %189, i32 0, i32 0
  %191 = load i32, ptr %190, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  store i32 %191, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %192 = load i32, ptr %13, align 4, !tbaa !5
  %193 = call noundef i32 @_Z4lefti(i32 noundef %192)
  store i32 %193, ptr %15, align 4, !tbaa !5
  %194 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @sp) #7
  %195 = icmp eq i64 %194, 2
  br i1 %195, label %196, label %200

196:                                              ; preds = %186
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %198
  call void @_ZN4Node5printEv(ptr noundef nonnull align 4 dereferenceable(8) %199)
  store i32 14, ptr %16, align 4
  br label %323

200:                                              ; preds = %186
  %201 = load i32, ptr %15, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = load i32, ptr %13, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = icmp slt i32 %204, %208
  br i1 %209, label %210, label %217

210:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %211 = getelementptr inbounds %struct.Event, ptr %17, i32 0, i32 0
  %212 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %212, ptr %211, align 4, !tbaa !12
  %213 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %214 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = call noundef i32 @_Z4lefti(i32 noundef %215)
  store i32 %216, ptr %15, align 4, !tbaa !5
  br label %224

217:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %218 = getelementptr inbounds %struct.Event, ptr %18, i32 0, i32 0
  %219 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %219, ptr %218, align 4, !tbaa !12
  %220 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %221 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %222 = load i32, ptr %15, align 4, !tbaa !5
  %223 = call noundef i32 @_Z5righti(i32 noundef %222)
  store i32 %223, ptr %13, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %217, %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %225 = getelementptr inbounds %struct.Event, ptr %19, i32 0, i32 0
  %226 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %226, ptr %225, align 4, !tbaa !12
  %227 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %228 = load i32, ptr %15, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !5
  %235 = load i32, ptr %13, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = icmp ne i32 %234, %241
  br i1 %242, label %243, label %294

243:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %244 = load i32, ptr %15, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = load i32, ptr %13, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = sub nsw i32 %250, %257
  store i32 %258, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %259 = load i32, ptr %13, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !5
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %267
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = sub nsw i32 %265, %272
  store i32 %273, ptr %21, align 4, !tbaa !5
  %274 = load i32, ptr %21, align 4, !tbaa !5
  %275 = icmp slt i32 %274, 0
  br i1 %275, label %276, label %281

276:                                              ; preds = %243
  %277 = load i32, ptr %20, align 4, !tbaa !5
  %278 = sub nsw i32 0, %277
  store i32 %278, ptr %20, align 4, !tbaa !5
  %279 = load i32, ptr %21, align 4, !tbaa !5
  %280 = sub nsw i32 0, %279
  store i32 %280, ptr %21, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %276, %243
  %282 = load i32, ptr %20, align 4, !tbaa !5
  %283 = icmp slt i32 %282, 0
  br i1 %283, label %284, label %288

284:                                              ; preds = %281
  %285 = load i32, ptr @m, align 4, !tbaa !5
  %286 = load i32, ptr %20, align 4, !tbaa !5
  %287 = add nsw i32 %286, %285
  store i32 %287, ptr %20, align 4, !tbaa !5
  br label %288

288:                                              ; preds = %284, %281
  %289 = load i32, ptr %13, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %290
  %292 = load i32, ptr %20, align 4, !tbaa !5
  %293 = load i32, ptr %21, align 4, !tbaa !5
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %291, i32 noundef %292, i32 noundef %293)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %315

294:                                              ; preds = %224
  %295 = load i32, ptr %13, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %296
  %298 = load i32, ptr %15, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %302
  %304 = load i32, ptr %303, align 4, !tbaa !5
  %305 = load i32, ptr %13, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %306
  %308 = load i32, ptr %307, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = icmp eq i32 %304, %311
  %313 = zext i1 %312 to i64
  %314 = select i1 %312, i32 0, i32 1061109567
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %297, i32 noundef %314, i32 noundef 1)
  br label %315

315:                                              ; preds = %294, %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %316 = getelementptr inbounds %struct.Event, ptr %22, i32 0, i32 0
  %317 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %317, ptr %316, align 4, !tbaa !12
  %318 = call { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %319 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %320 = extractvalue { ptr, i8 } %318, 0
  store ptr %320, ptr %319, align 8
  %321 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %322 = extractvalue { ptr, i8 } %318, 1
  store i8 %322, ptr %321, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  store i32 0, ptr %16, align 4
  br label %323

323:                                              ; preds = %315, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %324 = load i32, ptr %16, align 4
  switch i32 %324, label %328 [
    i32 0, label %325
    i32 14, label %326
  ]

325:                                              ; preds = %323
  br label %186, !llvm.loop !15

326:                                              ; preds = %323
  br label %25, !llvm.loop !16

327:                                              ; preds = %25
  ret i32 0

328:                                              ; preds = %323
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE4swapERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z4lefti(i32 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Node5printEv(ptr noundef nonnull align 4 dereferenceable(8)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z5righti(i32 noundef) #5

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS5Event", !6, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; 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.Node = type { i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<Event, Event, std::_Identity<Event>, std::less<Event>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Event, Event, std::_Identity<Event>, std::less<Event>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%struct.Event = type { i32 }
%"struct.std::_Rb_tree_const_iterator.8" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [100001 x i32], align 16
@b = external dso_local global [100001 x i32], align 16
@ord = external dso_local global [100001 x i32], align 16
@f = external dso_local global [100001 x %struct.Node], align 16
@sp = external dso_local global %"class.std::set", align 8
@tim = external dso_local global %"class.std::set.0", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::set.0", align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.Event, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator.8", align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.Event, align 4
  %9 = alloca %struct.Event, align 4
  %10 = alloca %struct.Event, align 4
  %11 = alloca %struct.Event, align 4
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %13 = load i32, ptr @t, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr @t, align 4, !tbaa !5
  %.not74 = icmp eq i32 %13, 0
  br i1 %.not74, label %._crit_edge77, label %.lr.ph76

.loopexit:                                        ; preds = %164, %.preheader
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %16
  call void @_ZN4Node5printEv(ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %18 = load i32, ptr @t, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %._crit_edge77, label %.lr.ph76, !llvm.loop !9

.lr.ph76:                                         ; preds = %0, %.loopexit
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %1, i8 0, i64 48, i1 false)
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) @sp) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, i8 0, i64 48, i1 false)
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE4swapERS4_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) @tim) #8
  call void @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %.not5763 = icmp slt i32 %21, 1
  br i1 %.not5763, label %.lr.ph76.._crit_edge_crit_edge, label %.lr.ph

.lr.ph76.._crit_edge_crit_edge:                   ; preds = %.lr.ph76
  %.pre84 = sext i32 %21 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph76.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre84, %.lr.ph76.._crit_edge_crit_edge ], [ %28, %.lr.ph ]
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @ord, i64 4), i64 %.pre-phi
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @ord, i64 4), ptr noundef nonnull %gep, ptr noundef nonnull @_Z3cmpRKiS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  %22 = load i32, ptr @n, align 4
  %.not5865 = icmp slt i32 %22, 1
  br i1 %.not5865, label %._crit_edge69.thread, label %.lr.ph68

._crit_edge69.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph76, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph76 ]
  %23 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %23)
  %25 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv
  %26 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %26, ptr %25, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %.not57.not = icmp slt i64 %indvars.iv, %28
  br i1 %.not57.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge69:                                    ; preds = %.lr.ph68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %.not5970 = icmp slt i32 %63, 1
  br i1 %.not5970, label %.preheader, label %.lr.ph73.preheader

.lr.ph73.preheader:                               ; preds = %._crit_edge69
  %29 = zext nneg i32 %63 to i64
  %30 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @ord, i64 4), align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %.not61.peel = icmp eq i32 %34, %38
  %39 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %32
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %36
  %42 = load i32, ptr %41, align 4, !tbaa !5
  br i1 %.not61.peel, label %51, label %43

43:                                               ; preds = %.lr.ph73.preheader
  %44 = sub nsw i32 %40, %42
  %45 = sub nsw i32 %38, %34
  %46 = icmp slt i32 %45, 0
  %47 = sub nsw i32 0, %44
  %.045.peel = call i32 @llvm.abs.i32(i32 %45, i1 true)
  %.043.peel = select i1 %46, i32 %47, i32 %44
  %48 = icmp slt i32 %.043.peel, 0
  %49 = load i32, ptr @m, align 4
  %50 = select i1 %48, i32 %49, i32 0
  %.144.peel = add nsw i32 %50, %.043.peel
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @f, i64 8), i32 noundef %.144.peel, i32 noundef %.045.peel)
  br label %54

51:                                               ; preds = %.lr.ph73.preheader
  %52 = icmp eq i32 %40, %42
  %53 = select i1 %52, i32 0, i32 1061109567
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @f, i64 8), i32 noundef %53, i32 noundef 1)
  br label %54

54:                                               ; preds = %51, %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 1, ptr %4, align 4, !tbaa !12
  %55 = call { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %56 = load i32, ptr @n, align 4
  %.not59.not.peel = icmp sgt i32 %56, 1
  br i1 %.not59.not.peel, label %.lr.ph73, label %.preheader

.lr.ph68:                                         ; preds = %._crit_edge, %.lr.ph68
  %storemerge66 = phi i32 [ %62, %.lr.ph68 ], [ 1, %._crit_edge ]
  %57 = sext i32 %storemerge66 to i64
  %58 = getelementptr inbounds i32, ptr @b, i64 %57
  %59 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %58)
  %60 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !5
  %63 = load i32, ptr @n, align 4
  %.not58.not = icmp slt i32 %61, %63
  br i1 %.not58.not, label %.lr.ph68, label %._crit_edge69, !llvm.loop !14

.preheader:                                       ; preds = %102, %54, %._crit_edge69.thread, %._crit_edge69
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %64 = call ptr @_ZNKSt3setI5EventSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @tim) #8
  store ptr %64, ptr %6, align 8
  %65 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI5EventEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %66 = load i32, ptr %65, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  store i32 %66, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %67 = call noundef i32 @_Z4lefti(i32 noundef %66)
  store i32 %67, ptr %7, align 4, !tbaa !5
  %68 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @sp) #8
  %.not6289 = icmp eq i64 %68, 2
  br i1 %.not6289, label %.loopexit, label %.lr.ph90

.lr.ph73:                                         ; preds = %54, %102
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %102 ], [ 2, %54 ]
  %69 = shl i64 %indvars.iv80, 32
  %sext = add i64 %69, -4294967296
  %70 = ashr exact i64 %sext, 32
  %71 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %indvars.iv80
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %.not61 = icmp eq i32 %75, %80
  br i1 %.not61, label %94, label %81

81:                                               ; preds = %.lr.ph73
  %82 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %73
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %78
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sub nsw i32 %83, %85
  %87 = sub nsw i32 %80, %75
  %88 = icmp slt i32 %87, 0
  %89 = sub nsw i32 0, %86
  %.045 = call i32 @llvm.abs.i32(i32 %87, i1 true)
  %.043 = select i1 %88, i32 %89, i32 %86
  %90 = icmp slt i32 %.043, 0
  %91 = load i32, ptr @m, align 4
  %92 = select i1 %90, i32 %91, i32 0
  %.144 = add nsw i32 %92, %.043
  %93 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %indvars.iv80
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %93, i32 noundef %.144, i32 noundef %.045)
  br label %102

94:                                               ; preds = %.lr.ph73
  %95 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %indvars.iv80
  %96 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %73
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %78
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp eq i32 %97, %99
  %101 = select i1 %100, i32 0, i32 1061109567
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %95, i32 noundef %101, i32 noundef 1)
  br label %102

102:                                              ; preds = %94, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %103 = trunc nuw nsw i64 %indvars.iv80 to i32
  store i32 %103, ptr %4, align 4, !tbaa !12
  %104 = call { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %105 = load i32, ptr @n, align 4
  %106 = sext i32 %105 to i64
  %.not59.not = icmp slt i64 %indvars.iv80, %106
  br i1 %.not59.not, label %.lr.ph73, label %.preheader, !llvm.loop !15

.lr.ph90:                                         ; preds = %.preheader, %164
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = icmp slt i32 %110, %114
  br i1 %115, label %116, label %121

116:                                              ; preds = %.lr.ph90
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 %107, ptr %8, align 4, !tbaa !12
  %117 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %118 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = call noundef i32 @_Z4lefti(i32 noundef %119)
  store i32 %120, ptr %7, align 4, !tbaa !5
  %.pre = load i32, ptr %5, align 4, !tbaa !5
  br label %126

121:                                              ; preds = %.lr.ph90
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 %111, ptr %9, align 4, !tbaa !12
  %122 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %123 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = call noundef i32 @_Z5righti(i32 noundef %124)
  store i32 %125, ptr %5, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %121, %116
  %127 = phi i32 [ %125, %121 ], [ %.pre, %116 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %127, ptr %10, align 4, !tbaa !12
  %128 = call noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  %129 = load i32, ptr %7, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100001 x i32], ptr @ord, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100001 x i32], ptr @b, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %.not60 = icmp eq i32 %135, %142
  br i1 %.not60, label %156, label %143

143:                                              ; preds = %126
  %144 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %133
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %140
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sub nsw i32 %145, %147
  %149 = sub nsw i32 %142, %135
  %150 = icmp slt i32 %149, 0
  %151 = sub nsw i32 0, %148
  %.041 = select i1 %150, i32 %151, i32 %148
  %.040 = call i32 @llvm.abs.i32(i32 %149, i1 true)
  %152 = icmp slt i32 %.041, 0
  %153 = load i32, ptr @m, align 4
  %154 = select i1 %152, i32 %153, i32 0
  %.1 = add nsw i32 %154, %.041
  %155 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %137
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %155, i32 noundef %.1, i32 noundef %.040)
  br label %164

156:                                              ; preds = %126
  %157 = getelementptr inbounds [100001 x %struct.Node], ptr @f, i64 0, i64 %137
  %158 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %133
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %140
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = icmp eq i32 %159, %161
  %163 = select i1 %162, i32 0, i32 1061109567
  call void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8) %157, i32 noundef %163, i32 noundef 1)
  br label %164

164:                                              ; preds = %143, %156
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %165 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %165, ptr %11, align 4, !tbaa !12
  %166 = call { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @tim, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %167 = call ptr @_ZNKSt3setI5EventSt4lessIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @tim) #8
  store ptr %167, ptr %6, align 8
  %168 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI5EventEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %169 = load i32, ptr %168, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  store i32 %169, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %170 = call noundef i32 @_Z4lefti(i32 noundef %169)
  store i32 %170, ptr %7, align 4, !tbaa !5
  %171 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @sp) #8
  %.not62 = icmp eq i64 %171, 2
  br i1 %.not62, label %.loopexit, label %.lr.ph90, !llvm.loop !9

._crit_edge77:                                    ; preds = %.loopexit, %0
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) 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) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Node5parseEii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE6insertEOS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z4lefti(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Node5printEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setI5EventSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z5righti(i32 noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #7

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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS5Event", !6, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass