; LLVM IR from tangjz/acm-icpc :: self_training/2015-04-25 (F)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@t1 = external dso_local global i32, align 4
@t2 = external dso_local global i32, align 4
@dis = external dso_local global [23333 x i32], align 16
@str = external dso_local global [110 x [110 x i8]], align 16
@vis = external dso_local global [23333 x i8], align 16
@e = external dso_local global [23333 x %"class.std::vector"], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = 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.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", 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 %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %33

33:                                               ; preds = %422, %0
  %34 = load i32, ptr @t, align 4, !tbaa !5
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr @t, align 4, !tbaa !5
  %36 = icmp ne i32 %34, 0
  br i1 %36, label %37, label %423

37:                                               ; preds = %33
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %50, %37
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %46
  %48 = getelementptr inbounds [110 x i8], ptr %47, i64 0, i64 0
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %48)
  br label %50

50:                                               ; preds = %44
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %2, align 4, !tbaa !5
  br label %39, !llvm.loop !9

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

54:                                               ; preds = %66, %53
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = load i32, ptr @n, align 4, !tbaa !5
  %57 = mul nsw i32 2, %56
  %58 = load i32, ptr @m, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = icmp slt i32 %55, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %54
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %64
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #7
  br label %66

66:                                               ; preds = %62
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %3, align 4, !tbaa !5
  br label %54, !llvm.loop !11

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

70:                                               ; preds = %309, %69
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %312

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %305, %75
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = load i32, ptr @m, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %308

81:                                               ; preds = %76
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %83
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [110 x i8], ptr %84, i64 0, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !12
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 35
  br i1 %90, label %91, label %92

91:                                               ; preds = %81
  br label %305

92:                                               ; preds = %81
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %94
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [110 x i8], ptr %95, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !12
  %100 = sext i8 %99 to i32
  %101 = icmp eq i32 %100, 48
  br i1 %101, label %102, label %106

102:                                              ; preds = %92
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %103, i32 noundef %104)
  store i32 %105, ptr @s, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %102, %92
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %108
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [110 x i8], ptr %109, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !12
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 49
  br i1 %115, label %116, label %123

116:                                              ; preds = %106
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %117, i32 noundef %118)
  store i32 %119, ptr @t1, align 4, !tbaa !5
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %120, i32 noundef %121)
  store i32 %122, ptr @t2, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %116, %106
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %125
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [110 x i8], ptr %126, i64 0, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !12
  %131 = sext i8 %130 to i32
  %132 = icmp eq i32 %131, 64
  br i1 %132, label %133, label %152

133:                                              ; preds = %123
  %134 = load i32, ptr %4, align 4, !tbaa !5
  %135 = load i32, ptr %6, align 4, !tbaa !5
  %136 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %134, i32 noundef %135)
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %139, i32 noundef %140)
  store i32 %141, ptr %9, align 4, !tbaa !5
  %142 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %142, ptr %7, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %143, i32 noundef %144)
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %148, i32 noundef %149)
  store i32 %150, ptr %12, align 4, !tbaa !5
  %151 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %151, ptr %10, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 4 dereferenceable(8) %10)
  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 8, ptr %10) #7
  br label %152

152:                                              ; preds = %133, %123
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %154
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [110 x i8], ptr %155, i64 0, i64 %157
  %159 = load i8, ptr %158, align 1, !tbaa !12
  %160 = sext i8 %159 to i32
  %161 = icmp ne i32 %160, 51
  br i1 %161, label %162, label %228

162:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %224, %162
  %164 = load i32, ptr %13, align 4, !tbaa !5
  %165 = icmp slt i32 %164, 4
  br i1 %165, label %167, label %166

166:                                              ; preds = %163
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %227

167:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %168 = load i32, ptr %4, align 4, !tbaa !5
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = add nsw i32 %168, %172
  store i32 %173, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %174 = load i32, ptr %6, align 4, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %174, %178
  store i32 %179, ptr %15, align 4, !tbaa !5
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = icmp sge i32 %180, 0
  br i1 %181, label %182, label %223

182:                                              ; preds = %167
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = load i32, ptr @n, align 4, !tbaa !5
  %185 = icmp slt i32 %183, %184
  br i1 %185, label %186, label %223

186:                                              ; preds = %182
  %187 = load i32, ptr %15, align 4, !tbaa !5
  %188 = icmp sge i32 %187, 0
  br i1 %188, label %189, label %223

189:                                              ; preds = %186
  %190 = load i32, ptr %15, align 4, !tbaa !5
  %191 = load i32, ptr @m, align 4, !tbaa !5
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %223

193:                                              ; preds = %189
  %194 = load i32, ptr %14, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %195
  %197 = load i32, ptr %15, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [110 x i8], ptr %196, i64 0, i64 %198
  %200 = load i8, ptr %199, align 1, !tbaa !12
  %201 = sext i8 %200 to i32
  %202 = icmp ne i32 %201, 51
  br i1 %202, label %203, label %223

203:                                              ; preds = %193
  %204 = load i32, ptr %14, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %205
  %207 = load i32, ptr %15, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [110 x i8], ptr %206, i64 0, i64 %208
  %210 = load i8, ptr %209, align 1, !tbaa !12
  %211 = sext i8 %210 to i32
  %212 = icmp ne i32 %211, 35
  br i1 %212, label %213, label %223

213:                                              ; preds = %203
  %214 = load i32, ptr %4, align 4, !tbaa !5
  %215 = load i32, ptr %6, align 4, !tbaa !5
  %216 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %214, i32 noundef %215)
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %219 = load i32, ptr %14, align 4, !tbaa !5
  %220 = load i32, ptr %15, align 4, !tbaa !5
  %221 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %219, i32 noundef %220)
  store i32 %221, ptr %18, align 4, !tbaa !5
  %222 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i64 %222, ptr %16, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %218, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %223

223:                                              ; preds = %213, %203, %193, %189, %186, %182, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %13, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %13, align 4, !tbaa !5
  br label %163, !llvm.loop !13

227:                                              ; preds = %166
  br label %228

228:                                              ; preds = %227, %152
  %229 = load i32, ptr %4, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %230
  %232 = load i32, ptr %6, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [110 x i8], ptr %231, i64 0, i64 %233
  %235 = load i8, ptr %234, align 1, !tbaa !12
  %236 = sext i8 %235 to i32
  %237 = icmp ne i32 %236, 50
  br i1 %237, label %238, label %304

238:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %300, %238
  %240 = load i32, ptr %19, align 4, !tbaa !5
  %241 = icmp slt i32 %240, 4
  br i1 %241, label %243, label %242

242:                                              ; preds = %239
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %303

243:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %244 = load i32, ptr %4, align 4, !tbaa !5
  %245 = load i32, ptr %19, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = add nsw i32 %244, %248
  store i32 %249, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %250 = load i32, ptr %6, align 4, !tbaa !5
  %251 = load i32, ptr %19, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = add nsw i32 %250, %254
  store i32 %255, ptr %21, align 4, !tbaa !5
  %256 = load i32, ptr %20, align 4, !tbaa !5
  %257 = icmp sge i32 %256, 0
  br i1 %257, label %258, label %299

258:                                              ; preds = %243
  %259 = load i32, ptr %20, align 4, !tbaa !5
  %260 = load i32, ptr @n, align 4, !tbaa !5
  %261 = icmp slt i32 %259, %260
  br i1 %261, label %262, label %299

262:                                              ; preds = %258
  %263 = load i32, ptr %21, align 4, !tbaa !5
  %264 = icmp sge i32 %263, 0
  br i1 %264, label %265, label %299

265:                                              ; preds = %262
  %266 = load i32, ptr %21, align 4, !tbaa !5
  %267 = load i32, ptr @m, align 4, !tbaa !5
  %268 = icmp slt i32 %266, %267
  br i1 %268, label %269, label %299

269:                                              ; preds = %265
  %270 = load i32, ptr %20, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %271
  %273 = load i32, ptr %21, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [110 x i8], ptr %272, i64 0, i64 %274
  %276 = load i8, ptr %275, align 1, !tbaa !12
  %277 = sext i8 %276 to i32
  %278 = icmp ne i32 %277, 50
  br i1 %278, label %279, label %299

279:                                              ; preds = %269
  %280 = load i32, ptr %20, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %281
  %283 = load i32, ptr %21, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [110 x i8], ptr %282, i64 0, i64 %284
  %286 = load i8, ptr %285, align 1, !tbaa !12
  %287 = sext i8 %286 to i32
  %288 = icmp ne i32 %287, 35
  br i1 %288, label %289, label %299

289:                                              ; preds = %279
  %290 = load i32, ptr %4, align 4, !tbaa !5
  %291 = load i32, ptr %6, align 4, !tbaa !5
  %292 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %290, i32 noundef %291)
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %293
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 1, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %295 = load i32, ptr %20, align 4, !tbaa !5
  %296 = load i32, ptr %21, align 4, !tbaa !5
  %297 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %295, i32 noundef %296)
  store i32 %297, ptr %24, align 4, !tbaa !5
  %298 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  store i64 %298, ptr %22, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %294, ptr noundef nonnull align 4 dereferenceable(8) %22)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %299

299:                                              ; preds = %289, %279, %269, %265, %262, %258, %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %300

300:                                              ; preds = %299
  %301 = load i32, ptr %19, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %19, align 4, !tbaa !5
  br label %239, !llvm.loop !14

303:                                              ; preds = %242
  br label %304

304:                                              ; preds = %303, %228
  br label %305

305:                                              ; preds = %304, %91
  %306 = load i32, ptr %6, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %6, align 4, !tbaa !5
  br label %76, !llvm.loop !15

308:                                              ; preds = %80
  br label %309

309:                                              ; preds = %308
  %310 = load i32, ptr %4, align 4, !tbaa !5
  %311 = add nsw i32 %310, 1
  store i32 %311, ptr %4, align 4, !tbaa !5
  br label %70, !llvm.loop !16

312:                                              ; preds = %74
  br label %313

313:                                              ; preds = %316, %312
  %314 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %315 = xor i1 %314, true
  br i1 %315, label %316, label %317

316:                                              ; preds = %313
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br label %313, !llvm.loop !17

317:                                              ; preds = %313
  call void @llvm.memset.p0.i64(ptr align 16 @dis, i8 63, i64 93332, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 23333, i1 false)
  %318 = load i32, ptr @s, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %319
  store i32 0, ptr %320, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %321 = load i32, ptr @s, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %322
  %324 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %323, ptr noundef nonnull align 4 dereferenceable(4) @s)
  store i64 %324, ptr %25, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %25)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %325

325:                                              ; preds = %397, %395, %317
  %326 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %327 = xor i1 %326, true
  br i1 %327, label %328, label %398

328:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %329 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %330 = getelementptr inbounds %"struct.std::pair", ptr %329, i32 0, i32 1
  %331 = load i32, ptr %330, align 4, !tbaa !18
  store i32 %331, ptr %26, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %332 = load i32, ptr %26, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [23333 x i8], ptr @vis, i64 0, i64 %333
  %335 = load i8, ptr %334, align 1, !tbaa !20, !range !22, !noundef !23
  %336 = trunc i8 %335 to i1
  br i1 %336, label %337, label %338

337:                                              ; preds = %328
  store i32 24, ptr %5, align 4
  br label %395, !llvm.loop !24

338:                                              ; preds = %328
  %339 = load i32, ptr %26, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [23333 x i8], ptr @vis, i64 0, i64 %340
  store i8 1, ptr %341, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %342 = load i32, ptr %26, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %343
  %345 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %344) #7
  %346 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %345, ptr %346, align 8
  br label %347

347:                                              ; preds = %392, %338
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %348 = load i32, ptr %26, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %349
  %351 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %350) #7
  %352 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %351, ptr %352, align 8
  %353 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br i1 %353, label %355, label %354

354:                                              ; preds = %347
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %394

355:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %356 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %357 = getelementptr inbounds %"struct.std::pair", ptr %356, i32 0, i32 1
  store ptr %357, ptr %29, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %358 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %359 = getelementptr inbounds %"struct.std::pair", ptr %358, i32 0, i32 0
  store ptr %359, ptr %30, align 8, !tbaa !25
  %360 = load ptr, ptr %29, align 8, !tbaa !25
  %361 = load i32, ptr %360, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %362
  %364 = load i32, ptr %363, align 4, !tbaa !5
  %365 = load i32, ptr %26, align 4, !tbaa !5
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %366
  %368 = load i32, ptr %367, align 4, !tbaa !5
  %369 = load ptr, ptr %30, align 8, !tbaa !25
  %370 = load i32, ptr %369, align 4, !tbaa !5
  %371 = add nsw i32 %368, %370
  %372 = icmp sgt i32 %364, %371
  br i1 %372, label %373, label %391

373:                                              ; preds = %355
  %374 = load i32, ptr %26, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %375
  %377 = load i32, ptr %376, align 4, !tbaa !5
  %378 = load ptr, ptr %30, align 8, !tbaa !25
  %379 = load i32, ptr %378, align 4, !tbaa !5
  %380 = add nsw i32 %377, %379
  %381 = load ptr, ptr %29, align 8, !tbaa !25
  %382 = load i32, ptr %381, align 4, !tbaa !5
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %383
  store i32 %380, ptr %384, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %385 = load ptr, ptr %29, align 8, !tbaa !25
  %386 = load i32, ptr %385, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %387
  %389 = load ptr, ptr %29, align 8, !tbaa !25
  %390 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %388, ptr noundef nonnull align 4 dereferenceable(4) %389)
  store i64 %390, ptr %31, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %31)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %391

391:                                              ; preds = %373, %355
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %392

392:                                              ; preds = %391
  %393 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br label %347, !llvm.loop !27

394:                                              ; preds = %354
  store i32 0, ptr %5, align 4
  br label %395

395:                                              ; preds = %394, %337
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  %396 = load i32, ptr %5, align 4
  switch i32 %396, label %424 [
    i32 0, label %397
    i32 24, label %325
  ]

397:                                              ; preds = %395
  br label %325, !llvm.loop !24

398:                                              ; preds = %325
  %399 = load i32, ptr @t1, align 4, !tbaa !5
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %400
  %402 = load i32, ptr %401, align 4, !tbaa !5
  %403 = icmp eq i32 %402, 1061109567
  br i1 %403, label %404, label %412

404:                                              ; preds = %398
  %405 = load i32, ptr @t2, align 4, !tbaa !5
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %406
  %408 = load i32, ptr %407, align 4, !tbaa !5
  %409 = icmp eq i32 %408, 1061109567
  br i1 %409, label %410, label %412

410:                                              ; preds = %404
  %411 = call i32 @puts(ptr noundef @.str.4)
  br label %422

412:                                              ; preds = %404, %398
  %413 = load i32, ptr @t1, align 4, !tbaa !5
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %414
  %416 = load i32, ptr @t2, align 4, !tbaa !5
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %417
  %419 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %415, ptr noundef nonnull align 4 dereferenceable(4) %418)
  %420 = load i32, ptr %419, align 4, !tbaa !5
  %421 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %420)
  br label %422

422:                                              ; preds = %412, %410
  br label %33, !llvm.loop !28

423:                                              ; preds = %33
  ret i32 0

424:                                              ; preds = %395
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 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)) #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

declare i32 @puts(ptr noundef) #2

declare i32 @printf(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)) #6

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 4}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !10}
!25 = !{!26, !26, i64 0}
!26 = !{!"any pointer", !7, i64 0}
!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<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 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@t1 = external dso_local local_unnamed_addr global i32, align 4
@t2 = external dso_local local_unnamed_addr global i32, align 4
@dis = external dso_local global [23333 x i32], align 16
@str = external dso_local global [110 x [110 x i8]], align 16
@vis = external dso_local local_unnamed_addr global [23333 x i8], align 16
@e = external dso_local global [23333 x %"class.std::vector"], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = 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.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %18 = load i32, ptr @t, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @t, align 4, !tbaa !5
  %.not132 = icmp eq i32 %18, 0
  br i1 %.not132, label %._crit_edge135, label %.lr.ph134.preheader

.lr.ph134.preheader:                              ; preds = %0
  %20 = load i32, ptr @_ZL2dx, align 16
  %21 = load i32, ptr @_ZL2dy, align 16
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  %28 = load i32, ptr @_ZL2dx, align 16
  %29 = load i32, ptr @_ZL2dy, align 16
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph134

.lr.ph134:                                        ; preds = %.lr.ph134.preheader, %326
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph, label %.preheader115

.preheader115:                                    ; preds = %.lr.ph, %.lr.ph134
  %39 = phi i32 [ %37, %.lr.ph134 ], [ %46, %.lr.ph ]
  %40 = shl nsw i32 %39, 1
  %41 = load i32, ptr @m, align 4, !tbaa !5
  %42 = mul nsw i32 %40, %41
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph118, label %.preheader114

.lr.ph:                                           ; preds = %.lr.ph134, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph134 ]
  %44 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %indvars.iv
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %44)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next, %47
  br i1 %48, label %.lr.ph, label %.preheader115, !llvm.loop !9

.preheader114:                                    ; preds = %.lr.ph118, %.preheader115
  %49 = phi i32 [ %41, %.preheader115 ], [ %56, %.lr.ph118 ]
  %50 = phi i32 [ %39, %.preheader115 ], [ %54, %.lr.ph118 ]
  %51 = icmp sgt i32 %50, 0
  %52 = icmp sgt i32 %49, 0
  %or.cond161 = and i1 %51, %52
  br i1 %or.cond161, label %.preheader112, label %.preheader113

.lr.ph118:                                        ; preds = %.preheader115, %.lr.ph118
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %.lr.ph118 ], [ 0, %.preheader115 ]
  %53 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv138
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #7
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = shl nsw i32 %54, 1
  %56 = load i32, ptr @m, align 4, !tbaa !5
  %57 = mul nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next139, %58
  br i1 %59, label %.lr.ph118, label %.preheader114, !llvm.loop !11

.preheader113:                                    ; preds = %._crit_edge, %.preheader114
  %60 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %60, label %._crit_edge125, label %.lr.ph124

.preheader112:                                    ; preds = %.preheader114, %._crit_edge
  %61 = phi i32 [ %93, %._crit_edge ], [ %50, %.preheader114 ]
  %62 = phi i32 [ %94, %._crit_edge ], [ %49, %.preheader114 ]
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %._crit_edge ], [ 0, %.preheader114 ]
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph122, label %._crit_edge

.lr.ph122:                                        ; preds = %.preheader112
  %64 = trunc nuw nsw i64 %indvars.iv150 to i32
  %65 = trunc nuw nsw i64 %indvars.iv150 to i32
  %66 = trunc nuw nsw i64 %indvars.iv150 to i32
  %67 = trunc nuw nsw i64 %indvars.iv150 to i32
  %68 = add nsw i32 %20, %67
  %69 = icmp sgt i32 %68, -1
  %70 = zext nneg i32 %68 to i64
  %71 = add nsw i32 %22, %67
  %72 = icmp sgt i32 %71, -1
  %73 = zext nneg i32 %71 to i64
  %74 = add nsw i32 %24, %67
  %75 = icmp sgt i32 %74, -1
  %76 = zext nneg i32 %74 to i64
  %77 = add nsw i32 %26, %67
  %78 = icmp sgt i32 %77, -1
  %79 = zext nneg i32 %77 to i64
  %80 = trunc nuw nsw i64 %indvars.iv150 to i32
  %81 = add nsw i32 %28, %80
  %82 = icmp sgt i32 %81, -1
  %83 = zext nneg i32 %81 to i64
  %84 = add nsw i32 %30, %80
  %85 = icmp sgt i32 %84, -1
  %86 = zext nneg i32 %84 to i64
  %87 = add nsw i32 %32, %80
  %88 = icmp sgt i32 %87, -1
  %89 = zext nneg i32 %87 to i64
  %90 = add nsw i32 %34, %80
  %91 = icmp sgt i32 %90, -1
  %92 = zext nneg i32 %90 to i64
  br label %97

._crit_edge.loopexit:                             ; preds = %.loopexit
  %.pre154 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader112
  %93 = phi i32 [ %.pre154, %._crit_edge.loopexit ], [ %61, %.preheader112 ]
  %94 = phi i32 [ %265, %._crit_edge.loopexit ], [ %62, %.preheader112 ]
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %95 = sext i32 %93 to i64
  %96 = icmp slt i64 %indvars.iv.next151, %95
  br i1 %96, label %.preheader112, label %.preheader113, !llvm.loop !12

97:                                               ; preds = %.lr.ph122, %.loopexit
  %indvars.iv147 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next148, %.loopexit ]
  %98 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %indvars.iv150, i64 %indvars.iv147
  %99 = load i8, ptr %98, align 1, !tbaa !14
  switch i8 %99, label %103 [
    i8 35, label %.loopexit
    i8 48, label %100
  ]

100:                                              ; preds = %97
  %101 = trunc nuw nsw i64 %indvars.iv147 to i32
  %102 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %64, i32 noundef %101)
  store i32 %102, ptr @s, align 4, !tbaa !5
  %.pr = load i8, ptr %98, align 1, !tbaa !14
  br label %103

103:                                              ; preds = %97, %100
  %104 = phi i8 [ %99, %97 ], [ %.pr, %100 ]
  %105 = icmp eq i8 %104, 49
  br i1 %105, label %106, label %110

106:                                              ; preds = %103
  %107 = trunc nuw nsw i64 %indvars.iv147 to i32
  %108 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %65, i32 noundef %107)
  store i32 %108, ptr @t1, align 4, !tbaa !5
  %109 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %65, i32 noundef %107)
  store i32 %109, ptr @t2, align 4, !tbaa !5
  %.pre = load i8, ptr %98, align 1, !tbaa !14
  br label %110

110:                                              ; preds = %106, %103
  %111 = phi i8 [ %.pre, %106 ], [ %104, %103 ]
  %112 = icmp eq i8 %111, 64
  br i1 %112, label %113, label %125

113:                                              ; preds = %110
  %114 = trunc nuw nsw i64 %indvars.iv147 to i32
  %115 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %66, i32 noundef %114)
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %116
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %118 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %66, i32 noundef %114)
  store i32 %118, ptr %3, align 4, !tbaa !5
  %119 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %119, ptr %1, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 4 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %120 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %66, i32 noundef %114)
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %121
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %123 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %66, i32 noundef %114)
  store i32 %123, ptr %6, align 4, !tbaa !5
  %124 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %124, ptr %4, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %122, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %.pr109 = load i8, ptr %98, align 1, !tbaa !14
  br label %125

125:                                              ; preds = %113, %110
  %126 = phi i8 [ %.pr109, %113 ], [ %111, %110 ]
  %.not99 = icmp eq i8 %126, 51
  br i1 %.not99, label %.preheader.preheader, label %.preheader110.preheader

.preheader110.preheader:                          ; preds = %125
  %127 = trunc nuw nsw i64 %indvars.iv147 to i32
  %128 = add nsw i32 %21, %127
  br i1 %69, label %129, label %.preheader110.1

129:                                              ; preds = %.preheader110.preheader
  %130 = load i32, ptr @n, align 4, !tbaa !5
  %131 = icmp slt i32 %68, %130
  %132 = icmp sgt i32 %128, -1
  %or.cond = select i1 %131, i1 %132, i1 false
  %133 = load i32, ptr @m, align 4
  %134 = icmp slt i32 %128, %133
  %or.cond106 = select i1 %or.cond, i1 %134, i1 false
  br i1 %or.cond106, label %135, label %.preheader110.1

135:                                              ; preds = %129
  %136 = zext nneg i32 %128 to i64
  %137 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %70, i64 %136
  %138 = load i8, ptr %137, align 1, !tbaa !14
  switch i8 %138, label %139 [
    i8 51, label %.preheader110.1
    i8 35, label %.preheader110.1
  ]

139:                                              ; preds = %135
  %140 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %67, i32 noundef %127)
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %141
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %143 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %68, i32 noundef %128)
  store i32 %143, ptr %9, align 4, !tbaa !5
  %144 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %144, ptr %7, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %.preheader110.1

.preheader110.1:                                  ; preds = %135, %135, %139, %129, %.preheader110.preheader
  %145 = add nsw i32 %23, %127
  br i1 %72, label %146, label %.preheader110.2

146:                                              ; preds = %.preheader110.1
  %147 = load i32, ptr @n, align 4, !tbaa !5
  %148 = icmp slt i32 %71, %147
  %149 = icmp sgt i32 %145, -1
  %or.cond.1 = select i1 %148, i1 %149, i1 false
  %150 = load i32, ptr @m, align 4
  %151 = icmp slt i32 %145, %150
  %or.cond106.1 = select i1 %or.cond.1, i1 %151, i1 false
  br i1 %or.cond106.1, label %152, label %.preheader110.2

152:                                              ; preds = %146
  %153 = zext nneg i32 %145 to i64
  %154 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %73, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !14
  switch i8 %155, label %156 [
    i8 51, label %.preheader110.2
    i8 35, label %.preheader110.2
  ]

156:                                              ; preds = %152
  %157 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %67, i32 noundef %127)
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %158
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %160 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %71, i32 noundef %145)
  store i32 %160, ptr %9, align 4, !tbaa !5
  %161 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %161, ptr %7, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %159, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %.preheader110.2

.preheader110.2:                                  ; preds = %156, %152, %152, %146, %.preheader110.1
  %162 = add nsw i32 %25, %127
  br i1 %75, label %163, label %.preheader110.3

163:                                              ; preds = %.preheader110.2
  %164 = load i32, ptr @n, align 4, !tbaa !5
  %165 = icmp slt i32 %74, %164
  %166 = icmp sgt i32 %162, -1
  %or.cond.2 = select i1 %165, i1 %166, i1 false
  %167 = load i32, ptr @m, align 4
  %168 = icmp slt i32 %162, %167
  %or.cond106.2 = select i1 %or.cond.2, i1 %168, i1 false
  br i1 %or.cond106.2, label %169, label %.preheader110.3

169:                                              ; preds = %163
  %170 = zext nneg i32 %162 to i64
  %171 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %76, i64 %170
  %172 = load i8, ptr %171, align 1, !tbaa !14
  switch i8 %172, label %173 [
    i8 51, label %.preheader110.3
    i8 35, label %.preheader110.3
  ]

173:                                              ; preds = %169
  %174 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %67, i32 noundef %127)
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %175
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %177 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %74, i32 noundef %162)
  store i32 %177, ptr %9, align 4, !tbaa !5
  %178 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %178, ptr %7, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %176, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %.preheader110.3

.preheader110.3:                                  ; preds = %173, %169, %169, %163, %.preheader110.2
  %179 = add nsw i32 %27, %127
  br i1 %78, label %180, label %.loopexit111

180:                                              ; preds = %.preheader110.3
  %181 = load i32, ptr @n, align 4, !tbaa !5
  %182 = icmp slt i32 %77, %181
  %183 = icmp sgt i32 %179, -1
  %or.cond.3 = select i1 %182, i1 %183, i1 false
  %184 = load i32, ptr @m, align 4
  %185 = icmp slt i32 %179, %184
  %or.cond106.3 = select i1 %or.cond.3, i1 %185, i1 false
  br i1 %or.cond106.3, label %186, label %.loopexit111

186:                                              ; preds = %180
  %187 = zext nneg i32 %179 to i64
  %188 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %79, i64 %187
  %189 = load i8, ptr %188, align 1, !tbaa !14
  switch i8 %189, label %190 [
    i8 51, label %.loopexit111
    i8 35, label %.loopexit111
  ]

190:                                              ; preds = %186
  %191 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %67, i32 noundef %127)
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %192
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %194 = call noundef i32 @_Z2idiii(i32 noundef 0, i32 noundef %77, i32 noundef %179)
  store i32 %194, ptr %9, align 4, !tbaa !5
  %195 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %195, ptr %7, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %193, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %.loopexit111

.loopexit111:                                     ; preds = %.preheader110.3, %180, %186, %186, %190
  %.pre153 = load i8, ptr %98, align 1, !tbaa !14
  %.not100 = icmp eq i8 %.pre153, 50
  br i1 %.not100, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %125, %.loopexit111
  %196 = trunc nuw nsw i64 %indvars.iv147 to i32
  %197 = add nsw i32 %29, %196
  br i1 %82, label %198, label %.preheader.1

198:                                              ; preds = %.preheader.preheader
  %199 = load i32, ptr @n, align 4, !tbaa !5
  %200 = icmp slt i32 %81, %199
  %201 = icmp sgt i32 %197, -1
  %or.cond3 = select i1 %200, i1 %201, i1 false
  %202 = load i32, ptr @m, align 4
  %203 = icmp slt i32 %197, %202
  %or.cond108 = select i1 %or.cond3, i1 %203, i1 false
  br i1 %or.cond108, label %204, label %.preheader.1

204:                                              ; preds = %198
  %205 = zext nneg i32 %197 to i64
  %206 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %83, i64 %205
  %207 = load i8, ptr %206, align 1, !tbaa !14
  switch i8 %207, label %208 [
    i8 50, label %.preheader.1
    i8 35, label %.preheader.1
  ]

208:                                              ; preds = %204
  %209 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %80, i32 noundef %196)
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %210
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %212 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %81, i32 noundef %197)
  store i32 %212, ptr %12, align 4, !tbaa !5
  %213 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %213, ptr %10, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %211, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.preheader.1

.preheader.1:                                     ; preds = %204, %204, %208, %198, %.preheader.preheader
  %214 = add nsw i32 %31, %196
  br i1 %85, label %215, label %.preheader.2

215:                                              ; preds = %.preheader.1
  %216 = load i32, ptr @n, align 4, !tbaa !5
  %217 = icmp slt i32 %84, %216
  %218 = icmp sgt i32 %214, -1
  %or.cond3.1 = select i1 %217, i1 %218, i1 false
  %219 = load i32, ptr @m, align 4
  %220 = icmp slt i32 %214, %219
  %or.cond108.1 = select i1 %or.cond3.1, i1 %220, i1 false
  br i1 %or.cond108.1, label %221, label %.preheader.2

221:                                              ; preds = %215
  %222 = zext nneg i32 %214 to i64
  %223 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %86, i64 %222
  %224 = load i8, ptr %223, align 1, !tbaa !14
  switch i8 %224, label %225 [
    i8 50, label %.preheader.2
    i8 35, label %.preheader.2
  ]

225:                                              ; preds = %221
  %226 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %80, i32 noundef %196)
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %227
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %229 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %84, i32 noundef %214)
  store i32 %229, ptr %12, align 4, !tbaa !5
  %230 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %230, ptr %10, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %228, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.preheader.2

.preheader.2:                                     ; preds = %225, %221, %221, %215, %.preheader.1
  %231 = add nsw i32 %33, %196
  br i1 %88, label %232, label %.preheader.3

232:                                              ; preds = %.preheader.2
  %233 = load i32, ptr @n, align 4, !tbaa !5
  %234 = icmp slt i32 %87, %233
  %235 = icmp sgt i32 %231, -1
  %or.cond3.2 = select i1 %234, i1 %235, i1 false
  %236 = load i32, ptr @m, align 4
  %237 = icmp slt i32 %231, %236
  %or.cond108.2 = select i1 %or.cond3.2, i1 %237, i1 false
  br i1 %or.cond108.2, label %238, label %.preheader.3

238:                                              ; preds = %232
  %239 = zext nneg i32 %231 to i64
  %240 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %89, i64 %239
  %241 = load i8, ptr %240, align 1, !tbaa !14
  switch i8 %241, label %242 [
    i8 50, label %.preheader.3
    i8 35, label %.preheader.3
  ]

242:                                              ; preds = %238
  %243 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %80, i32 noundef %196)
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %244
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %246 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %87, i32 noundef %231)
  store i32 %246, ptr %12, align 4, !tbaa !5
  %247 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %247, ptr %10, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %245, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.preheader.3

.preheader.3:                                     ; preds = %242, %238, %238, %232, %.preheader.2
  %248 = add nsw i32 %35, %196
  br i1 %91, label %249, label %.loopexit

249:                                              ; preds = %.preheader.3
  %250 = load i32, ptr @n, align 4, !tbaa !5
  %251 = icmp slt i32 %90, %250
  %252 = icmp sgt i32 %248, -1
  %or.cond3.3 = select i1 %251, i1 %252, i1 false
  %253 = load i32, ptr @m, align 4
  %254 = icmp slt i32 %248, %253
  %or.cond108.3 = select i1 %or.cond3.3, i1 %254, i1 false
  br i1 %or.cond108.3, label %255, label %.loopexit

255:                                              ; preds = %249
  %256 = zext nneg i32 %248 to i64
  %257 = getelementptr inbounds [110 x [110 x i8]], ptr @str, i64 0, i64 %92, i64 %256
  %258 = load i8, ptr %257, align 1, !tbaa !14
  switch i8 %258, label %259 [
    i8 50, label %.loopexit
    i8 35, label %.loopexit
  ]

259:                                              ; preds = %255
  %260 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %80, i32 noundef %196)
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %261
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %263 = call noundef i32 @_Z2idiii(i32 noundef 1, i32 noundef %90, i32 noundef %248)
  store i32 %263, ptr %12, align 4, !tbaa !5
  %264 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %264, ptr %10, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %262, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.3, %249, %255, %255, %259, %97, %.loopexit111
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %265 = load i32, ptr @m, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = icmp slt i64 %indvars.iv.next148, %266
  br i1 %267, label %97, label %._crit_edge.loopexit, !llvm.loop !15

.lr.ph124:                                        ; preds = %.preheader113, %.lr.ph124
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %268 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %268, label %._crit_edge125, label %.lr.ph124, !llvm.loop !16

._crit_edge125:                                   ; preds = %.lr.ph124, %.preheader113
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(93332) @dis, i8 63, i64 93332, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(23333) @vis, i8 0, i64 23333, i1 false)
  %269 = load i32, ptr @s, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %270
  store i32 0, ptr %271, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %272 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %271, ptr noundef nonnull align 4 dereferenceable(4) @s)
  store i64 %272, ptr %13, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %273 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %273, label %._crit_edge131, label %.lr.ph130

.lr.ph130:                                        ; preds = %._crit_edge125, %308
  %274 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %275 = getelementptr inbounds i8, ptr %274, i64 4
  %276 = load i32, ptr %275, align 4, !tbaa !17
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [23333 x i8], ptr @vis, i64 0, i64 %277
  %279 = load i8, ptr %278, align 1, !tbaa !19, !range !21, !noundef !22
  %280 = trunc nuw i8 %279 to i1
  br i1 %280, label %308, label %281, !llvm.loop !23

281:                                              ; preds = %.lr.ph130
  store i8 1, ptr %278, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %282 = getelementptr inbounds [23333 x %"class.std::vector"], ptr @e, i64 0, i64 %277
  %283 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %282) #7
  store ptr %283, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %284 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %282) #7
  store ptr %284, ptr %15, align 8
  %285 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %285, label %.lr.ph127, label %._crit_edge128

.lr.ph127:                                        ; preds = %281
  %286 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %277
  br label %287

._crit_edge128:                                   ; preds = %304, %281
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %308

287:                                              ; preds = %.lr.ph127, %304
  %288 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %289 = getelementptr inbounds i8, ptr %288, i64 4
  %290 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %291 = load i32, ptr %289, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %292
  %294 = load i32, ptr %293, align 4, !tbaa !5
  %295 = load i32, ptr %286, align 4, !tbaa !5
  %296 = load i32, ptr %290, align 4, !tbaa !5
  %297 = add nsw i32 %296, %295
  %298 = icmp sgt i32 %294, %297
  br i1 %298, label %299, label %304

299:                                              ; preds = %287
  store i32 %297, ptr %293, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %300 = load i32, ptr %289, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %301
  %303 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %302, ptr noundef nonnull align 4 dereferenceable(4) %289)
  store i64 %303, ptr %16, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %304

304:                                              ; preds = %299, %287
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %306 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %282) #7
  store ptr %306, ptr %15, align 8
  %307 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %307, label %287, label %._crit_edge128, !llvm.loop !24

308:                                              ; preds = %.lr.ph130, %._crit_edge128
  %309 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %309, label %._crit_edge131, label %.lr.ph130

._crit_edge131:                                   ; preds = %308, %._crit_edge125
  %310 = load i32, ptr @t1, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %311
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = icmp eq i32 %313, 1061109567
  %.pre155 = load i32, ptr @t2, align 4, !tbaa !5
  %315 = sext i32 %.pre155 to i64
  br i1 %314, label %316, label %._crit_edge131._crit_edge

316:                                              ; preds = %._crit_edge131
  %317 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %315
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = icmp eq i32 %318, 1061109567
  br i1 %319, label %320, label %._crit_edge131._crit_edge

320:                                              ; preds = %316
  %321 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %326

._crit_edge131._crit_edge:                        ; preds = %._crit_edge131, %316
  %322 = getelementptr inbounds [23333 x i32], ptr @dis, i64 0, i64 %315
  %323 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %312, ptr noundef nonnull align 4 dereferenceable(4) %322)
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %324)
  br label %326

326:                                              ; preds = %._crit_edge131._crit_edge, %320
  %327 = load i32, ptr @t, align 4, !tbaa !5
  %328 = add nsw i32 %327, -1
  store i32 %328, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %327, 0
  br i1 %.not, label %._crit_edge135, label %.lr.ph134, !llvm.loop !25

._crit_edge135:                                   ; preds = %326, %0
  ret i32 0
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(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 zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 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 #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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 #6

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


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