; LLVM IR from tangjz/acm-icpc :: Summer_Training/2016-07-21/upsolved (H - Helter Skelter - tjz)

; 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.Event = type { i32, i32, i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@x = external dso_local global [1001 x i32], align 16
@totE = external dso_local global i32, align 4
@totY = external dso_local global i32, align 4
@que = external dso_local global [1500003 x i32], align 16
@bit = external dso_local global [1500003 x i32], align 16
@e = external dso_local global [1500003 x %struct.Event], align 16
@ans = external dso_local global [500001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3addii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sumi(i32 noundef) #0

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

; 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 void @_Z6addSqriiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6addPoiiii(i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %18

18:                                               ; preds = %256, %0
  %19 = load i32, ptr @t, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @t, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %258

22:                                               ; preds = %18
  store i32 0, ptr @totY, align 4, !tbaa !5
  store i32 0, ptr @totE, align 4, !tbaa !5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %34, %22
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %37

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr @x, i64 %31
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %32)
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !9

37:                                               ; preds = %28
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = load i32, ptr @x, align 16, !tbaa !5
  call void @_Z6addSqriiii(i32 noundef 0, i32 noundef %41, i32 noundef 0, i32 noundef 0)
  br label %42

42:                                               ; preds = %40, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %108, %42
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %111

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %104, %48
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %107

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %57 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %57, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %58 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %58, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %59 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %59, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %60 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %60, ptr %11, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = and i32 %65, 1
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %56
  br label %70

69:                                               ; preds = %56
  br label %70

70:                                               ; preds = %69, %68
  %71 = phi ptr [ %11, %68 ], [ %9, %69 ]
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %64
  store i32 %73, ptr %71, align 4, !tbaa !5
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = and i32 %78, 1
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %70
  br label %83

82:                                               ; preds = %70
  br label %83

83:                                               ; preds = %82, %81
  %84 = phi ptr [ %11, %81 ], [ %9, %82 ]
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, %77
  store i32 %86, ptr %84, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z6addSqriiii(i32 noundef %87, i32 noundef %88, i32 noundef %89, i32 noundef %90)
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = and i32 %95, 1
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %83
  br label %100

99:                                               ; preds = %83
  br label %100

100:                                              ; preds = %99, %98
  %101 = phi ptr [ %6, %98 ], [ %5, %99 ]
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %102, %94
  store i32 %103, ptr %101, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %104

104:                                              ; preds = %100
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !5
  br label %51, !llvm.loop !11

107:                                              ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !12

111:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %125, %111
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = load i32, ptr @m, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %128

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %118 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %13, ptr noundef %14)
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z6addPoiiii(i32 noundef %119, i32 noundef %120, i32 noundef %121)
  %122 = load i32, ptr %12, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %123
  store i8 48, ptr %124, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %125

125:                                              ; preds = %117
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %12, align 4, !tbaa !5
  br label %112, !llvm.loop !14

128:                                              ; preds = %116
  %129 = load i32, ptr @m, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %130
  store i8 0, ptr %131, align 1, !tbaa !13
  %132 = load i32, ptr @totE, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %struct.Event, ptr @e, i64 %133
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef @e, ptr noundef %134)
  %135 = load i32, ptr @totY, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr @que, i64 %136
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @que, ptr noundef %137)
  %138 = load i32, ptr @totY, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr @que, i64 %139
  %141 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @que, ptr noundef %140)
  %142 = ptrtoint ptr %141 to i64
  %143 = sub i64 %142, ptrtoint (ptr @que to i64)
  %144 = sdiv exact i64 %143, 4
  %145 = trunc i64 %144 to i32
  store i32 %145, ptr @totY, align 4, !tbaa !5
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = mul i64 %147, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @bit, i64 1), i8 0, i64 %148, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %253, %128
  %150 = load i32, ptr %15, align 4, !tbaa !5
  %151 = load i32, ptr @totE, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %256

154:                                              ; preds = %149
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %156
  %158 = getelementptr inbounds %struct.Event, ptr %157, i32 0, i32 3
  %159 = load i32, ptr %158, align 4, !tbaa !15
  %160 = icmp slt i32 %159, 2
  br i1 %160, label %161, label %217

161:                                              ; preds = %154
  %162 = load i32, ptr @totY, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds i32, ptr @que, i64 %163
  %165 = load i32, ptr %15, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %166
  %168 = getelementptr inbounds %struct.Event, ptr %167, i32 0, i32 1
  %169 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @que, ptr noundef %164, ptr noundef nonnull align 4 dereferenceable(4) %168)
  %170 = ptrtoint ptr %169 to i64
  %171 = sub i64 %170, ptrtoint (ptr @que to i64)
  %172 = sdiv exact i64 %171, 4
  %173 = add nsw i64 %172, 1
  %174 = trunc i64 %173 to i32
  %175 = load i32, ptr %15, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %176
  %178 = getelementptr inbounds %struct.Event, ptr %177, i32 0, i32 1
  store i32 %174, ptr %178, align 4, !tbaa !17
  %179 = load i32, ptr @totY, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i32, ptr @que, i64 %180
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %183
  %185 = getelementptr inbounds %struct.Event, ptr %184, i32 0, i32 2
  %186 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @que, ptr noundef %181, ptr noundef nonnull align 4 dereferenceable(4) %185)
  %187 = ptrtoint ptr %186 to i64
  %188 = sub i64 %187, ptrtoint (ptr @que to i64)
  %189 = sdiv exact i64 %188, 4
  %190 = add nsw i64 %189, 1
  %191 = trunc i64 %190 to i32
  %192 = load i32, ptr %15, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %193
  %195 = getelementptr inbounds %struct.Event, ptr %194, i32 0, i32 2
  store i32 %191, ptr %195, align 8, !tbaa !18
  %196 = load i32, ptr %15, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %197
  %199 = getelementptr inbounds %struct.Event, ptr %198, i32 0, i32 1
  %200 = load i32, ptr %199, align 4, !tbaa !17
  %201 = load i32, ptr %15, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %202
  %204 = getelementptr inbounds %struct.Event, ptr %203, i32 0, i32 3
  %205 = load i32, ptr %204, align 4, !tbaa !15
  call void @_Z3addii(i32 noundef %200, i32 noundef %205)
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.Event, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 8, !tbaa !18
  %211 = load i32, ptr %15, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %212
  %214 = getelementptr inbounds %struct.Event, ptr %213, i32 0, i32 3
  %215 = load i32, ptr %214, align 4, !tbaa !15
  %216 = sub nsw i32 0, %215
  call void @_Z3addii(i32 noundef %210, i32 noundef %216)
  br label %252

217:                                              ; preds = %154
  %218 = load i32, ptr @totY, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds i32, ptr @que, i64 %219
  %221 = load i32, ptr %15, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %222
  %224 = getelementptr inbounds %struct.Event, ptr %223, i32 0, i32 1
  %225 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @que, ptr noundef %220, ptr noundef nonnull align 4 dereferenceable(4) %224)
  %226 = ptrtoint ptr %225 to i64
  %227 = sub i64 %226, ptrtoint (ptr @que to i64)
  %228 = sdiv exact i64 %227, 4
  %229 = add nsw i64 %228, 1
  %230 = trunc i64 %229 to i32
  %231 = load i32, ptr %15, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %232
  %234 = getelementptr inbounds %struct.Event, ptr %233, i32 0, i32 1
  store i32 %230, ptr %234, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %235 = load i32, ptr %15, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %236
  %238 = getelementptr inbounds %struct.Event, ptr %237, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !17
  %240 = call noundef i32 @_Z3sumi(i32 noundef %239)
  store i32 %240, ptr %16, align 4, !tbaa !5
  %241 = load i32, ptr %16, align 4, !tbaa !5
  %242 = icmp sgt i32 %241, 0
  br i1 %242, label %243, label %251

243:                                              ; preds = %217
  %244 = load i32, ptr %15, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %245
  %247 = getelementptr inbounds %struct.Event, ptr %246, i32 0, i32 2
  %248 = load i32, ptr %247, align 8, !tbaa !18
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %249
  store i8 49, ptr %250, align 1, !tbaa !13
  br label %251

251:                                              ; preds = %243, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %252

252:                                              ; preds = %251, %161
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %15, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %15, align 4, !tbaa !5
  br label %149, !llvm.loop !19

256:                                              ; preds = %153
  %257 = call i32 @puts(ptr noundef @ans)
  br label %18, !llvm.loop !20

258:                                              ; preds = %18
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4

declare i32 @puts(ptr noundef) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!12, !10}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{!16, !6, i64 12}
!16 = !{!"_ZTS5Event", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 8}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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.Event = type { i32, i32, i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@x = external dso_local global [1001 x i32], align 16
@totE = external dso_local local_unnamed_addr global i32, align 4
@totY = external dso_local local_unnamed_addr global i32, align 4
@que = external dso_local global [1500003 x i32], align 16
@bit = external dso_local local_unnamed_addr global [1500003 x i32], align 16
@e = external dso_local global [1500003 x %struct.Event], align 16
@ans = external dso_local global [500001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3addii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sumi(i32 noundef) local_unnamed_addr #0

; 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 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 void @_Z6addSqriiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6addPoiiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not87 = icmp eq i32 %4, 0
  br i1 %.not87, label %._crit_edge90, label %.lr.ph89

.lr.ph89:                                         ; preds = %0, %._crit_edge86
  store i32 0, ptr @totY, align 4, !tbaa !5
  store i32 0, ptr @totE, align 4, !tbaa !5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.preheader

._crit_edge:                                      ; preds = %.lr.ph
  %9 = icmp eq i32 %12, 1
  br i1 %9, label %15, label %17

.lr.ph:                                           ; preds = %.lr.ph89, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph89 ]
  %10 = getelementptr inbounds i32, ptr @x, i64 %indvars.iv
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %._crit_edge, !llvm.loop !9

15:                                               ; preds = %._crit_edge
  %16 = load i32, ptr @x, align 16, !tbaa !5
  call void @_Z6addSqriiii(i32 noundef 0, i32 noundef %16, i32 noundef 0, i32 noundef 0)
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %15, %._crit_edge
  %18 = phi i32 [ %.pre, %15 ], [ %12, %._crit_edge ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph78, label %.preheader

.loopexit:                                        ; preds = %.cont23, %.cont23.us, %.lr.ph78
  %20 = phi i32 [ %25, %.lr.ph78 ], [ %38, %.cont23.us ], [ %49, %.cont23 ]
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next104, %21
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  br i1 %22, label %.lr.ph78, label %.preheader, !llvm.loop !11

.preheader:                                       ; preds = %.loopexit, %.lr.ph89, %17
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph80, label %.preheader.._crit_edge81_crit_edge

.preheader.._crit_edge81_crit_edge:               ; preds = %.preheader
  %.pre112 = sext i32 %23 to i64
  br label %._crit_edge81

.lr.ph78:                                         ; preds = %17, %.loopexit
  %25 = phi i32 [ %20, %.loopexit ], [ %18, %17 ]
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.loopexit ], [ 0, %17 ]
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.loopexit ], [ 1, %17 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next104, %26
  br i1 %27, label %.cont23.lr.ph, label %.loopexit

.cont23.lr.ph:                                    ; preds = %.lr.ph78
  %28 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %indvars.iv103
  %29 = and i64 %indvars.iv103, 1
  %.not69 = icmp eq i64 %29, 0
  br i1 %.not69, label %.cont23.us, label %.cont23

.cont23.us:                                       ; preds = %.cont23.lr.ph, %.cont23.us
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %.cont23.us ], [ %indvars.iv95, %.cont23.lr.ph ]
  %.06374.us = phi i32 [ %.164.us, %.cont23.us ], [ 0, %.cont23.lr.ph ]
  %.06573.us = phi i32 [ %.166.us, %.cont23.us ], [ 0, %.cont23.lr.ph ]
  %30 = load i32, ptr %28, align 4, !tbaa !5
  %31 = add nsw i32 %30, %.06573.us
  %32 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %indvars.iv100
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = and i64 %indvars.iv100, 1
  %.not70.us = icmp eq i64 %34, 0
  %.sroa.speculated.us = select i1 %.not70.us, i32 %31, i32 %.06374.us
  %35 = add nsw i32 %.sroa.speculated.us, %33
  %.sroa.speculated41.us = select i1 %.not70.us, i32 %.06573.us, i32 %.06374.us
  %.161.us = select i1 %.not70.us, i32 %35, i32 %31
  %.1.us = select i1 %.not70.us, i32 %.06374.us, i32 %35
  call void @_Z6addSqriiii(i32 noundef %.06573.us, i32 noundef %.161.us, i32 noundef %.06374.us, i32 noundef %.1.us)
  %36 = load i32, ptr %32, align 4, !tbaa !5
  %37 = add nsw i32 %36, %.sroa.speculated41.us
  %.166.us = select i1 %.not70.us, i32 %37, i32 %.06573.us
  %.164.us = select i1 %.not70.us, i32 %.06374.us, i32 %37
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = trunc nuw i64 %indvars.iv.next101 to i32
  %40 = icmp sgt i32 %38, %39
  br i1 %40, label %.cont23.us, label %.loopexit, !llvm.loop !12

.cont23:                                          ; preds = %.cont23.lr.ph, %.cont23
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.cont23 ], [ %indvars.iv95, %.cont23.lr.ph ]
  %.06374 = phi i32 [ %.164, %.cont23 ], [ 0, %.cont23.lr.ph ]
  %.06573 = phi i32 [ %.166, %.cont23 ], [ 0, %.cont23.lr.ph ]
  %41 = load i32, ptr %28, align 4, !tbaa !5
  %42 = add nsw i32 %41, %.06374
  %43 = getelementptr inbounds [1001 x i32], ptr @x, i64 0, i64 %indvars.iv97
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = and i64 %indvars.iv97, 1
  %.not70 = icmp eq i64 %45, 0
  %.sroa.speculated = select i1 %.not70, i32 %.06573, i32 %42
  %46 = add nsw i32 %.sroa.speculated, %44
  %.sroa.speculated41 = select i1 %.not70, i32 %.06573, i32 %.06374
  %.161 = select i1 %.not70, i32 %46, i32 %.06573
  %.1 = select i1 %.not70, i32 %42, i32 %46
  call void @_Z6addSqriiii(i32 noundef %.06573, i32 noundef %.161, i32 noundef %.06374, i32 noundef %.1)
  %47 = load i32, ptr %43, align 4, !tbaa !5
  %48 = add nsw i32 %47, %.sroa.speculated41
  %.166 = select i1 %.not70, i32 %48, i32 %.06573
  %.164 = select i1 %.not70, i32 %.06374, i32 %48
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = trunc nuw i64 %indvars.iv.next98 to i32
  %51 = icmp sgt i32 %49, %50
  br i1 %51, label %.cont23, label %.loopexit, !llvm.loop !12

._crit_edge81:                                    ; preds = %.lr.ph80, %.preheader.._crit_edge81_crit_edge
  %.pre-phi = phi i64 [ %.pre112, %.preheader.._crit_edge81_crit_edge ], [ %78, %.lr.ph80 ]
  %52 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %.pre-phi
  store i8 0, ptr %52, align 1, !tbaa !13
  %53 = load i32, ptr @totE, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %struct.Event, ptr @e, i64 %54
  call void @_ZSt4sortIP5EventEvT_S2_(ptr noundef nonnull @e, ptr noundef nonnull %55)
  %56 = load i32, ptr @totY, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr @que, i64 %57
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @que, ptr noundef nonnull %58)
  %59 = load i32, ptr @totY, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr @que, i64 %60
  %62 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @que, ptr noundef nonnull %61)
  %63 = ptrtoint ptr %62 to i64
  %64 = sub i64 %63, ptrtoint (ptr @que to i64)
  %65 = lshr exact i64 %64, 2
  %66 = trunc i64 %65 to i32
  store i32 %66, ptr @totY, align 4, !tbaa !5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = shl nsw i64 %68, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @bit, i64 4), i8 0, i64 %69, i1 false)
  %70 = load i32, ptr @totE, align 4, !tbaa !5
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %.lr.ph85, label %._crit_edge86

.lr.ph80:                                         ; preds = %.preheader, %.lr.ph80
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %.lr.ph80 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %72 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %73 = load i32, ptr %1, align 4, !tbaa !5
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = trunc nuw nsw i64 %indvars.iv106 to i32
  call void @_Z6addPoiiii(i32 noundef %75, i32 noundef %73, i32 noundef %74)
  %76 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %indvars.iv106
  store i8 48, ptr %76, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %77 = load i32, ptr @m, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next107, %78
  br i1 %79, label %.lr.ph80, label %._crit_edge81, !llvm.loop !14

._crit_edge86:                                    ; preds = %121, %._crit_edge81
  %80 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @ans)
  %81 = load i32, ptr @t, align 4, !tbaa !5
  %82 = add nsw i32 %81, -1
  store i32 %82, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %81, 0
  br i1 %.not, label %._crit_edge90, label %.lr.ph89, !llvm.loop !15

.lr.ph85:                                         ; preds = %._crit_edge81, %121
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %121 ], [ 0, %._crit_edge81 ]
  %83 = getelementptr inbounds [1500003 x %struct.Event], ptr @e, i64 0, i64 %indvars.iv109
  %84 = getelementptr inbounds i8, ptr %83, i64 12
  %85 = load i32, ptr %84, align 4, !tbaa !16
  %86 = icmp slt i32 %85, 2
  %87 = load i32, ptr @totY, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr @que, i64 %88
  %90 = getelementptr inbounds i8, ptr %83, i64 4
  %91 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @que, ptr noundef nonnull %89, ptr noundef nonnull align 4 dereferenceable(4) %90)
  %92 = ptrtoint ptr %91 to i64
  %93 = sub i64 %92, ptrtoint (ptr @que to i64)
  %94 = lshr exact i64 %93, 2
  %95 = trunc i64 %94 to i32
  %96 = add i32 %95, 1
  store i32 %96, ptr %90, align 4, !tbaa !18
  br i1 %86, label %97, label %113

97:                                               ; preds = %.lr.ph85
  %98 = load i32, ptr @totY, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr @que, i64 %99
  %101 = getelementptr inbounds i8, ptr %83, i64 8
  %102 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @que, ptr noundef nonnull %100, ptr noundef nonnull align 4 dereferenceable(4) %101)
  %103 = ptrtoint ptr %102 to i64
  %104 = sub i64 %103, ptrtoint (ptr @que to i64)
  %105 = lshr exact i64 %104, 2
  %106 = trunc i64 %105 to i32
  %107 = add i32 %106, 1
  store i32 %107, ptr %101, align 8, !tbaa !19
  %108 = load i32, ptr %90, align 4, !tbaa !18
  %109 = load i32, ptr %84, align 4, !tbaa !16
  call void @_Z3addii(i32 noundef %108, i32 noundef %109)
  %110 = load i32, ptr %101, align 8, !tbaa !19
  %111 = load i32, ptr %84, align 4, !tbaa !16
  %112 = sub nsw i32 0, %111
  call void @_Z3addii(i32 noundef %110, i32 noundef %112)
  br label %121

113:                                              ; preds = %.lr.ph85
  %114 = call noundef i32 @_Z3sumi(i32 noundef %96)
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %113
  %117 = getelementptr inbounds i8, ptr %83, i64 8
  %118 = load i32, ptr %117, align 8, !tbaa !19
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [500001 x i8], ptr @ans, i64 0, i64 %119
  store i8 49, ptr %120, align 1, !tbaa !13
  br label %121

121:                                              ; preds = %113, %116, %97
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %122 = load i32, ptr @totE, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = icmp slt i64 %indvars.iv.next110, %123
  br i1 %124, label %.lr.ph85, label %._crit_edge86, !llvm.loop !20

._crit_edge90:                                    ; preds = %._crit_edge86, %0
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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 = { 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 #3 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!12, !10}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !6, i64 12}
!17 = !{!"_ZTS5Event", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!18 = !{!17, !6, i64 4}
!19 = !{!17, !6, i64 8}
!20 = distinct !{!20, !10}


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