; LLVM IR from ravireddy07/cpp-book :: src/Code-Chef (COOK126B_EQLGIFTS)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@n = external dso_local global i32, align 4
@a = external dso_local global [100100 x i32], align 16
@pw = external dso_local global [20 x i32], align 16
@lb = external dso_local global [50005000 x i32], align 16
@nb = external dso_local global [50005000 x i32], align 16
@dp = external dso_local global [50005000 x i64], align 16
@vec = external dso_local global %"class.std::vector", align 8
@s = external dso_local global [100100 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL1D = external hidden constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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 i8, align 1
  %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
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i32 1, ptr @pw, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %47, %0
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 20
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %50

37:                                               ; preds = %33
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = mul nsw i32 3, %42
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %45
  store i32 %43, ptr %46, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %37
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !5
  br label %33, !llvm.loop !9

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

51:                                               ; preds = %77, %50
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 50005000
  br i1 %53, label %55, label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %80

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %56 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %56, ptr %5, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %62, %55
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = srem i32 %58, 3
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %67

61:                                               ; preds = %57
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sdiv i32 %63, 3
  store i32 %64, ptr %5, align 4, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %57, !llvm.loop !11

67:                                               ; preds = %57
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %70
  store i32 %68, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = srem i32 %72, 3
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %75
  store i32 %73, ptr %76, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %77

77:                                               ; preds = %67
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %3, align 4, !tbaa !5
  br label %51, !llvm.loop !12

80:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %81 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %6)
  br label %82

82:                                               ; preds = %375, %80
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %6, align 4, !tbaa !5
  %85 = icmp ne i32 %83, 0
  br i1 %85, label %86, label %376

86:                                               ; preds = %82
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %98, %86
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %101

93:                                               ; preds = %88
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %95
  %97 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %96)
  br label %98

98:                                               ; preds = %93
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %7, align 4, !tbaa !5
  br label %88, !llvm.loop !13

101:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @_ZL1D)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  store i8 1, ptr %9, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = ashr i32 %104, 1
  store i32 %105, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = sub nsw i32 %106, %107
  store i32 %108, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #7
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %114)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJiiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %186, %101
  %117 = load i32, ptr %17, align 4, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 16, ptr %18, align 4
  br label %189

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %122 = load i32, ptr %17, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr %19, align 4, !tbaa !5
  %126 = load i32, ptr %17, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %150

131:                                              ; preds = %121
  %132 = load i32, ptr %17, align 4, !tbaa !5
  %133 = load i32, ptr %19, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sub nsw i32 %132, %136
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !16
  %141 = load i32, ptr %19, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = add nsw i64 %140, %145
  %147 = load i32, ptr %17, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %148
  store i64 %146, ptr %149, align 8, !tbaa !16
  br label %170

150:                                              ; preds = %121
  %151 = load i32, ptr %17, align 4, !tbaa !5
  %152 = load i32, ptr %19, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = mul nsw i32 2, %155
  %157 = sub nsw i32 %151, %156
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !16
  %161 = load i32, ptr %19, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = sub nsw i64 %160, %165
  %167 = load i32, ptr %17, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %168
  store i64 %166, ptr %169, align 8, !tbaa !16
  br label %170

170:                                              ; preds = %150, %131
  %171 = load i32, ptr %17, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %172
  %174 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJRxRiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %175 = load i32, ptr %17, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !16
  %179 = icmp eq i64 %178, 0
  br i1 %179, label %180, label %182

180:                                              ; preds = %170
  store i8 0, ptr %9, align 1, !tbaa !14
  %181 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %181, ptr %13, align 4, !tbaa !5
  store i32 0, ptr %14, align 4, !tbaa !5
  store i32 16, ptr %18, align 4
  br label %183

182:                                              ; preds = %170
  store i32 0, ptr %18, align 4
  br label %183

183:                                              ; preds = %182, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %184 = load i32, ptr %18, align 4
  switch i32 %184, label %189 [
    i32 0, label %185
  ]

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %17, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %17, align 4, !tbaa !5
  br label %116, !llvm.loop !18

189:                                              ; preds = %183, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %190

190:                                              ; preds = %189
  %191 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #7
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  %193 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #7
  %194 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %193, ptr %194, align 8
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8
  %197 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %196, ptr %198)
  %199 = load i8, ptr %9, align 1, !tbaa !14, !range !19, !noundef !20
  %200 = trunc i8 %199 to i1
  br i1 %200, label %201, label %300

201:                                              ; preds = %190
  %202 = load i32, ptr %11, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  store i32 %205, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %295, %201
  %207 = load i32, ptr %22, align 4, !tbaa !5
  %208 = load i32, ptr %12, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 19, ptr %18, align 4
  br label %298

211:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %212 = load i32, ptr %22, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  store i32 %215, ptr %23, align 4, !tbaa !5
  %216 = load i32, ptr %22, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = icmp eq i32 %219, 1
  br i1 %220, label %221, label %242

221:                                              ; preds = %211
  %222 = load i32, ptr %22, align 4, !tbaa !5
  %223 = load i32, ptr %23, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = sub nsw i32 %222, %226
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %228
  %230 = load i64, ptr %229, align 8, !tbaa !16
  %231 = load i32, ptr %23, align 4, !tbaa !5
  %232 = load i32, ptr %10, align 4, !tbaa !5
  %233 = add nsw i32 %231, %232
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = add nsw i64 %230, %237
  %239 = load i32, ptr %22, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %240
  store i64 %238, ptr %241, align 8, !tbaa !16
  br label %264

242:                                              ; preds = %211
  %243 = load i32, ptr %22, align 4, !tbaa !5
  %244 = load i32, ptr %23, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = mul nsw i32 2, %247
  %249 = sub nsw i32 %243, %248
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %250
  %252 = load i64, ptr %251, align 8, !tbaa !16
  %253 = load i32, ptr %23, align 4, !tbaa !5
  %254 = load i32, ptr %10, align 4, !tbaa !5
  %255 = add nsw i32 %253, %254
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = sub nsw i64 %252, %259
  %261 = load i32, ptr %22, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %262
  store i64 %260, ptr %263, align 8, !tbaa !16
  br label %264

264:                                              ; preds = %242, %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %265 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #7
  %266 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %265, ptr %266, align 8
  %267 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #7
  %268 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %267, ptr %268, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %269 = load i32, ptr %22, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %270
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  call void @_ZNSt4pairIxiEC2IRxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef nonnull align 8 dereferenceable(8) %271, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %272 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8
  %274 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8
  %276 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %273, ptr %275, ptr noundef nonnull align 8 dereferenceable(12) %27)
  %277 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %276, ptr %277, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  %278 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %279 = getelementptr inbounds %"struct.std::pair", ptr %278, i32 0, i32 0
  %280 = load i64, ptr %279, align 8, !tbaa !21
  %281 = load i32, ptr %22, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %282
  %284 = load i64, ptr %283, align 8, !tbaa !16
  %285 = icmp eq i64 %280, %284
  br i1 %285, label %286, label %291

286:                                              ; preds = %264
  store i8 0, ptr %9, align 1, !tbaa !14
  %287 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %288 = getelementptr inbounds %"struct.std::pair", ptr %287, i32 0, i32 1
  %289 = load i32, ptr %288, align 8, !tbaa !23
  store i32 %289, ptr %13, align 4, !tbaa !5
  %290 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %290, ptr %14, align 4, !tbaa !5
  store i32 19, ptr %18, align 4
  br label %292

291:                                              ; preds = %264
  store i32 0, ptr %18, align 4
  br label %292

292:                                              ; preds = %291, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  %293 = load i32, ptr %18, align 4
  switch i32 %293, label %298 [
    i32 0, label %294
  ]

294:                                              ; preds = %292
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %22, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %22, align 4, !tbaa !5
  br label %206, !llvm.loop !24

298:                                              ; preds = %292, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299, %190
  %301 = load i8, ptr %9, align 1, !tbaa !14, !range !19, !noundef !20
  %302 = trunc i8 %301 to i1
  br i1 %302, label %303, label %305

303:                                              ; preds = %300
  %304 = call i32 @puts(ptr noundef @.str.2)
  br label %375

305:                                              ; preds = %300
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %315, %305
  %307 = load i32, ptr %29, align 4, !tbaa !5
  %308 = load i32, ptr @n, align 4, !tbaa !5
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %306
  store i32 22, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %318

311:                                              ; preds = %306
  %312 = load i32, ptr %29, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %313
  store i8 78, ptr %314, align 1, !tbaa !25
  br label %315

315:                                              ; preds = %311
  %316 = load i32, ptr %29, align 4, !tbaa !5
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %29, align 4, !tbaa !5
  br label %306, !llvm.loop !26

318:                                              ; preds = %310
  %319 = load i32, ptr @n, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %320
  store i8 0, ptr %321, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %322

322:                                              ; preds = %369, %318
  %323 = load i32, ptr %30, align 4, !tbaa !5
  %324 = icmp slt i32 %323, 16
  br i1 %324, label %326, label %325

325:                                              ; preds = %322
  store i32 25, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %372

326:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %327 = load i32, ptr %13, align 4, !tbaa !5
  %328 = srem i32 %327, 3
  store i32 %328, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %329 = load i32, ptr %14, align 4, !tbaa !5
  %330 = srem i32 %329, 3
  store i32 %330, ptr %32, align 4, !tbaa !5
  %331 = load i32, ptr %13, align 4, !tbaa !5
  %332 = sdiv i32 %331, 3
  store i32 %332, ptr %13, align 4, !tbaa !5
  %333 = load i32, ptr %14, align 4, !tbaa !5
  %334 = sdiv i32 %333, 3
  store i32 %334, ptr %14, align 4, !tbaa !5
  %335 = load i32, ptr %31, align 4, !tbaa !5
  %336 = icmp eq i32 %335, 1
  br i1 %336, label %337, label %341

337:                                              ; preds = %326
  %338 = load i32, ptr %30, align 4, !tbaa !5
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %339
  store i8 65, ptr %340, align 1, !tbaa !25
  br label %349

341:                                              ; preds = %326
  %342 = load i32, ptr %31, align 4, !tbaa !5
  %343 = icmp eq i32 %342, 2
  br i1 %343, label %344, label %348

344:                                              ; preds = %341
  %345 = load i32, ptr %30, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %346
  store i8 66, ptr %347, align 1, !tbaa !25
  br label %348

348:                                              ; preds = %344, %341
  br label %349

349:                                              ; preds = %348, %337
  %350 = load i32, ptr %32, align 4, !tbaa !5
  %351 = icmp eq i32 %350, 1
  br i1 %351, label %352, label %358

352:                                              ; preds = %349
  %353 = load i32, ptr %30, align 4, !tbaa !5
  %354 = load i32, ptr %10, align 4, !tbaa !5
  %355 = add nsw i32 %353, %354
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %356
  store i8 66, ptr %357, align 1, !tbaa !25
  br label %368

358:                                              ; preds = %349
  %359 = load i32, ptr %32, align 4, !tbaa !5
  %360 = icmp eq i32 %359, 2
  br i1 %360, label %361, label %367

361:                                              ; preds = %358
  %362 = load i32, ptr %30, align 4, !tbaa !5
  %363 = load i32, ptr %10, align 4, !tbaa !5
  %364 = add nsw i32 %362, %363
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %365
  store i8 65, ptr %366, align 1, !tbaa !25
  br label %367

367:                                              ; preds = %361, %358
  br label %368

368:                                              ; preds = %367, %352
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %369

369:                                              ; preds = %368
  %370 = load i32, ptr %30, align 4, !tbaa !5
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %30, align 4, !tbaa !5
  br label %322, !llvm.loop !27

372:                                              ; preds = %325
  %373 = call i32 @puts(ptr noundef @.str.3)
  %374 = call i32 @puts(ptr noundef @s)
  br label %375

375:                                              ; preds = %372, %303
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %82, !llvm.loop !28

376:                                              ; preds = %82
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %377 = load i32, ptr %1, align 4
  ret i32 %377
}

; 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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJiiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJRxRiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(12)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxiEC2IRxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

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

declare i32 @puts(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTSSt4pairIxiE", !17, i64 0, !6, i64 8}
!23 = !{!22, !6, i64 8}
!24 = distinct !{!24, !10}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@n = external dso_local global i32, align 4
@a = external dso_local global [100100 x i32], align 16
@pw = external dso_local local_unnamed_addr global [20 x i32], align 16
@lb = external dso_local local_unnamed_addr global [50005000 x i32], align 16
@nb = external dso_local local_unnamed_addr global [50005000 x i32], align 16
@dp = external dso_local global [50005000 x i64], align 16
@vec = external dso_local global %"class.std::vector", align 8
@s = external dso_local global [100100 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL1D = external hidden constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader111.preheader:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i32, align 4
  store <4 x i32> <i32 1, i32 3, i32 9, i32 27>, ptr @pw, align 16, !tbaa !5
  store <4 x i32> <i32 81, i32 243, i32 729, i32 2187>, ptr getelementptr inbounds (i8, ptr @pw, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 6561, i32 19683, i32 59049, i32 177147>, ptr getelementptr inbounds (i8, ptr @pw, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 531441, i32 1594323, i32 4782969, i32 14348907>, ptr getelementptr inbounds (i8, ptr @pw, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 43046721, i32 129140163, i32 387420489, i32 1162261467>, ptr getelementptr inbounds (i8, ptr @pw, i64 64), align 16, !tbaa !5
  br label %.preheader111

.preheader111:                                    ; preds = %.preheader111.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 1, %.preheader111.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %7 = trunc nuw nsw i64 %indvars.iv to i32
  %8 = urem i32 %7, 3
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

10:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #8
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %0)
  %12 = load i32, ptr %0, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr %0, align 4, !tbaa !5
  %.not145 = icmp eq i32 %12, 0
  br i1 %.not145, label %._crit_edge150, label %.lr.ph149

.lr.ph:                                           ; preds = %.preheader111, %.lr.ph
  %.077117 = phi i32 [ %15, %.lr.ph ], [ 0, %.preheader111 ]
  %.078116 = phi i32 [ %14, %.lr.ph ], [ %7, %.preheader111 ]
  %14 = sdiv i32 %.078116, 3
  %15 = add nuw nsw i32 %.077117, 1
  %16 = srem i32 %14, 3
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %.preheader111
  %.077.lcssa = phi i32 [ 0, %.preheader111 ], [ %15, %.lr.ph ]
  %.lcssa114 = phi i32 [ %8, %.preheader111 ], [ %16, %.lr.ph ]
  %18 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %indvars.iv
  store i32 %.077.lcssa, ptr %18, align 4, !tbaa !5
  %19 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %indvars.iv
  store i32 %.lcssa114, ptr %19, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 50005000
  br i1 %exitcond.not, label %10, label %.preheader111, !llvm.loop !11

.lr.ph149:                                        ; preds = %10, %148
  %.084147 = phi i32 [ %.9, %148 ], [ undef, %10 ]
  %.091146 = phi i32 [ %.9100, %148 ], [ undef, %10 ]
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph122, label %._crit_edge123

._crit_edge123:                                   ; preds = %.lr.ph122, %.lr.ph149
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @_ZL1D)
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = ashr i32 %24, 1
  %26 = sub nsw i32 %24, %25
  %27 = sext i32 %25 to i64
  %28 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #8
  %30 = sext i32 %29 to i64
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %30)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJiiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  %32 = icmp sgt i32 %29, 1
  br i1 %32, label %.lr.ph126, label %._crit_edge127

.lr.ph122:                                        ; preds = %.lr.ph149, %.lr.ph122
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %.lr.ph122 ], [ 0, %.lr.ph149 ]
  %33 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv157
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %33)
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next158, %36
  br i1 %37, label %.lr.ph122, label %._crit_edge123, !llvm.loop !12

.lr.ph126:                                        ; preds = %._crit_edge123, %73
  %storemerge124 = phi i32 [ %74, %73 ], [ 1, %._crit_edge123 ]
  %38 = sext i32 %storemerge124 to i64
  %39 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %38
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 1
  %44 = sext i32 %40 to i64
  %45 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  br i1 %43, label %47, label %56

47:                                               ; preds = %.lr.ph126
  %48 = sub nsw i32 %storemerge124, %46
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %44
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = add nsw i64 %51, %54
  br label %66

56:                                               ; preds = %.lr.ph126
  %57 = shl nsw i32 %46, 1
  %58 = sub nsw i32 %storemerge124, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %44
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = sub nsw i64 %61, %64
  br label %66

66:                                               ; preds = %56, %47
  %.sink = phi i64 [ %55, %47 ], [ %65, %56 ]
  %67 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %38
  store i64 %.sink, ptr %67, align 8
  %68 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJRxRiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) @vec, ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !13
  %.not106 = icmp ne i64 %72, 0
  br i1 %.not106, label %73, label %._crit_edge127

73:                                               ; preds = %66
  %74 = add nsw i32 %69, 1
  store i32 %74, ptr %3, align 4, !tbaa !5
  %75 = icmp slt i32 %74, %29
  br i1 %75, label %.lr.ph126, label %._crit_edge127, !llvm.loop !15

._crit_edge127:                                   ; preds = %66, %73, %._crit_edge123
  %.394 = phi i32 [ %.091146, %._crit_edge123 ], [ %.091146, %73 ], [ %69, %66 ]
  %.387 = phi i32 [ %.084147, %._crit_edge123 ], [ %.084147, %73 ], [ 0, %66 ]
  %.2 = phi i1 [ true, %._crit_edge123 ], [ %.not106, %73 ], [ %.not106, %66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %76 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #8
  %77 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %76, ptr %77)
  br i1 %.2, label %78, label %.preheader

78:                                               ; preds = %._crit_edge127
  %79 = sext i32 %26 to i64
  %80 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp sgt i32 %81, 1
  br i1 %82, label %.lr.ph137.preheader, label %.loopexit

.lr.ph137.preheader:                              ; preds = %78
  %wide.trip.count = zext nneg i32 %81 to i64
  br label %.lr.ph137

.lr.ph137:                                        ; preds = %.lr.ph137.preheader, %128
  %indvars.iv160 = phi i64 [ 1, %.lr.ph137.preheader ], [ %indvars.iv.next161, %128 ]
  %83 = getelementptr inbounds [50005000 x i32], ptr @lb, i64 0, i64 %indvars.iv160
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = getelementptr inbounds [50005000 x i32], ptr @nb, i64 0, i64 %indvars.iv160
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp eq i32 %86, 1
  %88 = sext i32 %84 to i64
  %89 = getelementptr inbounds [20 x i32], ptr @pw, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  br i1 %87, label %91, label %103

91:                                               ; preds = %.lr.ph137
  %92 = trunc nuw nsw i64 %indvars.iv160 to i32
  %93 = sub nsw i32 %92, %90
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !13
  %97 = add nsw i32 %84, %25
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = add nsw i64 %96, %101
  br label %116

103:                                              ; preds = %.lr.ph137
  %104 = shl nsw i32 %90, 1
  %105 = trunc nuw nsw i64 %indvars.iv160 to i32
  %106 = sub nsw i32 %105, %104
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !13
  %110 = add nsw i32 %84, %25
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = sub nsw i64 %109, %114
  br label %116

116:                                              ; preds = %103, %91
  %.sink171 = phi i64 [ %102, %91 ], [ %115, %103 ]
  %117 = getelementptr inbounds [50005000 x i64], ptr @dp, i64 0, i64 %indvars.iv160
  store i64 %.sink171, ptr %117, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %118 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #8
  %119 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @vec) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @_ZNSt4pairIxiEC2IRxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %120 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %118, ptr %119, ptr noundef nonnull align 8 dereferenceable(12) %5)
  store ptr %120, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  %121 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %122 = load i64, ptr %121, align 8, !tbaa !16
  %123 = load i64, ptr %117, align 8, !tbaa !13
  %.not107 = icmp eq i64 %122, %123
  br i1 %.not107, label %.loopexit.thread, label %128

.loopexit.thread:                                 ; preds = %116
  %124 = trunc nuw nsw i64 %indvars.iv160 to i32
  %125 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %126 = getelementptr inbounds i8, ptr %125, i64 8
  %127 = load i32, ptr %126, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %.preheader

128:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %exitcond163.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count
  br i1 %exitcond163.not, label %.loopexit, label %.lr.ph137, !llvm.loop !19

.loopexit:                                        ; preds = %128, %78
  br i1 %.2, label %148, label %.preheader

.preheader:                                       ; preds = %._crit_edge127, %.loopexit.thread, %.loopexit
  %.7176 = phi i32 [ %124, %.loopexit.thread ], [ %.387, %.loopexit ], [ %.387, %._crit_edge127 ]
  %.798175 = phi i32 [ %127, %.loopexit.thread ], [ %.394, %.loopexit ], [ %.394, %._crit_edge127 ]
  %129 = load i32, ptr @n, align 4, !tbaa !5
  %130 = icmp sgt i32 %129, 0
  br i1 %130, label %.lr.ph139.preheader, label %._crit_edge140

.lr.ph139.preheader:                              ; preds = %.preheader
  %131 = zext nneg i32 %129 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @s, i8 78, i64 %131, i1 false), !tbaa !20
  br label %._crit_edge140

._crit_edge140:                                   ; preds = %.lr.ph139.preheader, %.preheader
  %132 = sext i32 %129 to i64
  %133 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %132
  store i8 0, ptr %133, align 1, !tbaa !20
  br label %136

134:                                              ; preds = %147
  %135 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %148

136:                                              ; preds = %._crit_edge140, %147
  %indvars.iv167 = phi i64 [ 0, %._crit_edge140 ], [ %indvars.iv.next168, %147 ]
  %.8143 = phi i32 [ %.7176, %._crit_edge140 ], [ %140, %147 ]
  %.899142 = phi i32 [ %.798175, %._crit_edge140 ], [ %139, %147 ]
  %137 = srem i32 %.899142, 3
  %138 = srem i32 %.8143, 3
  %139 = sdiv i32 %.899142, 3
  %140 = sdiv i32 %.8143, 3
  switch i32 %137, label %143 [
    i32 1, label %.sink.split
    i32 2, label %141
  ]

141:                                              ; preds = %136
  br label %.sink.split

.sink.split:                                      ; preds = %136, %141
  %.sink181 = phi i8 [ 66, %141 ], [ 65, %136 ]
  %142 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %indvars.iv167
  store i8 %.sink181, ptr %142, align 1, !tbaa !20
  br label %143

143:                                              ; preds = %.sink.split, %136
  switch i32 %138, label %147 [
    i32 1, label %.sink.split183
    i32 2, label %144
  ]

144:                                              ; preds = %143
  br label %.sink.split183

.sink.split183:                                   ; preds = %143, %144
  %.sink184 = phi i8 [ 65, %144 ], [ 66, %143 ]
  %145 = add nsw i64 %indvars.iv167, %27
  %146 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %145
  store i8 %.sink184, ptr %146, align 1, !tbaa !20
  br label %147

147:                                              ; preds = %.sink.split183, %143
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next168, 16
  br i1 %exitcond170.not, label %134, label %136, !llvm.loop !21

148:                                              ; preds = %.loopexit, %134
  %s.sink = phi ptr [ @s, %134 ], [ @.str.2, %.loopexit ]
  %.9100 = phi i32 [ %139, %134 ], [ %.394, %.loopexit ]
  %.9 = phi i32 [ %140, %134 ], [ %.387, %.loopexit ]
  %149 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %s.sink)
  %150 = load i32, ptr %0, align 4, !tbaa !5
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %0, align 4, !tbaa !5
  %.not = icmp eq i32 %150, 0
  br i1 %.not, label %._crit_edge150, label %.lr.ph149, !llvm.loop !22

._crit_edge150:                                   ; preds = %148, %10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #8
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJiiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE12emplace_backIJRxRiEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxiEC2IRxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 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 nounwind willreturn memory(argmem: write) }
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 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!17, !14, i64 0}
!17 = !{!"_ZTSSt4pairIxiE", !14, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !10}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass