; LLVM IR from ShahjalalShohag/code-library :: Data Structures (MOs with Update)

; 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.query = type { i32, i32, i32, i32 }
%struct.upd = type { i32, i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@Q = external dso_local global [200009 x %struct.query], align 16
@U = external dso_local global [200009 x %struct.upd], align 16
@a = external dso_local global [200009 x i32], align 16
@f = external dso_local global [200009 x i32], align 16
@ans = external dso_local global [200009 x i32], align 16
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 %struct.query, 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
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %26

26:                                               ; preds = %44, %0
  %27 = load i32, ptr %4, align 4, !tbaa !8
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %47

31:                                               ; preds = %26
  %32 = load i32, ptr %4, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %33
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %36 = load i32, ptr %4, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = call noundef i32 @_Z3geti(i32 noundef %39)
  %41 = load i32, ptr %4, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %42
  store i32 %40, ptr %43, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %31
  %45 = load i32, ptr %4, align 4, !tbaa !8
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %4, align 4, !tbaa !8
  br label %26, !llvm.loop !11

47:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %103, %47
  %49 = load i32, ptr %7, align 4, !tbaa !8
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %57 = load i32, ptr %8, align 4, !tbaa !8
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %59, label %73

59:                                               ; preds = %53
  %60 = load i32, ptr %5, align 4, !tbaa !8
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %62 = getelementptr inbounds %struct.query, ptr %11, i32 0, i32 0
  %63 = load i32, ptr %9, align 4, !tbaa !8
  store i32 %63, ptr %62, align 4, !tbaa !13
  %64 = getelementptr inbounds %struct.query, ptr %11, i32 0, i32 1
  %65 = load i32, ptr %10, align 4, !tbaa !8
  store i32 %65, ptr %64, align 4, !tbaa !15
  %66 = getelementptr inbounds %struct.query, ptr %11, i32 0, i32 2
  %67 = load i32, ptr %6, align 4, !tbaa !8
  store i32 %67, ptr %66, align 4, !tbaa !16
  %68 = getelementptr inbounds %struct.query, ptr %11, i32 0, i32 3
  %69 = load i32, ptr %5, align 4, !tbaa !8
  store i32 %69, ptr %68, align 4, !tbaa !17
  %70 = load i32, ptr %5, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %71
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %72, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %102

73:                                               ; preds = %53
  %74 = load i32, ptr %6, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %6, align 4, !tbaa !8
  %76 = load i32, ptr %9, align 4, !tbaa !8
  %77 = load i32, ptr %6, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.upd, ptr %79, i32 0, i32 0
  store i32 %76, ptr %80, align 4, !tbaa !19
  %81 = load i32, ptr %9, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !8
  %85 = load i32, ptr %6, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %86
  %88 = getelementptr inbounds %struct.upd, ptr %87, i32 0, i32 1
  store i32 %84, ptr %88, align 4, !tbaa !21
  %89 = load i32, ptr %10, align 4, !tbaa !8
  %90 = call noundef i32 @_Z3geti(i32 noundef %89)
  %91 = load i32, ptr %9, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !8
  %94 = load i32, ptr %9, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = load i32, ptr %6, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.upd, ptr %100, i32 0, i32 2
  store i32 %97, ptr %101, align 4, !tbaa !22
  br label %102

102:                                              ; preds = %73, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %7, align 4, !tbaa !8
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %7, align 4, !tbaa !8
  br label %48, !llvm.loop !23

106:                                              ; preds = %52
  %107 = load i32, ptr %5, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %struct.query, ptr @Q, i64 %108
  %110 = getelementptr inbounds %struct.query, ptr %109, i64 1
  call void @_ZSt4sortIP5queryEvT_S2_(ptr noundef getelementptr inbounds (%struct.query, ptr @Q, i64 1), ptr noundef %110)
  %111 = load i32, ptr %6, align 4, !tbaa !8
  store i32 %111, ptr @t, align 4, !tbaa !8
  store i32 1, ptr @l, align 4, !tbaa !8
  store i32 0, ptr @r, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %112

112:                                              ; preds = %281, %106
  %113 = load i32, ptr %12, align 4, !tbaa !8
  %114 = load i32, ptr %5, align 4, !tbaa !8
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %284

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %118 = load i32, ptr %12, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.query, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 16, !tbaa !13
  store i32 %122, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %123 = load i32, ptr %12, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.query, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 4, !tbaa !15
  store i32 %127, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %128 = load i32, ptr %12, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.query, ptr %130, i32 0, i32 2
  %132 = load i32, ptr %131, align 8, !tbaa !16
  store i32 %132, ptr %15, align 4, !tbaa !8
  br label %133

133:                                              ; preds = %137, %117
  %134 = load i32, ptr @t, align 4, !tbaa !8
  %135 = load i32, ptr %15, align 4, !tbaa !8
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %137, label %150

137:                                              ; preds = %133
  %138 = load i32, ptr @t, align 4, !tbaa !8
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr @t, align 4, !tbaa !8
  %140 = load i32, ptr @t, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.upd, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 4, !tbaa !19
  %145 = load i32, ptr @t, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.upd, ptr %147, i32 0, i32 2
  %149 = load i32, ptr %148, align 4, !tbaa !22
  call void @_Z6updateii(i32 noundef %144, i32 noundef %149)
  br label %133, !llvm.loop !24

150:                                              ; preds = %133
  br label %151

151:                                              ; preds = %155, %150
  %152 = load i32, ptr @t, align 4, !tbaa !8
  %153 = load i32, ptr %15, align 4, !tbaa !8
  %154 = icmp sgt i32 %152, %153
  br i1 %154, label %155, label %168

155:                                              ; preds = %151
  %156 = load i32, ptr @t, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %157
  %159 = getelementptr inbounds %struct.upd, ptr %158, i32 0, i32 0
  %160 = load i32, ptr %159, align 4, !tbaa !19
  %161 = load i32, ptr @t, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %162
  %164 = getelementptr inbounds %struct.upd, ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !21
  call void @_Z6updateii(i32 noundef %160, i32 noundef %165)
  %166 = load i32, ptr @t, align 4, !tbaa !8
  %167 = add nsw i32 %166, -1
  store i32 %167, ptr @t, align 4, !tbaa !8
  br label %151, !llvm.loop !25

168:                                              ; preds = %151
  %169 = load i32, ptr %14, align 4, !tbaa !8
  %170 = load i32, ptr @l, align 4, !tbaa !8
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %217

172:                                              ; preds = %168
  br label %173

173:                                              ; preds = %177, %172
  %174 = load i32, ptr @l, align 4, !tbaa !8
  %175 = load i32, ptr %13, align 4, !tbaa !8
  %176 = icmp sgt i32 %174, %175
  br i1 %176, label %177, label %183

177:                                              ; preds = %173
  %178 = load i32, ptr @l, align 4, !tbaa !8
  %179 = add nsw i32 %178, -1
  store i32 %179, ptr @l, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %182)
  br label %173, !llvm.loop !26

183:                                              ; preds = %173
  br label %184

184:                                              ; preds = %188, %183
  %185 = load i32, ptr @l, align 4, !tbaa !8
  %186 = load i32, ptr %13, align 4, !tbaa !8
  %187 = icmp slt i32 %185, %186
  br i1 %187, label %188, label %194

188:                                              ; preds = %184
  %189 = load i32, ptr @l, align 4, !tbaa !8
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr @l, align 4, !tbaa !8
  %191 = sext i32 %189 to i64
  %192 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %193)
  br label %184, !llvm.loop !27

194:                                              ; preds = %184
  br label %195

195:                                              ; preds = %199, %194
  %196 = load i32, ptr @r, align 4, !tbaa !8
  %197 = load i32, ptr %14, align 4, !tbaa !8
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %199, label %205

199:                                              ; preds = %195
  %200 = load i32, ptr @r, align 4, !tbaa !8
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr @r, align 4, !tbaa !8
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %204)
  br label %195, !llvm.loop !28

205:                                              ; preds = %195
  br label %206

206:                                              ; preds = %210, %205
  %207 = load i32, ptr @r, align 4, !tbaa !8
  %208 = load i32, ptr %14, align 4, !tbaa !8
  %209 = icmp sgt i32 %207, %208
  br i1 %209, label %210, label %216

210:                                              ; preds = %206
  %211 = load i32, ptr @r, align 4, !tbaa !8
  %212 = add nsw i32 %211, -1
  store i32 %212, ptr @r, align 4, !tbaa !8
  %213 = sext i32 %211 to i64
  %214 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %215)
  br label %206, !llvm.loop !29

216:                                              ; preds = %206
  br label %262

217:                                              ; preds = %168
  br label %218

218:                                              ; preds = %222, %217
  %219 = load i32, ptr @r, align 4, !tbaa !8
  %220 = load i32, ptr %14, align 4, !tbaa !8
  %221 = icmp slt i32 %219, %220
  br i1 %221, label %222, label %228

222:                                              ; preds = %218
  %223 = load i32, ptr @r, align 4, !tbaa !8
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr @r, align 4, !tbaa !8
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %227)
  br label %218, !llvm.loop !30

228:                                              ; preds = %218
  br label %229

229:                                              ; preds = %233, %228
  %230 = load i32, ptr @r, align 4, !tbaa !8
  %231 = load i32, ptr %14, align 4, !tbaa !8
  %232 = icmp sgt i32 %230, %231
  br i1 %232, label %233, label %239

233:                                              ; preds = %229
  %234 = load i32, ptr @r, align 4, !tbaa !8
  %235 = add nsw i32 %234, -1
  store i32 %235, ptr @r, align 4, !tbaa !8
  %236 = sext i32 %234 to i64
  %237 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %238)
  br label %229, !llvm.loop !31

239:                                              ; preds = %229
  br label %240

240:                                              ; preds = %244, %239
  %241 = load i32, ptr @l, align 4, !tbaa !8
  %242 = load i32, ptr %13, align 4, !tbaa !8
  %243 = icmp sgt i32 %241, %242
  br i1 %243, label %244, label %250

244:                                              ; preds = %240
  %245 = load i32, ptr @l, align 4, !tbaa !8
  %246 = add nsw i32 %245, -1
  store i32 %246, ptr @l, align 4, !tbaa !8
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %249)
  br label %240, !llvm.loop !32

250:                                              ; preds = %240
  br label %251

251:                                              ; preds = %255, %250
  %252 = load i32, ptr @l, align 4, !tbaa !8
  %253 = load i32, ptr %13, align 4, !tbaa !8
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %255, label %261

255:                                              ; preds = %251
  %256 = load i32, ptr @l, align 4, !tbaa !8
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr @l, align 4, !tbaa !8
  %258 = sext i32 %256 to i64
  %259 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %260)
  br label %251, !llvm.loop !33

261:                                              ; preds = %251
  br label %262

262:                                              ; preds = %261, %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 1, ptr %16, align 4, !tbaa !8
  br label %263

263:                                              ; preds = %269, %262
  %264 = load i32, ptr %16, align 4, !tbaa !8
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [200009 x i32], ptr @f, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !8
  %268 = icmp sgt i32 %267, 0
  br i1 %268, label %269, label %272

269:                                              ; preds = %263
  %270 = load i32, ptr %16, align 4, !tbaa !8
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %16, align 4, !tbaa !8
  br label %263, !llvm.loop !34

272:                                              ; preds = %263
  %273 = load i32, ptr %16, align 4, !tbaa !8
  %274 = load i32, ptr %12, align 4, !tbaa !8
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %275
  %277 = getelementptr inbounds %struct.query, ptr %276, i32 0, i32 3
  %278 = load i32, ptr %277, align 4, !tbaa !17
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %279
  store i32 %273, ptr %280, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %281

281:                                              ; preds = %272
  %282 = load i32, ptr %12, align 4, !tbaa !8
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %12, align 4, !tbaa !8
  br label %112, !llvm.loop !35

284:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !8
  br label %285

285:                                              ; preds = %297, %284
  %286 = load i32, ptr %17, align 4, !tbaa !8
  %287 = load i32, ptr %5, align 4, !tbaa !8
  %288 = icmp sle i32 %286, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %300

290:                                              ; preds = %285
  %291 = load i32, ptr %17, align 4, !tbaa !8
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %292
  %294 = load i32, ptr %293, align 4, !tbaa !8
  %295 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %294)
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %295, i8 noundef signext 10)
  br label %297

297:                                              ; preds = %290
  %298 = load i32, ptr %17, align 4, !tbaa !8
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %17, align 4, !tbaa !8
  br label %285, !llvm.loop !36

300:                                              ; preds = %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z6updateii(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3addi(i32 noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3deli(i32 noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTS5query", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!15 = !{!14, !9, i64 4}
!16 = !{!14, !9, i64 8}
!17 = !{!14, !9, i64 12}
!18 = !{i64 0, i64 4, !8, i64 4, i64 4, !8, i64 8, i64 4, !8, i64 12, i64 4, !8}
!19 = !{!20, !9, i64 0}
!20 = !{!"_ZTS3upd", !9, i64 0, !9, i64 4, !9, i64 8}
!21 = !{!20, !9, i64 4}
!22 = !{!20, !9, i64 8}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}
!36 = distinct !{!36, !12}


; 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.query = type { i32, i32, i32, i32 }
%struct.upd = type { i32, i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@Q = external dso_local global [200009 x %struct.query], align 16
@U = external dso_local local_unnamed_addr global [200009 x %struct.upd], align 16
@a = external dso_local global [200009 x i32], align 16
@f = external dso_local local_unnamed_addr global [200009 x i32], align 16
@ans = external dso_local local_unnamed_addr global [200009 x i32], align 16
@l = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = load i32, ptr %1, align 4, !tbaa !8
  %.not73 = icmp slt i32 %14, 1
  br i1 %.not73, label %.preheader72, label %.lr.ph

.preheader72:                                     ; preds = %.lr.ph, %0
  %15 = load i32, ptr %2, align 4, !tbaa !8
  %.not5975 = icmp slt i32 %15, 1
  br i1 %.not5975, label %._crit_edge, label %.lr.ph79

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %indvars.iv
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %18 = load i32, ptr %16, align 4, !tbaa !8
  %19 = call noundef i32 @_Z3geti(i32 noundef %18)
  store i32 %19, ptr %16, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr %1, align 4, !tbaa !8
  %21 = sext i32 %20 to i64
  %.not.not = icmp slt i64 %indvars.iv, %21
  br i1 %.not.not, label %.lr.ph, label %.preheader72, !llvm.loop !11

._crit_edge:                                      ; preds = %51, %.preheader72
  %.045.lcssa = phi i32 [ 0, %.preheader72 ], [ %.146, %51 ]
  %.044.lcssa = phi i32 [ 0, %.preheader72 ], [ %.1, %51 ]
  %22 = sext i32 %.044.lcssa to i64
  %23 = getelementptr inbounds %struct.query, ptr @Q, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  call void @_ZSt4sortIP5queryEvT_S2_(ptr noundef nonnull getelementptr inbounds (i8, ptr @Q, i64 16), ptr noundef nonnull %24)
  store i32 %.045.lcssa, ptr @t, align 4, !tbaa !8
  store i32 1, ptr @l, align 4, !tbaa !8
  store i32 0, ptr @r, align 4, !tbaa !8
  %.not6093 = icmp slt i32 %.044.lcssa, 1
  br i1 %.not6093, label %._crit_edge100, label %.lr.ph96.preheader

.lr.ph96.preheader:                               ; preds = %._crit_edge
  %25 = add nuw i32 %.044.lcssa, 1
  %wide.trip.count = zext i32 %25 to i64
  br label %.lr.ph96

.lr.ph79:                                         ; preds = %.preheader72, %51
  %.04478 = phi i32 [ %.1, %51 ], [ 0, %.preheader72 ]
  %.04577 = phi i32 [ %.146, %51 ], [ 0, %.preheader72 ]
  %.04876 = phi i32 [ %52, %51 ], [ 1, %.preheader72 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %29 = load i32, ptr %3, align 4, !tbaa !8
  %30 = icmp eq i32 %29, 1
  %31 = load i32, ptr %4, align 4, !tbaa !8
  br i1 %30, label %32, label %37

32:                                               ; preds = %.lr.ph79
  %33 = add nsw i32 %.04478, 1
  %34 = load i32, ptr %5, align 4, !tbaa !8
  %35 = sext i32 %33 to i64
  %36 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %35
  store i32 %31, ptr %36, align 16, !tbaa !8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 4
  store i32 %34, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !8
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 8
  store i32 %.04577, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 12
  store i32 %33, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !8
  br label %51

37:                                               ; preds = %.lr.ph79
  %38 = add nsw i32 %.04577, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %39
  store i32 %31, ptr %40, align 4, !tbaa !13
  %41 = sext i32 %31 to i64
  %42 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = getelementptr inbounds i8, ptr %40, i64 4
  store i32 %43, ptr %44, align 4, !tbaa !15
  %45 = load i32, ptr %5, align 4, !tbaa !8
  %46 = call noundef i32 @_Z3geti(i32 noundef %45)
  %47 = load i32, ptr %4, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %48
  store i32 %46, ptr %49, align 4, !tbaa !8
  %50 = getelementptr inbounds i8, ptr %40, i64 8
  store i32 %46, ptr %50, align 4, !tbaa !16
  br label %51

51:                                               ; preds = %37, %32
  %.146 = phi i32 [ %.04577, %32 ], [ %38, %37 ]
  %.1 = phi i32 [ %33, %32 ], [ %.04478, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %52 = add nuw nsw i32 %.04876, 1
  %53 = load i32, ptr %2, align 4, !tbaa !8
  %.not59.not = icmp slt i32 %.04876, %53
  br i1 %.not59.not, label %.lr.ph79, label %._crit_edge, !llvm.loop !17

.preheader:                                       ; preds = %159
  br i1 %.not6093, label %._crit_edge100, label %.lr.ph99.preheader

.lr.ph99.preheader:                               ; preds = %.preheader
  %54 = add nuw i32 %.044.lcssa, 1
  %wide.trip.count112 = zext i32 %54 to i64
  br label %.lr.ph99

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %159
  %indvars.iv106 = phi i64 [ 1, %.lr.ph96.preheader ], [ %indvars.iv.next107, %159 ]
  %55 = getelementptr inbounds [200009 x %struct.query], ptr @Q, i64 0, i64 %indvars.iv106
  %56 = load i32, ptr %55, align 16, !tbaa !18
  %57 = getelementptr inbounds i8, ptr %55, i64 4
  %58 = load i32, ptr %57, align 4, !tbaa !20
  %59 = getelementptr inbounds i8, ptr %55, i64 8
  %60 = load i32, ptr %59, align 8, !tbaa !21
  %61 = load i32, ptr @t, align 4, !tbaa !8
  %62 = icmp slt i32 %61, %60
  br i1 %62, label %.lr.ph82, label %.preheader71

.preheader71:                                     ; preds = %.lr.ph82, %.lr.ph96
  %63 = phi i32 [ %61, %.lr.ph96 ], [ %72, %.lr.ph82 ]
  %64 = icmp sgt i32 %63, %60
  br i1 %64, label %.lr.ph83, label %._crit_edge84

.lr.ph82:                                         ; preds = %.lr.ph96, %.lr.ph82
  %65 = phi i32 [ %72, %.lr.ph82 ], [ %61, %.lr.ph96 ]
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr @t, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !13
  %70 = getelementptr inbounds i8, ptr %68, i64 8
  %71 = load i32, ptr %70, align 4, !tbaa !16
  call void @_Z6updateii(i32 noundef %69, i32 noundef %71)
  %72 = load i32, ptr @t, align 4, !tbaa !8
  %73 = icmp slt i32 %72, %60
  br i1 %73, label %.lr.ph82, label %.preheader71, !llvm.loop !22

.lr.ph83:                                         ; preds = %.preheader71, %.lr.ph83
  %74 = phi i32 [ %81, %.lr.ph83 ], [ %63, %.preheader71 ]
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200009 x %struct.upd], ptr @U, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !13
  %78 = getelementptr inbounds i8, ptr %76, i64 4
  %79 = load i32, ptr %78, align 4, !tbaa !15
  call void @_Z6updateii(i32 noundef %77, i32 noundef %79)
  %80 = load i32, ptr @t, align 4, !tbaa !8
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr @t, align 4, !tbaa !8
  %82 = icmp sgt i32 %81, %60
  br i1 %82, label %.lr.ph83, label %._crit_edge84, !llvm.loop !23

._crit_edge84:                                    ; preds = %.lr.ph83, %.preheader71
  %83 = load i32, ptr @l, align 4, !tbaa !8
  %84 = icmp slt i32 %58, %83
  br i1 %84, label %.preheader65, label %.preheader70

.preheader70:                                     ; preds = %._crit_edge84
  %85 = load i32, ptr @r, align 4, !tbaa !8
  %86 = icmp slt i32 %85, %58
  br i1 %86, label %.lr.ph85, label %.preheader69

.preheader65:                                     ; preds = %._crit_edge84
  %87 = icmp sgt i32 %83, %56
  br i1 %87, label %.lr.ph89, label %.preheader64

.preheader64:                                     ; preds = %.lr.ph89, %.preheader65
  %88 = phi i32 [ %83, %.preheader65 ], [ %95, %.lr.ph89 ]
  %89 = icmp slt i32 %88, %56
  br i1 %89, label %.lr.ph90, label %.preheader63

.lr.ph89:                                         ; preds = %.preheader65, %.lr.ph89
  %90 = phi i32 [ %95, %.lr.ph89 ], [ %83, %.preheader65 ]
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr @l, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %94)
  %95 = load i32, ptr @l, align 4, !tbaa !8
  %96 = icmp sgt i32 %95, %56
  br i1 %96, label %.lr.ph89, label %.preheader64, !llvm.loop !24

.preheader63:                                     ; preds = %.lr.ph90, %.preheader64
  %97 = load i32, ptr @r, align 4, !tbaa !8
  %98 = icmp slt i32 %97, %58
  br i1 %98, label %.lr.ph91, label %.preheader62

.lr.ph90:                                         ; preds = %.preheader64, %.lr.ph90
  %99 = phi i32 [ %104, %.lr.ph90 ], [ %88, %.preheader64 ]
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr @l, align 4, !tbaa !8
  %101 = sext i32 %99 to i64
  %102 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %103)
  %104 = load i32, ptr @l, align 4, !tbaa !8
  %105 = icmp slt i32 %104, %56
  br i1 %105, label %.lr.ph90, label %.preheader63, !llvm.loop !25

.preheader62:                                     ; preds = %.lr.ph91, %.preheader63
  %106 = phi i32 [ %97, %.preheader63 ], [ %113, %.lr.ph91 ]
  %107 = icmp sgt i32 %106, %58
  br i1 %107, label %.lr.ph92, label %.loopexit.preheader

.lr.ph91:                                         ; preds = %.preheader63, %.lr.ph91
  %108 = phi i32 [ %113, %.lr.ph91 ], [ %97, %.preheader63 ]
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr @r, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %112)
  %113 = load i32, ptr @r, align 4, !tbaa !8
  %114 = icmp slt i32 %113, %58
  br i1 %114, label %.lr.ph91, label %.preheader62, !llvm.loop !26

.lr.ph92:                                         ; preds = %.preheader62, %.lr.ph92
  %115 = phi i32 [ %120, %.lr.ph92 ], [ %106, %.preheader62 ]
  %116 = add nsw i32 %115, -1
  store i32 %116, ptr @r, align 4, !tbaa !8
  %117 = sext i32 %115 to i64
  %118 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %119)
  %120 = load i32, ptr @r, align 4, !tbaa !8
  %121 = icmp sgt i32 %120, %58
  br i1 %121, label %.lr.ph92, label %.loopexit.preheader, !llvm.loop !27

.preheader69:                                     ; preds = %.lr.ph85, %.preheader70
  %122 = phi i32 [ %85, %.preheader70 ], [ %129, %.lr.ph85 ]
  %123 = icmp sgt i32 %122, %58
  br i1 %123, label %.lr.ph86, label %.preheader68

.lr.ph85:                                         ; preds = %.preheader70, %.lr.ph85
  %124 = phi i32 [ %129, %.lr.ph85 ], [ %85, %.preheader70 ]
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr @r, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %128)
  %129 = load i32, ptr @r, align 4, !tbaa !8
  %130 = icmp slt i32 %129, %58
  br i1 %130, label %.lr.ph85, label %.preheader69, !llvm.loop !28

.preheader68:                                     ; preds = %.lr.ph86, %.preheader69
  %131 = load i32, ptr @l, align 4, !tbaa !8
  %132 = icmp sgt i32 %131, %56
  br i1 %132, label %.lr.ph87, label %.preheader66

.lr.ph86:                                         ; preds = %.preheader69, %.lr.ph86
  %133 = phi i32 [ %138, %.lr.ph86 ], [ %122, %.preheader69 ]
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr @r, align 4, !tbaa !8
  %135 = sext i32 %133 to i64
  %136 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %137)
  %138 = load i32, ptr @r, align 4, !tbaa !8
  %139 = icmp sgt i32 %138, %58
  br i1 %139, label %.lr.ph86, label %.preheader68, !llvm.loop !29

.preheader66:                                     ; preds = %.lr.ph87, %.preheader68
  %140 = phi i32 [ %131, %.preheader68 ], [ %147, %.lr.ph87 ]
  %141 = icmp slt i32 %140, %56
  br i1 %141, label %.lr.ph88, label %.loopexit.preheader

.lr.ph87:                                         ; preds = %.preheader68, %.lr.ph87
  %142 = phi i32 [ %147, %.lr.ph87 ], [ %131, %.preheader68 ]
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr @l, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !8
  call void @_Z3addi(i32 noundef %146)
  %147 = load i32, ptr @l, align 4, !tbaa !8
  %148 = icmp sgt i32 %147, %56
  br i1 %148, label %.lr.ph87, label %.preheader66, !llvm.loop !30

.lr.ph88:                                         ; preds = %.preheader66, %.lr.ph88
  %149 = phi i32 [ %154, %.lr.ph88 ], [ %140, %.preheader66 ]
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr @l, align 4, !tbaa !8
  %151 = sext i32 %149 to i64
  %152 = getelementptr inbounds [200009 x i32], ptr @a, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !8
  call void @_Z3deli(i32 noundef %153)
  %154 = load i32, ptr @l, align 4, !tbaa !8
  %155 = icmp slt i32 %154, %56
  br i1 %155, label %.lr.ph88, label %.loopexit.preheader, !llvm.loop !31

.loopexit.preheader:                              ; preds = %.lr.ph88, %.lr.ph92, %.preheader66, %.preheader62
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.preheader, %.loopexit
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.loopexit ], [ 1, %.loopexit.preheader ]
  %156 = getelementptr inbounds [200009 x i32], ptr @f, i64 0, i64 %indvars.iv103
  %157 = load i32, ptr %156, align 4, !tbaa !8
  %158 = icmp sgt i32 %157, 0
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  br i1 %158, label %.loopexit, label %159, !llvm.loop !32

159:                                              ; preds = %.loopexit
  %160 = trunc nuw nsw i64 %indvars.iv103 to i32
  %161 = getelementptr inbounds i8, ptr %55, i64 12
  %162 = load i32, ptr %161, align 4, !tbaa !33
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %163
  store i32 %160, ptr %164, align 4, !tbaa !8
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph96, !llvm.loop !34

._crit_edge100:                                   ; preds = %.lr.ph99, %._crit_edge, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.lr.ph99
  %indvars.iv109 = phi i64 [ 1, %.lr.ph99.preheader ], [ %indvars.iv.next110, %.lr.ph99 ]
  %165 = getelementptr inbounds [200009 x i32], ptr @ans, i64 0, i64 %indvars.iv109
  %166 = load i32, ptr %165, align 4, !tbaa !8
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %166)
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %167, i8 noundef signext 10)
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count112
  br i1 %exitcond113.not, label %._crit_edge100, label %.lr.ph99, !llvm.loop !35
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3addi(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3deli(i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTS3upd", !9, i64 0, !9, i64 4, !9, i64 8}
!15 = !{!14, !9, i64 4}
!16 = !{!14, !9, i64 8}
!17 = distinct !{!17, !12}
!18 = !{!19, !9, i64 0}
!19 = !{!"_ZTS5query", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!20 = !{!19, !9, i64 4}
!21 = !{!19, !9, i64 8}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = !{!19, !9, i64 12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}


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