; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-11-13 (E - Song Jiang's rank list - lzy)

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

%"struct.std::pair" = type { i32, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@x = external dso_local global [209 x i32], align 16
@y = external dso_local global [209 x i32], align 16
@_Z1aB5cxx11 = external dso_local global [209 x %"struct.std::pair"], align 16
@_Z1qB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %12

12:                                               ; preds = %226, %0
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr %13, i64 %16
  %18 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %17)
  br i1 %18, label %19, label %22

19:                                               ; preds = %12
  %20 = load i32, ptr @n, align 4, !tbaa !8
  %21 = icmp ne i32 %20, 0
  br label %22

22:                                               ; preds = %19, %12
  %23 = phi i1 [ false, %12 ], [ %21, %19 ]
  br i1 %23, label %24, label %227

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

25:                                               ; preds = %41, %24
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = icmp slt 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 !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %32
  %34 = getelementptr inbounds %"struct.std::pair", ptr %33, i32 0, i32 1
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %34)
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %37
  %39 = getelementptr inbounds %"struct.std::pair", ptr %38, i32 0, i32 0
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %39)
  br label %41

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

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

45:                                               ; preds = %61, %44
  %46 = load i32, ptr %3, align 4, !tbaa !8
  %47 = load i32, ptr @n, align 4, !tbaa !8
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

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

50:                                               ; preds = %45
  %51 = load i32, ptr %3, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %52
  %54 = getelementptr inbounds %"struct.std::pair", ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !13
  %56 = sub nsw i32 0, %55
  %57 = load i32, ptr %3, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %58
  %60 = getelementptr inbounds %"struct.std::pair", ptr %59, i32 0, i32 0
  store i32 %56, ptr %60, align 8, !tbaa !13
  br label %61

61:                                               ; preds = %50
  %62 = load i32, ptr %3, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %3, align 4, !tbaa !8
  br label %45, !llvm.loop !19

64:                                               ; preds = %49
  %65 = load i32, ptr @n, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %"struct.std::pair", ptr @_Z1aB5cxx11, i64 %66
  call void @_ZSt4sortIPSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvT_S9_(ptr noundef @_Z1aB5cxx11, ptr noundef %67)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %68

68:                                               ; preds = %84, %64
  %69 = load i32, ptr %4, align 4, !tbaa !8
  %70 = load i32, ptr @n, align 4, !tbaa !8
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %87

73:                                               ; preds = %68
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %75
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = sub nsw i32 0, %78
  %80 = load i32, ptr %4, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %81
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 0
  store i32 %79, ptr %83, align 8, !tbaa !13
  br label %84

84:                                               ; preds = %73
  %85 = load i32, ptr %4, align 4, !tbaa !8
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %4, align 4, !tbaa !8
  br label %68, !llvm.loop !20

87:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %88

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

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

93:                                               ; preds = %88
  %94 = load i32, ptr %5, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %95
  %97 = getelementptr inbounds %"struct.std::pair", ptr %96, i32 0, i32 1
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %97)
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %98, i8 noundef signext 32)
  %100 = load i32, ptr %5, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %101
  %103 = getelementptr inbounds %"struct.std::pair", ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !13
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %107

107:                                              ; preds = %93
  %108 = load i32, ptr %5, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %5, align 4, !tbaa !8
  br label %88, !llvm.loop !21

110:                                              ; preds = %92
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  store i32 1, ptr @x, align 16, !tbaa !8
  store i32 1, ptr @y, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %112

112:                                              ; preds = %145, %110
  %113 = load i32, ptr %6, align 4, !tbaa !8
  %114 = load i32, ptr @n, align 4, !tbaa !8
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

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

117:                                              ; preds = %112
  %118 = load i32, ptr %6, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %119
  %121 = getelementptr inbounds %"struct.std::pair", ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !13
  %123 = load i32, ptr %6, align 4, !tbaa !8
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %125
  %127 = getelementptr inbounds %"struct.std::pair", ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !13
  %129 = icmp eq i32 %122, %128
  br i1 %129, label %130, label %140

130:                                              ; preds = %117
  %131 = load i32, ptr %6, align 4, !tbaa !8
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !8
  %136 = add nsw i32 %135, 1
  %137 = load i32, ptr %6, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %138
  store i32 %136, ptr %139, align 4, !tbaa !8
  br label %144

140:                                              ; preds = %117
  %141 = load i32, ptr %6, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %142
  store i32 1, ptr %143, align 4, !tbaa !8
  br label %144

144:                                              ; preds = %140, %130
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %6, align 4, !tbaa !8
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %6, align 4, !tbaa !8
  br label %112, !llvm.loop !22

148:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %149

149:                                              ; preds = %179, %148
  %150 = load i32, ptr %7, align 4, !tbaa !8
  %151 = load i32, ptr @n, align 4, !tbaa !8
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 19, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %182

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %155

155:                                              ; preds = %171, %154
  %156 = load i32, ptr %10, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %157
  %159 = getelementptr inbounds %"struct.std::pair", ptr %158, i32 0, i32 0
  %160 = load i32, ptr %159, align 8, !tbaa !13
  %161 = load i32, ptr %7, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %162
  %164 = getelementptr inbounds %"struct.std::pair", ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !13
  %166 = icmp sgt i32 %160, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %155
  store i32 22, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %174

168:                                              ; preds = %155
  %169 = load i32, ptr %9, align 4, !tbaa !8
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %9, align 4, !tbaa !8
  br label %171

171:                                              ; preds = %168
  %172 = load i32, ptr %10, align 4, !tbaa !8
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %10, align 4, !tbaa !8
  br label %155, !llvm.loop !23

174:                                              ; preds = %167
  %175 = load i32, ptr %9, align 4, !tbaa !8
  %176 = load i32, ptr %7, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [209 x i32], ptr @x, i64 0, i64 %177
  store i32 %175, ptr %178, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %179

179:                                              ; preds = %174
  %180 = load i32, ptr %7, align 4, !tbaa !8
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %7, align 4, !tbaa !8
  br label %149, !llvm.loop !24

182:                                              ; preds = %153
  br label %183

183:                                              ; preds = %225, %182
  %184 = load i32, ptr @m, align 4, !tbaa !8
  %185 = add nsw i32 %184, -1
  store i32 %185, ptr @m, align 4, !tbaa !8
  %186 = icmp ne i32 %184, 0
  br i1 %186, label %187, label %226

187:                                              ; preds = %183
  %188 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1qB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %189

189:                                              ; preds = %221, %187
  %190 = load i32, ptr %11, align 4, !tbaa !8
  %191 = load i32, ptr @n, align 4, !tbaa !8
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %189
  store i32 27, ptr %8, align 4
  br label %224

194:                                              ; preds = %189
  %195 = load i32, ptr %11, align 4, !tbaa !8
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %196
  %198 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 1
  %199 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %198, ptr noundef nonnull align 8 dereferenceable(32) @_Z1qB5cxx11) #6
  br i1 %199, label %200, label %220

200:                                              ; preds = %194
  %201 = load i32, ptr %11, align 4, !tbaa !8
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [209 x i32], ptr @x, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !8
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %204)
  %206 = load i32, ptr %11, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !8
  %210 = icmp ne i32 %209, 1
  br i1 %210, label %211, label %218

211:                                              ; preds = %200
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
  %213 = load i32, ptr %11, align 4, !tbaa !8
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !8
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %212, i32 noundef %216)
  br label %218

218:                                              ; preds = %211, %200
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 27, ptr %8, align 4
  br label %224

220:                                              ; preds = %194
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %11, align 4, !tbaa !8
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %11, align 4, !tbaa !8
  br label %189, !llvm.loop !25

224:                                              ; preds = %218, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %225

225:                                              ; preds = %224
  br label %183, !llvm.loop !26

226:                                              ; preds = %183
  br label %12, !llvm.loop !27

227:                                              ; preds = %22
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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


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

%"struct.std::pair" = type { i32, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@x = external dso_local local_unnamed_addr global [209 x i32], align 16
@y = external dso_local local_unnamed_addr global [209 x i32], align 16
@_Z1aB5cxx11 = external dso_local global [209 x %"struct.std::pair"], align 16
@_Z1qB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %2 = load ptr, ptr %1, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 %4
  %6 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %5)
  %7 = load i32, ptr @n, align 4
  %8 = icmp ne i32 %7, 0
  %9 = select i1 %6, i1 %8, i1 false
  br i1 %9, label %.preheader52, label %._crit_edge81

.loopexit48:                                      ; preds = %.loopexit, %.preheader47
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %10, i64 %13
  %15 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %14)
  %16 = load i32, ptr @n, align 4
  %17 = icmp ne i32 %16, 0
  %18 = select i1 %15, i1 %17, i1 false
  br i1 %18, label %.preheader52, label %._crit_edge81, !llvm.loop !8

.preheader52:                                     ; preds = %0, %.loopexit48
  %19 = phi i32 [ %16, %.loopexit48 ], [ %7, %0 ]
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.preheader51:                                     ; preds = %.lr.ph
  %21 = icmp sgt i32 %27, 0
  br i1 %21, label %.lr.ph58.preheader, label %._crit_edge

.lr.ph58.preheader:                               ; preds = %.preheader51
  %wide.trip.count = zext nneg i32 %27 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %22 = icmp ult i32 %27, 4
  br i1 %22, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58.preheader.new

.lr.ph58.preheader.new:                           ; preds = %.lr.ph58.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph58

.lr.ph:                                           ; preds = %.preheader52, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader52 ]
  %23 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr @n, align 4, !tbaa !10
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %.preheader51, !llvm.loop !13

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph58, %.lr.ph58.preheader
  %indvars.iv87.unr = phi i64 [ 0, %.lr.ph58.preheader ], [ %indvars.iv.next88.3, %.lr.ph58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph58.epil

.lr.ph58.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph58.epil
  %indvars.iv87.epil = phi i64 [ %indvars.iv.next88.epil, %.lr.ph58.epil ], [ %indvars.iv87.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph58.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %30 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv87.epil
  %31 = load i32, ptr %30, align 8, !tbaa !14
  %32 = sub nsw i32 0, %31
  store i32 %32, ptr %30, align 8, !tbaa !14
  %indvars.iv.next88.epil = add nuw nsw i64 %indvars.iv87.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph58.epil, !llvm.loop !20

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph58.epil, %.preheader52, %.preheader51
  %.lcssa115 = phi i32 [ %27, %.preheader51 ], [ %19, %.preheader52 ], [ %27, %.lr.ph58.epil ], [ %27, %._crit_edge.loopexit.unr-lcssa ]
  %33 = sext i32 %.lcssa115 to i64
  %34 = getelementptr inbounds %"struct.std::pair", ptr @_Z1aB5cxx11, i64 %33
  tail call void @_ZSt4sortIPSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvT_S9_(ptr noundef nonnull @_Z1aB5cxx11, ptr noundef nonnull %34)
  %35 = load i32, ptr @n, align 4, !tbaa !10
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph61.preheader, label %._crit_edge64

.lr.ph61.preheader:                               ; preds = %._crit_edge
  %wide.trip.count93 = zext nneg i32 %35 to i64
  %xtraiter122 = and i64 %wide.trip.count93, 3
  %37 = icmp ult i32 %35, 4
  br i1 %37, label %.preheader50.unr-lcssa, label %.lr.ph61.preheader.new

.lr.ph61.preheader.new:                           ; preds = %.lr.ph61.preheader
  %unroll_iter125 = and i64 %wide.trip.count93, 2147483644
  br label %.lr.ph61

.lr.ph58:                                         ; preds = %.lr.ph58, %.lr.ph58.preheader.new
  %indvars.iv87 = phi i64 [ 0, %.lr.ph58.preheader.new ], [ %indvars.iv.next88.3, %.lr.ph58 ]
  %niter = phi i64 [ 0, %.lr.ph58.preheader.new ], [ %niter.next.3, %.lr.ph58 ]
  %38 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv87
  %39 = load i32, ptr %38, align 16, !tbaa !14
  %40 = sub nsw i32 0, %39
  store i32 %40, ptr %38, align 16, !tbaa !14
  %indvars.iv.next88 = or disjoint i64 %indvars.iv87, 1
  %41 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next88
  %42 = load i32, ptr %41, align 8, !tbaa !14
  %43 = sub nsw i32 0, %42
  store i32 %43, ptr %41, align 8, !tbaa !14
  %indvars.iv.next88.1 = or disjoint i64 %indvars.iv87, 2
  %44 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next88.1
  %45 = load i32, ptr %44, align 16, !tbaa !14
  %46 = sub nsw i32 0, %45
  store i32 %46, ptr %44, align 16, !tbaa !14
  %indvars.iv.next88.2 = or disjoint i64 %indvars.iv87, 3
  %47 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next88.2
  %48 = load i32, ptr %47, align 8, !tbaa !14
  %49 = sub nsw i32 0, %48
  store i32 %49, ptr %47, align 8, !tbaa !14
  %indvars.iv.next88.3 = add nuw nsw i64 %indvars.iv87, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph58, !llvm.loop !22

.preheader50.unr-lcssa:                           ; preds = %.lr.ph61, %.lr.ph61.preheader
  %indvars.iv90.unr = phi i64 [ 0, %.lr.ph61.preheader ], [ %indvars.iv.next91.3, %.lr.ph61 ]
  %lcmp.mod124.not = icmp eq i64 %xtraiter122, 0
  br i1 %lcmp.mod124.not, label %.preheader50, label %.lr.ph61.epil

.lr.ph61.epil:                                    ; preds = %.preheader50.unr-lcssa, %.lr.ph61.epil
  %indvars.iv90.epil = phi i64 [ %indvars.iv.next91.epil, %.lr.ph61.epil ], [ %indvars.iv90.unr, %.preheader50.unr-lcssa ]
  %epil.iter123 = phi i64 [ %epil.iter123.next, %.lr.ph61.epil ], [ 0, %.preheader50.unr-lcssa ]
  %50 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv90.epil
  %51 = load i32, ptr %50, align 8, !tbaa !14
  %52 = sub nsw i32 0, %51
  store i32 %52, ptr %50, align 8, !tbaa !14
  %indvars.iv.next91.epil = add nuw nsw i64 %indvars.iv90.epil, 1
  %epil.iter123.next = add i64 %epil.iter123, 1
  %epil.iter123.cmp.not = icmp eq i64 %epil.iter123.next, %xtraiter122
  br i1 %epil.iter123.cmp.not, label %.preheader50, label %.lr.ph61.epil, !llvm.loop !23

.preheader50:                                     ; preds = %.lr.ph61.epil, %.preheader50.unr-lcssa
  br i1 %36, label %.lr.ph63, label %._crit_edge64

.lr.ph61:                                         ; preds = %.lr.ph61, %.lr.ph61.preheader.new
  %indvars.iv90 = phi i64 [ 0, %.lr.ph61.preheader.new ], [ %indvars.iv.next91.3, %.lr.ph61 ]
  %niter126 = phi i64 [ 0, %.lr.ph61.preheader.new ], [ %niter126.next.3, %.lr.ph61 ]
  %53 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv90
  %54 = load i32, ptr %53, align 16, !tbaa !14
  %55 = sub nsw i32 0, %54
  store i32 %55, ptr %53, align 16, !tbaa !14
  %indvars.iv.next91 = or disjoint i64 %indvars.iv90, 1
  %56 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next91
  %57 = load i32, ptr %56, align 8, !tbaa !14
  %58 = sub nsw i32 0, %57
  store i32 %58, ptr %56, align 8, !tbaa !14
  %indvars.iv.next91.1 = or disjoint i64 %indvars.iv90, 2
  %59 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next91.1
  %60 = load i32, ptr %59, align 16, !tbaa !14
  %61 = sub nsw i32 0, %60
  store i32 %61, ptr %59, align 16, !tbaa !14
  %indvars.iv.next91.2 = or disjoint i64 %indvars.iv90, 3
  %62 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next91.2
  %63 = load i32, ptr %62, align 8, !tbaa !14
  %64 = sub nsw i32 0, %63
  store i32 %64, ptr %62, align 8, !tbaa !14
  %indvars.iv.next91.3 = add nuw nsw i64 %indvars.iv90, 4
  %niter126.next.3 = add i64 %niter126, 4
  %niter126.ncmp.3 = icmp eq i64 %niter126.next.3, %unroll_iter125
  br i1 %niter126.ncmp.3, label %.preheader50.unr-lcssa, label %.lr.ph61, !llvm.loop !24

._crit_edge64:                                    ; preds = %.lr.ph63, %._crit_edge, %.preheader50
  %65 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  store i32 1, ptr @x, align 16, !tbaa !10
  store i32 1, ptr @y, align 16, !tbaa !10
  %66 = load i32, ptr @n, align 4, !tbaa !10
  %67 = icmp sgt i32 %66, 1
  br i1 %67, label %.lr.ph67.preheader, label %.preheader49

.lr.ph67.preheader:                               ; preds = %._crit_edge64
  %wide.trip.count101 = zext nneg i32 %66 to i64
  %.pre = load i32, ptr @_Z1aB5cxx11, align 16, !tbaa !14
  %68 = add nsw i64 %wide.trip.count101, -1
  %xtraiter127 = and i64 %68, 1
  %69 = icmp eq i32 %66, 2
  br i1 %69, label %.preheader49.loopexit.unr-lcssa, label %.lr.ph67.preheader.new

.lr.ph67.preheader.new:                           ; preds = %.lr.ph67.preheader
  %unroll_iter131 = and i64 %68, -2
  br label %.lr.ph67

.lr.ph63:                                         ; preds = %.preheader50, %.lr.ph63
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph63 ], [ 0, %.preheader50 ]
  %70 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv95
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  %72 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %71)
  %73 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 32)
  %74 = load i32, ptr %70, align 8, !tbaa !14
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %73, i32 noundef %74)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %77 = load i32, ptr @n, align 4, !tbaa !10
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next96, %78
  br i1 %79, label %.lr.ph63, label %._crit_edge64, !llvm.loop !25

.preheader49.loopexit.unr-lcssa:                  ; preds = %.lr.ph67, %.lr.ph67.preheader
  %.unr = phi i32 [ 1, %.lr.ph67.preheader ], [ %.sink.1, %.lr.ph67 ]
  %.unr129 = phi i32 [ %.pre, %.lr.ph67.preheader ], [ %95, %.lr.ph67 ]
  %indvars.iv98.unr = phi i64 [ 1, %.lr.ph67.preheader ], [ %indvars.iv.next99.1, %.lr.ph67 ]
  %lcmp.mod130.not = icmp eq i64 %xtraiter127, 0
  br i1 %lcmp.mod130.not, label %.preheader49, label %.lr.ph67.epil

.lr.ph67.epil:                                    ; preds = %.preheader49.loopexit.unr-lcssa
  %80 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv98.unr
  %81 = load i32, ptr %80, align 8, !tbaa !14
  %82 = icmp eq i32 %81, %.unr129
  %83 = add nsw i32 %.unr, 1
  %.sink.epil = select i1 %82, i32 %83, i32 1
  %84 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %indvars.iv98.unr
  store i32 %.sink.epil, ptr %84, align 4
  br label %.preheader49

.preheader49:                                     ; preds = %.lr.ph67.epil, %.preheader49.loopexit.unr-lcssa, %._crit_edge64
  %85 = icmp sgt i32 %66, 0
  br i1 %85, label %.preheader.lr.ph, label %.preheader47

.preheader.lr.ph:                                 ; preds = %.preheader49
  %86 = load i32, ptr @_Z1aB5cxx11, align 16, !tbaa !14
  %wide.trip.count109 = zext nneg i32 %66 to i64
  br label %.preheader

.lr.ph67:                                         ; preds = %.lr.ph67, %.lr.ph67.preheader.new
  %87 = phi i32 [ 1, %.lr.ph67.preheader.new ], [ %.sink.1, %.lr.ph67 ]
  %88 = phi i32 [ %.pre, %.lr.ph67.preheader.new ], [ %95, %.lr.ph67 ]
  %indvars.iv98 = phi i64 [ 1, %.lr.ph67.preheader.new ], [ %indvars.iv.next99.1, %.lr.ph67 ]
  %niter132 = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %niter132.next.1, %.lr.ph67 ]
  %89 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv98
  %90 = load i32, ptr %89, align 8, !tbaa !14
  %91 = icmp eq i32 %90, %88
  %92 = add nsw i32 %87, 1
  %.sink = select i1 %91, i32 %92, i32 1
  %93 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %indvars.iv98
  store i32 %.sink, ptr %93, align 4
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %94 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next99
  %95 = load i32, ptr %94, align 8, !tbaa !14
  %96 = icmp eq i32 %95, %90
  %97 = add nsw i32 %.sink, 1
  %.sink.1 = select i1 %96, i32 %97, i32 1
  %98 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %indvars.iv.next99
  store i32 %.sink.1, ptr %98, align 4
  %indvars.iv.next99.1 = add nuw nsw i64 %indvars.iv98, 2
  %niter132.next.1 = add i64 %niter132, 2
  %niter132.ncmp.1 = icmp eq i64 %niter132.next.1, %unroll_iter131
  br i1 %niter132.ncmp.1, label %.preheader49.loopexit.unr-lcssa, label %.lr.ph67, !llvm.loop !26

.preheader47:                                     ; preds = %._crit_edge72, %.preheader49
  %99 = load i32, ptr @m, align 4, !tbaa !10
  %100 = add nsw i32 %99, -1
  store i32 %100, ptr @m, align 4, !tbaa !10
  %.not79 = icmp eq i32 %99, 0
  br i1 %.not79, label %.loopexit48, label %.lr.ph80

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge72
  %indvars.iv106 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next107, %._crit_edge72 ]
  %101 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv106
  %102 = load i32, ptr %101, align 8, !tbaa !14
  %103 = icmp sgt i32 %86, %102
  br i1 %103, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %.lr.ph71, %.preheader
  %.038.lcssa = phi i32 [ 1, %.preheader ], [ %105, %.lr.ph71 ]
  %104 = getelementptr inbounds [209 x i32], ptr @x, i64 0, i64 %indvars.iv106
  store i32 %.038.lcssa, ptr %104, align 4, !tbaa !10
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count109
  br i1 %exitcond110.not, label %.preheader47, label %.preheader, !llvm.loop !27

.lr.ph71:                                         ; preds = %.preheader, %.lr.ph71
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.lr.ph71 ], [ 0, %.preheader ]
  %.03869 = phi i32 [ %105, %.lr.ph71 ], [ 1, %.preheader ]
  %105 = add nuw nsw i32 %.03869, 1
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %106 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv.next104
  %107 = load i32, ptr %106, align 8, !tbaa !14
  %108 = icmp sgt i32 %107, %102
  br i1 %108, label %.lr.ph71, label %._crit_edge72, !llvm.loop !28

.lr.ph80:                                         ; preds = %.preheader47, %.loopexit
  %109 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1qB5cxx11)
  %110 = load i32, ptr @n, align 4, !tbaa !10
  %111 = icmp sgt i32 %110, 0
  br i1 %111, label %.lr.ph78, label %.loopexit

112:                                              ; preds = %.lr.ph78
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %113 = load i32, ptr @n, align 4, !tbaa !10
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next112, %114
  br i1 %115, label %.lr.ph78, label %.loopexit, !llvm.loop !29

.lr.ph78:                                         ; preds = %.lr.ph80, %112
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %112 ], [ 0, %.lr.ph80 ]
  %116 = getelementptr inbounds [209 x %"struct.std::pair"], ptr @_Z1aB5cxx11, i64 0, i64 %indvars.iv111, i32 1
  %117 = tail call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %116, ptr noundef nonnull align 8 dereferenceable(32) @_Z1qB5cxx11) #5
  br i1 %117, label %118, label %112

118:                                              ; preds = %.lr.ph78
  %119 = getelementptr inbounds [209 x i32], ptr @x, i64 0, i64 %indvars.iv111
  %120 = load i32, ptr %119, align 4, !tbaa !10
  %121 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %120)
  %122 = getelementptr inbounds [209 x i32], ptr @y, i64 0, i64 %indvars.iv111
  %123 = load i32, ptr %122, align 4, !tbaa !10
  %.not46 = icmp eq i32 %123, 1
  br i1 %.not46, label %128, label %124

124:                                              ; preds = %118
  %125 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
  %126 = load i32, ptr %122, align 4, !tbaa !10
  %127 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %125, i32 noundef %126)
  br label %128

128:                                              ; preds = %124, %118
  %129 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

.loopexit:                                        ; preds = %112, %.lr.ph80, %128
  %130 = load i32, ptr @m, align 4, !tbaa !10
  %131 = add nsw i32 %130, -1
  store i32 %131, ptr @m, align 4, !tbaa !10
  %.not = icmp eq i32 %130, 0
  br i1 %.not, label %.loopexit48, label %.lr.ph80, !llvm.loop !30

._crit_edge81:                                    ; preds = %.loopexit48, %0
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = distinct !{!13, !9}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTSSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !11, i64 0, !16, i64 8}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !19, i64 8, !12, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!18 = !{!"any pointer", !12, i64 0}
!19 = !{!"long", !12, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !9}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !9}
!25 = distinct !{!25, !9}
!26 = distinct !{!26, !9}
!27 = distinct !{!27, !9}
!28 = distinct !{!28, !9}
!29 = distinct !{!29, !9}
!30 = distinct !{!30, !9}


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