; LLVM IR from tangjz/acm-icpc :: uvalive (7220)

; 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@Q = external dso_local global %"class.std::priority_queue", align 8
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@S = external dso_local global i32, align 4
@T = external dso_local global i32, align 4
@dis = external dso_local global [100001 x i32], align 16
@sum = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@buf = external dso_local global [101 x [101 x i8]], align 16
@vis = external dso_local global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden constant [4 x i32], align 16
@_ZL2dy = external hidden constant [4 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [14 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 %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %292, %0
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr @t, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %295

28:                                               ; preds = %23
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  store i32 0, ptr @sum, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %107, %28
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %110

35:                                               ; preds = %30
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %37
  %39 = getelementptr inbounds [101 x i8], ptr %38, i64 0, i64 0
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %39)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %103, %35
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [101 x i8], ptr %49, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !9
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 65
  br i1 %55, label %56, label %68

56:                                               ; preds = %46
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr @m, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = add nsw i32 %59, %60
  store i32 %61, ptr @S, align 4, !tbaa !5
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [101 x i8], ptr %64, i64 0, i64 %66
  store i8 49, ptr %67, align 1, !tbaa !9
  br label %91

68:                                               ; preds = %46
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %70
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [101 x i8], ptr %71, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 66
  br i1 %77, label %78, label %90

78:                                               ; preds = %68
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = load i32, ptr @m, align 4, !tbaa !5
  %81 = mul nsw i32 %79, %80
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = add nsw i32 %81, %82
  store i32 %83, ptr @T, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [101 x i8], ptr %86, i64 0, i64 %88
  store i8 49, ptr %89, align 1, !tbaa !9
  br label %90

90:                                               ; preds = %78, %68
  br label %91

91:                                               ; preds = %90, %56
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %93
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [101 x i8], ptr %94, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !9
  %99 = sext i8 %98 to i32
  %100 = sub nsw i32 %99, 48
  %101 = load i32, ptr @sum, align 4, !tbaa !5
  %102 = add nsw i32 %101, %100
  store i32 %102, ptr @sum, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %91
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !10

106:                                              ; preds = %45
  br label %107

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

110:                                              ; preds = %34
  br label %111

111:                                              ; preds = %115, %110
  %112 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %113 = xor i1 %112, true
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  br label %115

115:                                              ; preds = %114
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br label %111, !llvm.loop !13

116:                                              ; preds = %111
  call void @llvm.memset.p0.i64(ptr align 16 @dis, i8 63, i64 400004, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 100001, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %117 = load i32, ptr @S, align 4, !tbaa !5
  %118 = mul nsw i32 %117, 10
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %6, align 4, !tbaa !5
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %121
  store i32 1, ptr %122, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %124
  %126 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %125, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %126, ptr %7, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %127

127:                                              ; preds = %250, %248, %116
  %128 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %129 = xor i1 %128, true
  br i1 %129, label %130, label %251

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %131 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %132 = getelementptr inbounds %"struct.std::pair", ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !14
  store i32 %133, ptr %8, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !16, !range !18, !noundef !19
  %138 = trunc i8 %137 to i1
  br i1 %138, label %139, label %140

139:                                              ; preds = %130
  store i32 14, ptr %3, align 4
  br label %248, !llvm.loop !20

140:                                              ; preds = %130
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %142
  store i8 1, ptr %143, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = sdiv i32 %144, 10
  store i32 %145, ptr %10, align 4, !tbaa !5
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = srem i32 %146, 10
  store i32 %147, ptr %11, align 4, !tbaa !5
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = load i32, ptr @m, align 4, !tbaa !5
  %150 = sdiv i32 %148, %149
  store i32 %150, ptr %9, align 4, !tbaa !5
  %151 = load i32, ptr %10, align 4, !tbaa !5
  %152 = load i32, ptr @m, align 4, !tbaa !5
  %153 = srem i32 %151, %152
  store i32 %153, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %244, %140
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = icmp slt i32 %155, 4
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %247

158:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %159, %163
  store i32 %164, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %165 = load i32, ptr %10, align 4, !tbaa !5
  %166 = load i32, ptr %12, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = add nsw i32 %165, %169
  store i32 %170, ptr %14, align 4, !tbaa !5
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = icmp slt i32 %171, 0
  br i1 %172, label %194, label %173

173:                                              ; preds = %158
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = load i32, ptr @n, align 4, !tbaa !5
  %176 = icmp sge i32 %174, %175
  br i1 %176, label %194, label %177

177:                                              ; preds = %173
  %178 = load i32, ptr %14, align 4, !tbaa !5
  %179 = icmp slt i32 %178, 0
  br i1 %179, label %194, label %180

180:                                              ; preds = %177
  %181 = load i32, ptr %14, align 4, !tbaa !5
  %182 = load i32, ptr @m, align 4, !tbaa !5
  %183 = icmp sge i32 %181, %182
  br i1 %183, label %194, label %184

184:                                              ; preds = %180
  %185 = load i32, ptr %13, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %186
  %188 = load i32, ptr %14, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [101 x i8], ptr %187, i64 0, i64 %189
  %191 = load i8, ptr %190, align 1, !tbaa !9
  %192 = sext i8 %191 to i32
  %193 = icmp eq i32 %192, 48
  br i1 %193, label %194, label %195

194:                                              ; preds = %184, %180, %177, %173, %158
  store i32 18, ptr %3, align 4
  br label %241

195:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %196 = load i32, ptr %13, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %197
  %199 = load i32, ptr %14, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [101 x i8], ptr %198, i64 0, i64 %200
  %202 = load i8, ptr %201, align 1, !tbaa !9
  %203 = sext i8 %202 to i32
  %204 = sub nsw i32 %203, 48
  store i32 %204, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %205 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %206 = load i32, ptr %205, align 4, !tbaa !5
  store i32 %206, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %207 = load i32, ptr %13, align 4, !tbaa !5
  %208 = load i32, ptr @m, align 4, !tbaa !5
  %209 = mul nsw i32 %207, %208
  %210 = load i32, ptr %14, align 4, !tbaa !5
  %211 = add nsw i32 %209, %210
  %212 = mul nsw i32 %211, 10
  %213 = load i32, ptr %16, align 4, !tbaa !5
  %214 = add nsw i32 %212, %213
  store i32 %214, ptr %17, align 4, !tbaa !5
  %215 = load i32, ptr %17, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !5
  %219 = load i32, ptr %8, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = load i32, ptr %15, align 4, !tbaa !5
  %224 = add nsw i32 %222, %223
  %225 = icmp sgt i32 %218, %224
  br i1 %225, label %226, label %240

226:                                              ; preds = %195
  %227 = load i32, ptr %8, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = load i32, ptr %15, align 4, !tbaa !5
  %232 = add nsw i32 %230, %231
  %233 = load i32, ptr %17, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %234
  store i32 %232, ptr %235, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %236 = load i32, ptr %17, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %237
  %239 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %238, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %239, ptr %18, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %240

240:                                              ; preds = %226, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  store i32 0, ptr %3, align 4
  br label %241

241:                                              ; preds = %240, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %242 = load i32, ptr %3, align 4
  switch i32 %242, label %296 [
    i32 0, label %243
    i32 18, label %244
  ]

243:                                              ; preds = %241
  br label %244

244:                                              ; preds = %243, %241
  %245 = load i32, ptr %12, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %12, align 4, !tbaa !5
  br label %154, !llvm.loop !21

247:                                              ; preds = %157
  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 4, ptr %9) #7
  store i32 0, ptr %3, align 4
  br label %248

248:                                              ; preds = %247, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %249 = load i32, ptr %3, align 4
  switch i32 %249, label %296 [
    i32 0, label %250
    i32 14, label %127
  ]

250:                                              ; preds = %248
  br label %127, !llvm.loop !20

251:                                              ; preds = %127
  store i32 0, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %252

252:                                              ; preds = %285, %251
  %253 = load i32, ptr %19, align 4, !tbaa !5
  %254 = icmp slt i32 %253, 10
  br i1 %254, label %256, label %255

255:                                              ; preds = %252
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %288

256:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %257 = load i32, ptr @T, align 4, !tbaa !5
  %258 = mul nsw i32 %257, 10
  %259 = load i32, ptr %19, align 4, !tbaa !5
  %260 = add nsw i32 %258, %259
  store i32 %260, ptr %20, align 4, !tbaa !5
  %261 = load i32, ptr %20, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = icmp eq i32 %264, 1061109567
  br i1 %265, label %266, label %267

266:                                              ; preds = %256
  store i32 21, ptr %3, align 4
  br label %282

267:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %268 = load i32, ptr @sum, align 4, !tbaa !5
  %269 = load i32, ptr %20, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = sub nsw i32 %268, %272
  %274 = load i32, ptr %19, align 4, !tbaa !5
  %275 = add nsw i32 %273, %274
  store i32 %275, ptr %21, align 4, !tbaa !5
  %276 = load i32, ptr @ans, align 4, !tbaa !5
  %277 = load i32, ptr %21, align 4, !tbaa !5
  %278 = icmp slt i32 %276, %277
  br i1 %278, label %279, label %281

279:                                              ; preds = %267
  %280 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %280, ptr @ans, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %279, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  store i32 0, ptr %3, align 4
  br label %282

282:                                              ; preds = %281, %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  %283 = load i32, ptr %3, align 4
  switch i32 %283, label %296 [
    i32 0, label %284
    i32 21, label %285
  ]

284:                                              ; preds = %282
  br label %285

285:                                              ; preds = %284, %282
  %286 = load i32, ptr %19, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %19, align 4, !tbaa !5
  br label %252, !llvm.loop !22

288:                                              ; preds = %255
  %289 = load i32, ptr %2, align 4, !tbaa !5
  %290 = load i32, ptr @ans, align 4, !tbaa !5
  %291 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %289, i32 noundef %290)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %292

292:                                              ; preds = %288
  %293 = load i32, ptr %2, align 4, !tbaa !5
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %2, align 4, !tbaa !5
  br label %23, !llvm.loop !23

295:                                              ; preds = %27
  ret i32 0

296:                                              ; preds = %282, %248, %241
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #1

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


; 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@Q = external dso_local global %"class.std::priority_queue", align 8
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@S = external dso_local local_unnamed_addr global i32, align 4
@T = external dso_local local_unnamed_addr global i32, align 4
@dis = external dso_local global [100001 x i32], align 16
@sum = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@buf = external dso_local global [101 x [101 x i8]], align 16
@vis = external dso_local local_unnamed_addr global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZL2dy = external hidden local_unnamed_addr constant [4 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %8 = load i32, ptr @t, align 4, !tbaa !5
  %.not83 = icmp slt i32 %8, 1
  br i1 %.not83, label %._crit_edge87, label %.lr.ph86.preheader

.lr.ph86.preheader:                               ; preds = %0
  %9 = load i32, ptr @_ZL2dx, align 16
  %10 = load i32, ptr @_ZL2dy, align 16
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph86

._crit_edge87:                                    ; preds = %328, %0
  ret i32 0

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %328
  %.084 = phi i32 [ %331, %328 ], [ 1, %.lr.ph86.preheader ]
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  store i32 0, ptr @sum, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph75, label %.preheader

.preheader:                                       ; preds = %37, %.lr.ph86
  %20 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %20, label %._crit_edge77, label %.lr.ph76

.lr.ph75:                                         ; preds = %.lr.ph86, %37
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %37 ], [ 0, %.lr.ph86 ]
  %21 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv89
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %21)
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %37

.lr.ph:                                           ; preds = %.lr.ph75
  %sum.promoted = load i32, ptr @sum, align 4, !tbaa !5
  %25 = zext nneg i32 %23 to i64
  %26 = mul nuw nsw i64 %indvars.iv89, %25
  %xtraiter = and i64 %25, 1
  %27 = icmp eq i32 %23, 1
  br i1 %27, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %25, 2147483646
  br label %41

._crit_edge.unr-lcssa:                            ; preds = %58, %.lr.ph
  %.lcssa.ph = phi i32 [ poison, %.lr.ph ], [ %62, %58 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %58 ]
  %.unr = phi i32 [ %sum.promoted, %.lr.ph ], [ %62, %58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa
  %28 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv89, i64 %indvars.iv.unr
  %29 = load i8, ptr %28, align 1, !tbaa !9
  switch i8 %29, label %._crit_edge.epilog-lcssa [
    i8 65, label %.sink.split.epil
    i8 66, label %30
  ]

30:                                               ; preds = %.epil.preheader
  br label %.sink.split.epil

.sink.split.epil:                                 ; preds = %30, %.epil.preheader
  %T.sink.epil = phi ptr [ @T, %30 ], [ @S, %.epil.preheader ]
  %31 = add nuw nsw i64 %26, %indvars.iv.unr
  %32 = trunc nuw i64 %31 to i32
  store i32 %32, ptr %T.sink.epil, align 4, !tbaa !5
  store i8 49, ptr %28, align 1, !tbaa !9
  br label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %.sink.split.epil, %.epil.preheader
  %33 = phi i8 [ %29, %.epil.preheader ], [ 49, %.sink.split.epil ]
  %34 = sext i8 %33 to i32
  %35 = add nsw i32 %34, -48
  %36 = add nsw i32 %35, %.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %36, %._crit_edge.epilog-lcssa ]
  store i32 %.lcssa, ptr @sum, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %._crit_edge, %.lr.ph75
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next90, %39
  br i1 %40, label %.lr.ph75, label %.preheader, !llvm.loop !10

41:                                               ; preds = %58, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %58 ]
  %42 = phi i32 [ %sum.promoted, %.lr.ph.new ], [ %62, %58 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %58 ]
  %43 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv89, i64 %indvars.iv
  %44 = load i8, ptr %43, align 1, !tbaa !9
  switch i8 %44, label %48 [
    i8 65, label %.sink.split
    i8 66, label %45
  ]

45:                                               ; preds = %41
  br label %.sink.split

.sink.split:                                      ; preds = %41, %45
  %T.sink = phi ptr [ @T, %45 ], [ @S, %41 ]
  %46 = add nuw nsw i64 %26, %indvars.iv
  %47 = trunc nuw i64 %46 to i32
  store i32 %47, ptr %T.sink, align 4, !tbaa !5
  store i8 49, ptr %43, align 1, !tbaa !9
  br label %48

48:                                               ; preds = %.sink.split, %41
  %49 = phi i8 [ %44, %41 ], [ 49, %.sink.split ]
  %50 = sext i8 %49 to i32
  %51 = add nsw i32 %50, -48
  %52 = add nsw i32 %51, %42
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %53 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv89, i64 %indvars.iv.next
  %54 = load i8, ptr %53, align 1, !tbaa !9
  switch i8 %54, label %58 [
    i8 65, label %.sink.split.1
    i8 66, label %55
  ]

55:                                               ; preds = %48
  br label %.sink.split.1

.sink.split.1:                                    ; preds = %55, %48
  %T.sink.1 = phi ptr [ @T, %55 ], [ @S, %48 ]
  %56 = add nuw nsw i64 %26, %indvars.iv.next
  %57 = trunc nuw i64 %56 to i32
  store i32 %57, ptr %T.sink.1, align 4, !tbaa !5
  store i8 49, ptr %53, align 1, !tbaa !9
  br label %58

58:                                               ; preds = %.sink.split.1, %48
  %59 = phi i8 [ %54, %48 ], [ 49, %.sink.split.1 ]
  %60 = sext i8 %59 to i32
  %61 = add nsw i32 %60, -48
  %62 = add nsw i32 %61, %52
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %41, !llvm.loop !12

.lr.ph76:                                         ; preds = %.preheader, %.lr.ph76
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %63 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %63, label %._crit_edge77, label %.lr.ph76, !llvm.loop !13

._crit_edge77:                                    ; preds = %.lr.ph76, %.preheader
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400004) @dis, i8 63, i64 400004, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100001) @vis, i8 0, i64 100001, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %64 = load i32, ptr @S, align 4, !tbaa !5
  %65 = mul nsw i32 %64, 10
  %66 = or disjoint i32 %65, 1
  store i32 %66, ptr %1, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %67
  store i32 1, ptr %68, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %69 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %68, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %69, ptr %2, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %70 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %70, label %._crit_edge81, label %.lr.ph80

.lr.ph80:                                         ; preds = %._crit_edge77, %225
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %72 = getelementptr inbounds i8, ptr %71, i64 4
  %73 = load i32, ptr %72, align 4, !tbaa !14
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !16, !range !18, !noundef !19
  %77 = trunc nuw i8 %76 to i1
  br i1 %77, label %225, label %78, !llvm.loop !20

78:                                               ; preds = %.lr.ph80
  store i8 1, ptr %75, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %79 = sdiv i32 %73, 10
  %80 = srem i32 %73, 10
  store i32 %80, ptr %3, align 4, !tbaa !5
  %81 = load i32, ptr @m, align 4
  %82 = sdiv i32 %79, %81
  %83 = srem i32 %79, %81
  %84 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %74
  %85 = add nsw i32 %9, %82
  %86 = add nsw i32 %10, %83
  %87 = icmp slt i32 %85, 0
  br i1 %87, label %119, label %88

88:                                               ; preds = %78
  %89 = load i32, ptr @n, align 4, !tbaa !5
  %90 = icmp slt i32 %85, %89
  %91 = icmp sgt i32 %86, -1
  %.not67 = icmp slt i32 %86, %81
  %92 = and i1 %91, %.not67
  %or.cond68 = select i1 %90, i1 %92, i1 false
  br i1 %or.cond68, label %93, label %119

93:                                               ; preds = %88
  %94 = zext nneg i32 %85 to i64
  %95 = zext nneg i32 %86 to i64
  %96 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %94, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = icmp eq i8 %97, 48
  br i1 %98, label %119, label %99

99:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %100 = sext i8 %97 to i32
  %101 = add nsw i32 %100, -48
  store i32 %101, ptr %4, align 4, !tbaa !5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %104 = load i32, ptr @m, align 4, !tbaa !5
  %105 = mul nsw i32 %104, %85
  %106 = add nsw i32 %105, %86
  %107 = mul nsw i32 %106, 10
  %108 = add nsw i32 %107, %103
  store i32 %108, ptr %5, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = load i32, ptr %84, align 4, !tbaa !5
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = add nsw i32 %113, %112
  %115 = icmp sgt i32 %111, %114
  br i1 %115, label %116, label %118

116:                                              ; preds = %99
  store i32 %114, ptr %110, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %117 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %110, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %117, ptr %6, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %118

118:                                              ; preds = %116, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %119

119:                                              ; preds = %78, %88, %93, %118
  %120 = add nsw i32 %11, %82
  %121 = add nsw i32 %12, %83
  %122 = icmp slt i32 %120, 0
  br i1 %122, label %154, label %123

123:                                              ; preds = %119
  %124 = load i32, ptr @n, align 4, !tbaa !5
  %125 = icmp slt i32 %120, %124
  %126 = icmp sgt i32 %121, -1
  %or.cond.not71.1 = select i1 %125, i1 %126, i1 false
  %127 = load i32, ptr @m, align 4
  %.not67.1 = icmp slt i32 %121, %127
  %or.cond68.1 = select i1 %or.cond.not71.1, i1 %.not67.1, i1 false
  br i1 %or.cond68.1, label %128, label %154

128:                                              ; preds = %123
  %129 = zext nneg i32 %120 to i64
  %130 = zext nneg i32 %121 to i64
  %131 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %129, i64 %130
  %132 = load i8, ptr %131, align 1, !tbaa !9
  %133 = icmp eq i8 %132, 48
  br i1 %133, label %154, label %134

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %135 = sext i8 %132 to i32
  %136 = add nsw i32 %135, -48
  store i32 %136, ptr %4, align 4, !tbaa !5
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %138 = load i32, ptr %137, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %139 = load i32, ptr @m, align 4, !tbaa !5
  %140 = mul nsw i32 %139, %120
  %141 = add nsw i32 %140, %121
  %142 = mul nsw i32 %141, 10
  %143 = add nsw i32 %142, %138
  store i32 %143, ptr %5, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr %84, align 4, !tbaa !5
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = add nsw i32 %148, %147
  %150 = icmp sgt i32 %146, %149
  br i1 %150, label %151, label %153

151:                                              ; preds = %134
  store i32 %149, ptr %145, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %152 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %152, ptr %6, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %153

153:                                              ; preds = %151, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %154

154:                                              ; preds = %153, %128, %123, %119
  %155 = add nsw i32 %13, %82
  %156 = add nsw i32 %14, %83
  %157 = icmp slt i32 %155, 0
  br i1 %157, label %189, label %158

158:                                              ; preds = %154
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %160 = icmp slt i32 %155, %159
  %161 = icmp sgt i32 %156, -1
  %or.cond.not71.2 = select i1 %160, i1 %161, i1 false
  %162 = load i32, ptr @m, align 4
  %.not67.2 = icmp slt i32 %156, %162
  %or.cond68.2 = select i1 %or.cond.not71.2, i1 %.not67.2, i1 false
  br i1 %or.cond68.2, label %163, label %189

163:                                              ; preds = %158
  %164 = zext nneg i32 %155 to i64
  %165 = zext nneg i32 %156 to i64
  %166 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %164, i64 %165
  %167 = load i8, ptr %166, align 1, !tbaa !9
  %168 = icmp eq i8 %167, 48
  br i1 %168, label %189, label %169

169:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %170 = sext i8 %167 to i32
  %171 = add nsw i32 %170, -48
  store i32 %171, ptr %4, align 4, !tbaa !5
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %173 = load i32, ptr %172, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %174 = load i32, ptr @m, align 4, !tbaa !5
  %175 = mul nsw i32 %174, %155
  %176 = add nsw i32 %175, %156
  %177 = mul nsw i32 %176, 10
  %178 = add nsw i32 %177, %173
  store i32 %178, ptr %5, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = load i32, ptr %84, align 4, !tbaa !5
  %183 = load i32, ptr %4, align 4, !tbaa !5
  %184 = add nsw i32 %183, %182
  %185 = icmp sgt i32 %181, %184
  br i1 %185, label %186, label %188

186:                                              ; preds = %169
  store i32 %184, ptr %180, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %187 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %180, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %187, ptr %6, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %188

188:                                              ; preds = %186, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %189

189:                                              ; preds = %188, %163, %158, %154
  %190 = add nsw i32 %15, %82
  %191 = add nsw i32 %16, %83
  %192 = icmp slt i32 %190, 0
  br i1 %192, label %224, label %193

193:                                              ; preds = %189
  %194 = load i32, ptr @n, align 4, !tbaa !5
  %195 = icmp slt i32 %190, %194
  %196 = icmp sgt i32 %191, -1
  %or.cond.not71.3 = select i1 %195, i1 %196, i1 false
  %197 = load i32, ptr @m, align 4
  %.not67.3 = icmp slt i32 %191, %197
  %or.cond68.3 = select i1 %or.cond.not71.3, i1 %.not67.3, i1 false
  br i1 %or.cond68.3, label %198, label %224

198:                                              ; preds = %193
  %199 = zext nneg i32 %190 to i64
  %200 = zext nneg i32 %191 to i64
  %201 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %199, i64 %200
  %202 = load i8, ptr %201, align 1, !tbaa !9
  %203 = icmp eq i8 %202, 48
  br i1 %203, label %224, label %204

204:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %205 = sext i8 %202 to i32
  %206 = add nsw i32 %205, -48
  store i32 %206, ptr %4, align 4, !tbaa !5
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %208 = load i32, ptr %207, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %209 = load i32, ptr @m, align 4, !tbaa !5
  %210 = mul nsw i32 %209, %190
  %211 = add nsw i32 %210, %191
  %212 = mul nsw i32 %211, 10
  %213 = add nsw i32 %212, %208
  store i32 %213, ptr %5, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = load i32, ptr %84, align 4, !tbaa !5
  %218 = load i32, ptr %4, align 4, !tbaa !5
  %219 = add nsw i32 %218, %217
  %220 = icmp sgt i32 %216, %219
  br i1 %220, label %221, label %223

221:                                              ; preds = %204
  store i32 %219, ptr %215, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %222 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %215, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %222, ptr %6, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %223

223:                                              ; preds = %221, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %224

224:                                              ; preds = %223, %198, %193, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %225

225:                                              ; preds = %.lr.ph80, %224
  %226 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %226, label %._crit_edge81, label %.lr.ph80

._crit_edge81:                                    ; preds = %225, %._crit_edge77
  store i32 0, ptr @ans, align 4, !tbaa !5
  %227 = load i32, ptr @T, align 4, !tbaa !5
  %228 = mul nsw i32 %227, 10
  %229 = load i32, ptr @sum, align 4
  %230 = sext i32 %228 to i64
  %231 = or disjoint i64 %230, 1
  %232 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %231
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = icmp eq i32 %233, 1061109567
  br i1 %234, label %240, label %235

235:                                              ; preds = %._crit_edge81
  %236 = sub nsw i32 %229, %233
  %237 = icmp sgt i32 %236, -1
  br i1 %237, label %238, label %240

238:                                              ; preds = %235
  %239 = add nuw nsw i32 %236, 1
  store i32 %239, ptr @ans, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %235, %238, %._crit_edge81
  %241 = phi i32 [ 0, %235 ], [ %239, %238 ], [ 0, %._crit_edge81 ]
  %242 = add nsw i64 %230, 2
  %243 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %242
  %244 = load i32, ptr %243, align 8, !tbaa !5
  %245 = icmp eq i32 %244, 1061109567
  br i1 %245, label %251, label %246

246:                                              ; preds = %240
  %247 = sub nsw i32 %229, %244
  %248 = add nsw i32 %247, 2
  %249 = icmp slt i32 %241, %248
  br i1 %249, label %250, label %251

250:                                              ; preds = %246
  store i32 %248, ptr @ans, align 4, !tbaa !5
  br label %251

251:                                              ; preds = %250, %246, %240
  %252 = phi i32 [ %241, %246 ], [ %248, %250 ], [ %241, %240 ]
  %253 = add nsw i64 %230, 3
  %254 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = icmp eq i32 %255, 1061109567
  br i1 %256, label %262, label %257

257:                                              ; preds = %251
  %258 = sub nsw i32 %229, %255
  %259 = add nsw i32 %258, 3
  %260 = icmp slt i32 %252, %259
  br i1 %260, label %261, label %262

261:                                              ; preds = %257
  store i32 %259, ptr @ans, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %261, %257, %251
  %263 = phi i32 [ %252, %257 ], [ %259, %261 ], [ %252, %251 ]
  %264 = add nsw i64 %230, 4
  %265 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %264
  %266 = load i32, ptr %265, align 8, !tbaa !5
  %267 = icmp eq i32 %266, 1061109567
  br i1 %267, label %273, label %268

268:                                              ; preds = %262
  %269 = sub nsw i32 %229, %266
  %270 = add nsw i32 %269, 4
  %271 = icmp slt i32 %263, %270
  br i1 %271, label %272, label %273

272:                                              ; preds = %268
  store i32 %270, ptr @ans, align 4, !tbaa !5
  br label %273

273:                                              ; preds = %272, %268, %262
  %274 = phi i32 [ %263, %268 ], [ %270, %272 ], [ %263, %262 ]
  %275 = add nsw i64 %230, 5
  %276 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %275
  %277 = load i32, ptr %276, align 4, !tbaa !5
  %278 = icmp eq i32 %277, 1061109567
  br i1 %278, label %284, label %279

279:                                              ; preds = %273
  %280 = sub nsw i32 %229, %277
  %281 = add nsw i32 %280, 5
  %282 = icmp slt i32 %274, %281
  br i1 %282, label %283, label %284

283:                                              ; preds = %279
  store i32 %281, ptr @ans, align 4, !tbaa !5
  br label %284

284:                                              ; preds = %283, %279, %273
  %285 = phi i32 [ %274, %279 ], [ %281, %283 ], [ %274, %273 ]
  %286 = add nsw i64 %230, 6
  %287 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %286
  %288 = load i32, ptr %287, align 8, !tbaa !5
  %289 = icmp eq i32 %288, 1061109567
  br i1 %289, label %295, label %290

290:                                              ; preds = %284
  %291 = sub nsw i32 %229, %288
  %292 = add nsw i32 %291, 6
  %293 = icmp slt i32 %285, %292
  br i1 %293, label %294, label %295

294:                                              ; preds = %290
  store i32 %292, ptr @ans, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %294, %290, %284
  %296 = phi i32 [ %285, %290 ], [ %292, %294 ], [ %285, %284 ]
  %297 = add nsw i64 %230, 7
  %298 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %297
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = icmp eq i32 %299, 1061109567
  br i1 %300, label %306, label %301

301:                                              ; preds = %295
  %302 = sub nsw i32 %229, %299
  %303 = add nsw i32 %302, 7
  %304 = icmp slt i32 %296, %303
  br i1 %304, label %305, label %306

305:                                              ; preds = %301
  store i32 %303, ptr @ans, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %305, %301, %295
  %307 = phi i32 [ %296, %301 ], [ %303, %305 ], [ %296, %295 ]
  %308 = add nsw i64 %230, 8
  %309 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %308
  %310 = load i32, ptr %309, align 8, !tbaa !5
  %311 = icmp eq i32 %310, 1061109567
  br i1 %311, label %317, label %312

312:                                              ; preds = %306
  %313 = sub nsw i32 %229, %310
  %314 = add nsw i32 %313, 8
  %315 = icmp slt i32 %307, %314
  br i1 %315, label %316, label %317

316:                                              ; preds = %312
  store i32 %314, ptr @ans, align 4, !tbaa !5
  br label %317

317:                                              ; preds = %316, %312, %306
  %318 = phi i32 [ %307, %312 ], [ %314, %316 ], [ %307, %306 ]
  %319 = add nsw i64 %230, 9
  %320 = getelementptr inbounds [100001 x i32], ptr @dis, i64 0, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = icmp eq i32 %321, 1061109567
  br i1 %322, label %328, label %323

323:                                              ; preds = %317
  %324 = sub nsw i32 %229, %321
  %325 = add nsw i32 %324, 9
  %326 = icmp slt i32 %318, %325
  br i1 %326, label %327, label %328

327:                                              ; preds = %323
  store i32 %325, ptr @ans, align 4, !tbaa !5
  br label %328

328:                                              ; preds = %327, %323, %317
  %329 = phi i32 [ %325, %327 ], [ %318, %323 ], [ %318, %317 ]
  %330 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.084, i32 noundef %329)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %331 = add nuw nsw i32 %.084, 1
  %332 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.084, %332
  br i1 %.not.not, label %.lr.ph86, label %._crit_edge87, !llvm.loop !21
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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


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