; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/203 Division 2/Problem E (E)

; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [310 x i32], align 16
@bad = external dso_local global [310 x i32], align 16
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, 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 %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @k)
  %19 = load i32, ptr @k, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp eq i32 %19, %20
  br i1 %21, label %22, label %24

22:                                               ; preds = %0
  %23 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  br label %217

24:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %41, %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr @k, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %32
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %33)
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %39
  store i32 1, ptr %40, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %30
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !9

44:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %63, %44
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %66

50:                                               ; preds = %45
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %62, label %56

56:                                               ; preds = %50
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %57 unwind label %58

57:                                               ; preds = %56
  br label %62

58:                                               ; preds = %56
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %5, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %216

62:                                               ; preds = %57, %50
  br label %63

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

66:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %67 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %87, %66
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %90

74:                                               ; preds = %69
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %86

80:                                               ; preds = %74
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %81 unwind label %82

81:                                               ; preds = %80
  br label %86

82:                                               ; preds = %80
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %5, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %215

86:                                               ; preds = %81, %74
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !5
  br label %69, !llvm.loop !12

90:                                               ; preds = %73
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %93) #6
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %94) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %112, %90
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %119

101:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %103) #6
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %107) #6
  %109 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(4) %108)
          to label %110 unwind label %115

110:                                              ; preds = %101
  store i64 %109, ptr %10, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %111 unwind label %115

111:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %9, align 4, !tbaa !5
  br label %95, !llvm.loop !13

115:                                              ; preds = %110, %101
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %5, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %215

119:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %151, %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %154

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = add nsw i32 %126, 2
  store i32 %127, ptr %13, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %143, %125
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = load i32, ptr @n, align 4, !tbaa !5
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %133, label %132

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

133:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %135) #6
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %138) #6
  %140 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %136, ptr noundef nonnull align 4 dereferenceable(4) %139)
          to label %141 unwind label %146

141:                                              ; preds = %133
  store i64 %140, ptr %14, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %142 unwind label %146

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %13, align 4, !tbaa !5
  br label %128, !llvm.loop !14

146:                                              ; preds = %141, %133
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %5, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %215

150:                                              ; preds = %132
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %11, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %11, align 4, !tbaa !5
  br label %120, !llvm.loop !15

154:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 2, ptr %15, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %168, %154
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = icmp sle i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %175

160:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  %162 = load i32, ptr %15, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %163) #6
  %165 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %161, ptr noundef nonnull align 4 dereferenceable(4) %164)
          to label %166 unwind label %171

166:                                              ; preds = %160
  store i64 %165, ptr %16, align 4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %167 unwind label %171

167:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %15, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %15, align 4, !tbaa !5
  br label %155, !llvm.loop !16

171:                                              ; preds = %166, %160
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %5, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %215

175:                                              ; preds = %159
  %176 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @e) #6
  %177 = load i32, ptr @m, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = icmp ult i64 %176, %178
  br i1 %179, label %180, label %187

180:                                              ; preds = %175
  %181 = invoke i32 @puts(ptr noundef @.str.2)
          to label %182 unwind label %183

182:                                              ; preds = %180
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %214

183:                                              ; preds = %180
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %5, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %6, align 4
  br label %215

187:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %206, %187
  %189 = load i32, ptr %17, align 4, !tbaa !5
  %190 = load i32, ptr @m, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %213

193:                                              ; preds = %188
  %194 = load i32, ptr %17, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %195) #6
  %197 = getelementptr inbounds %"struct.std::pair", ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 4, !tbaa !17
  %199 = load i32, ptr %17, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %200) #6
  %202 = getelementptr inbounds %"struct.std::pair", ptr %201, i32 0, i32 1
  %203 = load i32, ptr %202, align 4, !tbaa !19
  %204 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %198, i32 noundef %203)
          to label %205 unwind label %209

205:                                              ; preds = %193
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %17, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %17, align 4, !tbaa !5
  br label %188, !llvm.loop !20

209:                                              ; preds = %193
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %5, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %215

213:                                              ; preds = %192
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %214

214:                                              ; preds = %213, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %217

215:                                              ; preds = %209, %183, %171, %146, %115, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %216

216:                                              ; preds = %215, %58
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %219

217:                                              ; preds = %214, %22
  %218 = load i32, ptr %1, align 4
  ret i32 %218

219:                                              ; preds = %216
  %220 = load ptr, ptr %5, align 8
  %221 = load i32, ptr %6, align 4
  %222 = insertvalue { ptr, i32 } poison, ptr %220, 0
  %223 = insertvalue { ptr, i32 } %222, i32 %221, 1
  resume { ptr, i32 } %223
}

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

declare i32 @puts(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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 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_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 i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!18, !6, i64 4}
!20 = distinct !{!20, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [310 x i32], align 16
@bad = external dso_local local_unnamed_addr global [310 x i32], align 16
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @k)
  %8 = load i32, ptr @k, align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp eq i32 %8, %9
  br i1 %10, label %11, label %.preheader49

.preheader49:                                     ; preds = %0
  %.not50 = icmp slt i32 %8, 1
  br i1 %.not50, label %._crit_edge, label %.lr.ph

11:                                               ; preds = %0
  %12 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %104

._crit_edge:                                      ; preds = %.lr.ph, %.preheader49
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %.not3852 = icmp slt i32 %13, 1
  br i1 %.not3852, label %._crit_edge56, label %.lr.ph55

.lr.ph:                                           ; preds = %.preheader49, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader49 ]
  %14 = getelementptr inbounds [310 x i32], ptr @a, i64 0, i64 %indvars.iv
  %15 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %14)
  %16 = load i32, ptr %14, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %17
  store i32 1, ptr %18, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @k, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge56:                                    ; preds = %31, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %21 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %22 = trunc i64 %21 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %.not4057 = icmp slt i32 %23, 1
  br i1 %.not4057, label %._crit_edge61, label %.lr.ph60

.lr.ph55:                                         ; preds = %._crit_edge, %31
  %24 = phi i32 [ %32, %31 ], [ %13, %._crit_edge ]
  %storemerge53 = phi i32 [ %34, %31 ], [ 1, %._crit_edge ]
  %25 = sext i32 %storemerge53 to i64
  %26 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %.not44 = icmp eq i32 %27, 0
  br i1 %.not44, label %28, label %31

28:                                               ; preds = %.lr.ph55
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %._crit_edge95 unwind label %29

._crit_edge95:                                    ; preds = %28
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre96 = load i32, ptr @n, align 4, !tbaa !5
  br label %31

29:                                               ; preds = %28
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %103

31:                                               ; preds = %._crit_edge95, %.lr.ph55
  %32 = phi i32 [ %.pre96, %._crit_edge95 ], [ %24, %.lr.ph55 ]
  %33 = phi i32 [ %.pre, %._crit_edge95 ], [ %storemerge53, %.lr.ph55 ]
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  %.not38.not = icmp slt i32 %33, %32
  br i1 %.not38.not, label %.lr.ph55, label %._crit_edge56, !llvm.loop !11

._crit_edge61:                                    ; preds = %47, %._crit_edge56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %sext = shl i64 %21, 32
  %36 = ashr exact i64 %sext, 32
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %36) #6
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %37) #6
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, 1
  br i1 %39, label %.lr.ph64, label %.preheader47

.lr.ph60:                                         ; preds = %._crit_edge56, %47
  %40 = phi i32 [ %48, %47 ], [ %23, %._crit_edge56 ]
  %storemerge3958 = phi i32 [ %50, %47 ], [ 1, %._crit_edge56 ]
  %41 = sext i32 %storemerge3958 to i64
  %42 = getelementptr inbounds [310 x i32], ptr @bad, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not42 = icmp eq i32 %43, 0
  br i1 %.not42, label %47, label %44

44:                                               ; preds = %.lr.ph60
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %._crit_edge97 unwind label %45

._crit_edge97:                                    ; preds = %44
  %.pre98 = load i32, ptr %3, align 4, !tbaa !5
  %.pre99 = load i32, ptr @n, align 4, !tbaa !5
  br label %47

45:                                               ; preds = %44
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %103

47:                                               ; preds = %._crit_edge97, %.lr.ph60
  %48 = phi i32 [ %.pre99, %._crit_edge97 ], [ %40, %.lr.ph60 ]
  %49 = phi i32 [ %.pre98, %._crit_edge97 ], [ %storemerge3958, %.lr.ph60 ]
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !5
  %.not40.not = icmp slt i32 %49, %48
  br i1 %.not40.not, label %.lr.ph60, label %._crit_edge61, !llvm.loop !12

.preheader48:                                     ; preds = %56
  %51 = icmp sgt i32 %57, 1
  br i1 %51, label %.lr.ph70, label %.preheader47

.lr.ph64:                                         ; preds = %._crit_edge61, %56
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %56 ], [ 0, %._crit_edge61 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv78) #6
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv.next79) #6
  %54 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %53)
          to label %55 unwind label %61

55:                                               ; preds = %.lr.ph64
  store i64 %54, ptr %4, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %56 unwind label %61

56:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = add nsw i32 %57, -1
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next79, %59
  br i1 %60, label %.lr.ph64, label %.preheader48, !llvm.loop !13

61:                                               ; preds = %55, %.lr.ph64
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %103

.preheader47:                                     ; preds = %._crit_edge68, %._crit_edge61, %.preheader48
  %.not4171 = icmp slt i32 %22, 2
  br i1 %.not4171, label %._crit_edge74, label %.lr.ph73.preheader

.lr.ph73.preheader:                               ; preds = %.preheader47
  %63 = add nuw nsw i64 %21, 1
  %wide.trip.count = and i64 %63, 4294967295
  br label %.lr.ph73

.lr.ph70:                                         ; preds = %.preheader48, %._crit_edge68
  %64 = phi i32 [ %68, %._crit_edge68 ], [ %57, %.preheader48 ]
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %._crit_edge68 ], [ 1, %.preheader48 ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %._crit_edge68 ], [ 3, %.preheader48 ]
  %65 = add nuw nsw i64 %indvars.iv86, 2
  %66 = sext i32 %64 to i64
  %67 = icmp slt i64 %65, %66
  br i1 %67, label %.lr.ph67, label %._crit_edge68

._crit_edge68.loopexit:                           ; preds = %74
  %.pre100 = sext i32 %75 to i64
  br label %._crit_edge68

._crit_edge68:                                    ; preds = %._crit_edge68.loopexit, %.lr.ph70
  %.pre-phi = phi i64 [ %.pre100, %._crit_edge68.loopexit ], [ %66, %.lr.ph70 ]
  %68 = phi i32 [ %75, %._crit_edge68.loopexit ], [ %64, %.lr.ph70 ]
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %69 = icmp slt i64 %indvars.iv.next87, %.pre-phi
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  br i1 %69, label %.lr.ph70, label %.preheader47, !llvm.loop !14

.lr.ph67:                                         ; preds = %.lr.ph70, %74
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %74 ], [ %indvars.iv81, %.lr.ph70 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv86) #6
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv83) #6
  %72 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %73 unwind label %78

73:                                               ; preds = %.lr.ph67
  store i64 %72, ptr %5, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %74 unwind label %78

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %75 = load i32, ptr @n, align 4, !tbaa !5
  %76 = trunc nuw i64 %indvars.iv.next84 to i32
  %77 = icmp sgt i32 %75, %76
  br i1 %77, label %.lr.ph67, label %._crit_edge68.loopexit, !llvm.loop !15

78:                                               ; preds = %73, %.lr.ph67
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %103

._crit_edge74:                                    ; preds = %89, %.preheader47
  %80 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @e) #6
  %81 = load i32, ptr @m, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = icmp ult i64 %80, %82
  br i1 %83, label %92, label %.preheader

.preheader:                                       ; preds = %._crit_edge74
  %84 = icmp sgt i32 %81, 0
  br i1 %84, label %.lr.ph76, label %.loopexit

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %89
  %indvars.iv89 = phi i64 [ 2, %.lr.ph73.preheader ], [ %indvars.iv.next90, %89 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv89) #6
  %87 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %86)
          to label %88 unwind label %90

88:                                               ; preds = %.lr.ph73
  store i64 %87, ptr %6, align 8
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %89 unwind label %90

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !16

90:                                               ; preds = %88, %.lr.ph73
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %103

92:                                               ; preds = %._crit_edge74
  %93 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

.lr.ph76:                                         ; preds = %.preheader, %.lr.ph76
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph76 ], [ 0, %.preheader ]
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv92) #6
  %95 = load i32, ptr %94, align 4, !tbaa !17
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv92) #6
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  %98 = load i32, ptr %97, align 4, !tbaa !19
  %99 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %95, i32 noundef %98)
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %100 = load i32, ptr @m, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = icmp slt i64 %indvars.iv.next93, %101
  br i1 %102, label %.lr.ph76, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph76, %.preheader, %92
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  br label %104

103:                                              ; preds = %45, %61, %78, %90, %29
  %.pn45 = phi { ptr, i32 } [ %30, %29 ], [ %46, %45 ], [ %62, %61 ], [ %79, %78 ], [ %91, %90 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn45

104:                                              ; preds = %.loopexit, %11
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 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_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 i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!18, !6, i64 4}
!20 = distinct !{!20, !10}


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