; LLVM IR from eyangch/competitive-programming :: teamscode/2022 (h)

; 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::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" }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@A = external dso_local global [100000 x i64], align 16
@S = external dso_local global [20 x i64], align 16
@E = external dso_local global [20 x i64], align 16
@L = external dso_local global [20 x i64], align 16
@dp = external dso_local global [100000 x i64], align 16
@cdp = external dso_local global [100000 x i64], align 16
@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca double, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca [32 x %"class.std::multiset"], align 16
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca [32 x i8], align 16
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  %23 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %24 = getelementptr i8, ptr %23, i64 -24
  %25 = load i64, ptr %24, align 8
  %26 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %25
  %27 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %26, ptr noundef null)
  %28 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %30

30:                                               ; preds = %277, %0
  %31 = load i64, ptr @T, align 8, !tbaa !8
  %32 = add nsw i64 %31, -1
  store i64 %32, ptr @T, align 8, !tbaa !8
  %33 = icmp ne i64 %31, 0
  br i1 %33, label %34, label %284

34:                                               ; preds = %30
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %37

37:                                               ; preds = %46, %34
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = load i64, ptr @N, align 8, !tbaa !8
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %49

42:                                               ; preds = %37
  %43 = load i64, ptr %2, align 8, !tbaa !8
  %44 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %43
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %44)
  br label %46

46:                                               ; preds = %42
  %47 = load i64, ptr %2, align 8, !tbaa !8
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %2, align 8, !tbaa !8
  br label %37, !llvm.loop !11

49:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %50

50:                                               ; preds = %73, %49
  %51 = load i64, ptr %3, align 8, !tbaa !8
  %52 = load i64, ptr @M, align 8, !tbaa !8
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  %56 = load i64, ptr %3, align 8, !tbaa !8
  %57 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %56
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %57)
  %59 = load i64, ptr %3, align 8, !tbaa !8
  %60 = getelementptr inbounds [20 x i64], ptr @E, i64 0, i64 %59
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef nonnull align 8 dereferenceable(8) %60)
  %62 = load i64, ptr %3, align 8, !tbaa !8
  %63 = getelementptr inbounds [20 x i64], ptr @L, i64 0, i64 %62
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %63)
  %65 = load i64, ptr %3, align 8, !tbaa !8
  %66 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !8
  %68 = add nsw i64 %67, -1
  store i64 %68, ptr %66, align 8, !tbaa !8
  %69 = load i64, ptr %3, align 8, !tbaa !8
  %70 = getelementptr inbounds [20 x i64], ptr @E, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = add nsw i64 %71, -1
  store i64 %72, ptr %70, align 8, !tbaa !8
  br label %73

73:                                               ; preds = %55
  %74 = load i64, ptr %3, align 8, !tbaa !8
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %3, align 8, !tbaa !8
  br label %50, !llvm.loop !13

76:                                               ; preds = %54
  %77 = load i64, ptr @N, align 8, !tbaa !8
  %78 = getelementptr inbounds i64, ptr @dp, i64 %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store double 1.000000e+09, ptr %4, align 8, !tbaa !14
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @dp, ptr noundef %78, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  store i64 0, ptr @dp, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %79

79:                                               ; preds = %262, %76
  %80 = load i64, ptr %5, align 8, !tbaa !8
  %81 = load i64, ptr @M, align 8, !tbaa !8
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %277

84:                                               ; preds = %79
  %85 = load i64, ptr @N, align 8, !tbaa !8
  %86 = getelementptr inbounds i64, ptr @dp, i64 %85
  %87 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef @dp, ptr noundef %86, ptr noundef @cdp)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1536, ptr %8) #7
  %88 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i32 0, i32 0
  %89 = getelementptr inbounds %"class.std::multiset", ptr %88, i64 32
  br label %90

90:                                               ; preds = %90, %84
  %91 = phi ptr [ %88, %84 ], [ %92, %90 ]
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %91) #7
  %92 = getelementptr inbounds %"class.std::multiset", ptr %91, i64 1
  %93 = icmp eq ptr %92, %89
  br i1 %93, label %94, label %90

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %95 = load i64, ptr %5, align 8, !tbaa !8
  %96 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !8
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %9, align 8, !tbaa !8
  br label %99

99:                                               ; preds = %240, %94
  %100 = load i64, ptr %9, align 8, !tbaa !8
  %101 = load i64, ptr %5, align 8, !tbaa !8
  %102 = getelementptr inbounds [20 x i64], ptr @E, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !8
  %104 = icmp sle i64 %100, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %99
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %250

106:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %107 = load i64, ptr %9, align 8, !tbaa !8
  %108 = load i64, ptr %5, align 8, !tbaa !8
  %109 = getelementptr inbounds [20 x i64], ptr @L, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = sub nsw i64 %107, %110
  store i64 %111, ptr %10, align 8, !tbaa !8
  %112 = load i64, ptr %10, align 8, !tbaa !8
  %113 = load i64, ptr %5, align 8, !tbaa !8
  %114 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !8
  %116 = add nsw i64 %115, 1
  %117 = icmp sge i64 %112, %116
  br i1 %117, label %118, label %143

118:                                              ; preds = %106
  %119 = load i64, ptr %7, align 8, !tbaa !8
  %120 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %119
  %121 = load i64, ptr %7, align 8, !tbaa !8
  %122 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %121
  %123 = load i64, ptr %10, align 8, !tbaa !8
  %124 = sub nsw i64 %123, 1
  %125 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %124
  %126 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE4findERKx(ptr noundef nonnull align 8 dereferenceable(48) %122, ptr noundef nonnull align 8 dereferenceable(8) %125)
          to label %127 unwind label %139

127:                                              ; preds = %118
  %128 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %126, ptr %128, align 8
  %129 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8
  %131 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %120, ptr %130)
          to label %132 unwind label %139

132:                                              ; preds = %127
  %133 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %131, ptr %133, align 8
  %134 = load i64, ptr %10, align 8, !tbaa !8
  %135 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !8
  %137 = load i64, ptr %7, align 8, !tbaa !8
  %138 = xor i64 %137, %136
  store i64 %138, ptr %7, align 8, !tbaa !8
  br label %143

139:                                              ; preds = %127, %118
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %12, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %13, align 4
  br label %249

143:                                              ; preds = %132, %106
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  %144 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 0
  %145 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 0
  %146 = getelementptr inbounds i8, ptr %145, i64 32
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !16
  invoke void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef %144, ptr noundef %146, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %147 unwind label %152

147:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %148

148:                                              ; preds = %179, %147
  %149 = load i64, ptr %17, align 8, !tbaa !8
  %150 = icmp slt i64 %149, 32
  br i1 %150, label %156, label %151

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

152:                                              ; preds = %143
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %12, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %248

156:                                              ; preds = %148
  %157 = load i64, ptr %17, align 8, !tbaa !8
  %158 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 %157
  %159 = load i8, ptr %158, align 1, !tbaa !18, !range !20, !noundef !21
  %160 = trunc i8 %159 to i1
  br i1 %160, label %161, label %162

161:                                              ; preds = %156
  br label %179

162:                                              ; preds = %156
  %163 = load i64, ptr %17, align 8, !tbaa !8
  %164 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 %163
  store i8 1, ptr %164, align 1, !tbaa !18
  %165 = load i64, ptr %17, align 8, !tbaa !8
  %166 = load i64, ptr %9, align 8, !tbaa !8
  %167 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !8
  %169 = xor i64 %165, %168
  %170 = getelementptr inbounds [32 x i8], ptr %15, i64 0, i64 %169
  store i8 1, ptr %170, align 1, !tbaa !18
  %171 = load i64, ptr %17, align 8, !tbaa !8
  %172 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %171
  %173 = load i64, ptr %17, align 8, !tbaa !8
  %174 = load i64, ptr %9, align 8, !tbaa !8
  %175 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !8
  %177 = xor i64 %173, %176
  %178 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %177
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48) %172, ptr noundef nonnull align 8 dereferenceable(48) %178) #7
  br label %179

179:                                              ; preds = %162, %161
  %180 = load i64, ptr %17, align 8, !tbaa !8
  %181 = add nsw i64 %180, 1
  store i64 %181, ptr %17, align 8, !tbaa !8
  br label %148, !llvm.loop !22

182:                                              ; preds = %151
  %183 = load i64, ptr %9, align 8, !tbaa !8
  %184 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %183
  %185 = load i64, ptr %184, align 8, !tbaa !8
  %186 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %185
  %187 = load i64, ptr %9, align 8, !tbaa !8
  %188 = sub nsw i64 %187, 1
  %189 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %188
  %190 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %186, ptr noundef nonnull align 8 dereferenceable(8) %189)
          to label %191 unwind label %202

191:                                              ; preds = %182
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %190, ptr %192, align 8
  %193 = load i64, ptr %9, align 8, !tbaa !8
  %194 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !8
  %196 = load i64, ptr %7, align 8, !tbaa !8
  %197 = xor i64 %196, %195
  store i64 %197, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 1000000000, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %198

198:                                              ; preds = %229, %191
  %199 = load i64, ptr %20, align 8, !tbaa !8
  %200 = icmp slt i64 %199, 32
  br i1 %200, label %206, label %201

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

202:                                              ; preds = %182
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %12, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %13, align 4
  br label %248

206:                                              ; preds = %198
  %207 = load i64, ptr %20, align 8, !tbaa !8
  %208 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %207
  %209 = call noundef i64 @_ZNKSt8multisetIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %208) #7
  %210 = icmp ne i64 %209, 0
  br i1 %210, label %211, label %228

211:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %212 = load i64, ptr %20, align 8, !tbaa !8
  %213 = sub nsw i64 %212, 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %214 = load i64, ptr %20, align 8, !tbaa !8
  %215 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i64 0, i64 %214
  %216 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %215) #7
  %217 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %216, ptr %217, align 8
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %219 = load i64, ptr %218, align 8, !tbaa !8
  %220 = add nsw i64 %213, %219
  store i64 %220, ptr %21, align 8, !tbaa !8
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %222 unwind label %224

222:                                              ; preds = %211
  %223 = load i64, ptr %221, align 8, !tbaa !8
  store i64 %223, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %228

224:                                              ; preds = %211
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %12, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %247

228:                                              ; preds = %222, %206
  br label %229

229:                                              ; preds = %228
  %230 = load i64, ptr %20, align 8, !tbaa !8
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %20, align 8, !tbaa !8
  br label %198, !llvm.loop !23

232:                                              ; preds = %201
  %233 = load i64, ptr %9, align 8, !tbaa !8
  %234 = getelementptr inbounds [100000 x i64], ptr @cdp, i64 0, i64 %233
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %236 unwind label %243

236:                                              ; preds = %232
  %237 = load i64, ptr %235, align 8, !tbaa !8
  %238 = load i64, ptr %9, align 8, !tbaa !8
  %239 = getelementptr inbounds [100000 x i64], ptr @cdp, i64 0, i64 %238
  store i64 %237, ptr %239, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %240

240:                                              ; preds = %236
  %241 = load i64, ptr %9, align 8, !tbaa !8
  %242 = add nsw i64 %241, 1
  store i64 %242, ptr %9, align 8, !tbaa !8
  br label %99, !llvm.loop !24

243:                                              ; preds = %232
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %12, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %13, align 4
  br label %247

247:                                              ; preds = %243, %224
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %248

248:                                              ; preds = %247, %202, %152
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %249

249:                                              ; preds = %248, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %269

250:                                              ; preds = %105
  %251 = load i64, ptr @N, align 8, !tbaa !8
  %252 = getelementptr inbounds i64, ptr @cdp, i64 %251
  %253 = invoke noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef @cdp, ptr noundef %252, ptr noundef @dp)
          to label %254 unwind label %265

254:                                              ; preds = %250
  %255 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i32 0, i32 0
  %256 = getelementptr inbounds %"class.std::multiset", ptr %255, i64 32
  br label %257

257:                                              ; preds = %257, %254
  %258 = phi ptr [ %256, %254 ], [ %259, %257 ]
  %259 = getelementptr inbounds %"class.std::multiset", ptr %258, i64 -1
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %259) #7
  %260 = icmp eq ptr %259, %255
  br i1 %260, label %261, label %257

261:                                              ; preds = %257
  call void @llvm.lifetime.end.p0(i64 1536, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %262

262:                                              ; preds = %261
  %263 = load i64, ptr %5, align 8, !tbaa !8
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %5, align 8, !tbaa !8
  br label %79, !llvm.loop !25

265:                                              ; preds = %250
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %12, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %13, align 4
  br label %269

269:                                              ; preds = %265, %249
  %270 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %8, i32 0, i32 0
  %271 = getelementptr inbounds %"class.std::multiset", ptr %270, i64 32
  br label %272

272:                                              ; preds = %272, %269
  %273 = phi ptr [ %271, %269 ], [ %274, %272 ]
  %274 = getelementptr inbounds %"class.std::multiset", ptr %273, i64 -1
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %274) #7
  %275 = icmp eq ptr %274, %270
  br i1 %275, label %276, label %272

276:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 1536, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %286

277:                                              ; preds = %83
  %278 = load i64, ptr @N, align 8, !tbaa !8
  %279 = sub nsw i64 %278, 1
  %280 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %279
  %281 = load i64, ptr %280, align 8, !tbaa !8
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %281)
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %282, i8 noundef signext 10)
  br label %30, !llvm.loop !26

284:                                              ; preds = %30
  %285 = load i32, ptr %1, align 4
  ret i32 %285

286:                                              ; preds = %276
  %287 = load ptr, ptr %12, align 8
  %288 = load i32, ptr %13, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48), ptr) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIxSt4lessIxESaIxEE4findERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8multisetIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; 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) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #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 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !10, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !10, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !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"

%"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" }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@A = external dso_local global [100000 x i64], align 16
@S = external dso_local global [20 x i64], align 16
@E = external dso_local global [20 x i64], align 16
@L = external dso_local global [20 x i64], align 16
@dp = external dso_local global [100000 x i64], align 16
@cdp = external dso_local global [100000 x i64], align 16
@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca double, align 8
  %2 = alloca [32 x %"class.std::multiset"], align 16
  %3 = alloca [32 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %15 = load i64, ptr @T, align 8, !tbaa !8
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr @T, align 8, !tbaa !8
  %.not92 = icmp eq i64 %15, 0
  br i1 %.not92, label %._crit_edge95, label %.lr.ph94

.lr.ph94:                                         ; preds = %0
  %17 = getelementptr inbounds i8, ptr %3, i64 32
  %.ptr.1 = getelementptr inbounds i8, ptr %2, i64 48
  %.ptr.2 = getelementptr inbounds i8, ptr %2, i64 96
  %.ptr.3 = getelementptr inbounds i8, ptr %2, i64 144
  %.ptr.4 = getelementptr inbounds i8, ptr %2, i64 192
  %.ptr.5 = getelementptr inbounds i8, ptr %2, i64 240
  %.ptr.6 = getelementptr inbounds i8, ptr %2, i64 288
  %.ptr.7 = getelementptr inbounds i8, ptr %2, i64 336
  %.ptr.8 = getelementptr inbounds i8, ptr %2, i64 384
  %.ptr.9 = getelementptr inbounds i8, ptr %2, i64 432
  %.ptr.10 = getelementptr inbounds i8, ptr %2, i64 480
  %.ptr.11 = getelementptr inbounds i8, ptr %2, i64 528
  %.ptr.12 = getelementptr inbounds i8, ptr %2, i64 576
  %.ptr.13 = getelementptr inbounds i8, ptr %2, i64 624
  %.ptr.14 = getelementptr inbounds i8, ptr %2, i64 672
  %.ptr.15 = getelementptr inbounds i8, ptr %2, i64 720
  %.ptr.16 = getelementptr inbounds i8, ptr %2, i64 768
  %.ptr.17 = getelementptr inbounds i8, ptr %2, i64 816
  %.ptr.18 = getelementptr inbounds i8, ptr %2, i64 864
  %.ptr.19 = getelementptr inbounds i8, ptr %2, i64 912
  %.ptr.20 = getelementptr inbounds i8, ptr %2, i64 960
  %.ptr.21 = getelementptr inbounds i8, ptr %2, i64 1008
  %.ptr.22 = getelementptr inbounds i8, ptr %2, i64 1056
  %.ptr.23 = getelementptr inbounds i8, ptr %2, i64 1104
  %.ptr.24 = getelementptr inbounds i8, ptr %2, i64 1152
  %.ptr.25 = getelementptr inbounds i8, ptr %2, i64 1200
  %.ptr.26 = getelementptr inbounds i8, ptr %2, i64 1248
  %.ptr.27 = getelementptr inbounds i8, ptr %2, i64 1296
  %.ptr.28 = getelementptr inbounds i8, ptr %2, i64 1344
  %.ptr.29 = getelementptr inbounds i8, ptr %2, i64 1392
  %.ptr.30 = getelementptr inbounds i8, ptr %2, i64 1440
  %.ptr.31 = getelementptr inbounds i8, ptr %2, i64 1488
  %18 = getelementptr inbounds i8, ptr %2, i64 1488
  %19 = getelementptr inbounds i8, ptr %2, i64 1440
  %20 = getelementptr inbounds i8, ptr %2, i64 1392
  %21 = getelementptr inbounds i8, ptr %2, i64 1344
  %22 = getelementptr inbounds i8, ptr %2, i64 1296
  %23 = getelementptr inbounds i8, ptr %2, i64 1248
  %24 = getelementptr inbounds i8, ptr %2, i64 1200
  %25 = getelementptr inbounds i8, ptr %2, i64 1152
  %26 = getelementptr inbounds i8, ptr %2, i64 1104
  %27 = getelementptr inbounds i8, ptr %2, i64 1056
  %28 = getelementptr inbounds i8, ptr %2, i64 1008
  %29 = getelementptr inbounds i8, ptr %2, i64 960
  %30 = getelementptr inbounds i8, ptr %2, i64 912
  %31 = getelementptr inbounds i8, ptr %2, i64 864
  %32 = getelementptr inbounds i8, ptr %2, i64 816
  %33 = getelementptr inbounds i8, ptr %2, i64 768
  %34 = getelementptr inbounds i8, ptr %2, i64 720
  %35 = getelementptr inbounds i8, ptr %2, i64 672
  %36 = getelementptr inbounds i8, ptr %2, i64 624
  %37 = getelementptr inbounds i8, ptr %2, i64 576
  %38 = getelementptr inbounds i8, ptr %2, i64 528
  %39 = getelementptr inbounds i8, ptr %2, i64 480
  %40 = getelementptr inbounds i8, ptr %2, i64 432
  %41 = getelementptr inbounds i8, ptr %2, i64 384
  %42 = getelementptr inbounds i8, ptr %2, i64 336
  %43 = getelementptr inbounds i8, ptr %2, i64 288
  %44 = getelementptr inbounds i8, ptr %2, i64 240
  %45 = getelementptr inbounds i8, ptr %2, i64 192
  %46 = getelementptr inbounds i8, ptr %2, i64 144
  %47 = getelementptr inbounds i8, ptr %2, i64 96
  %48 = getelementptr inbounds i8, ptr %2, i64 48
  br label %49

49:                                               ; preds = %.lr.ph94, %._crit_edge91
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %52 = load i64, ptr @N, align 8, !tbaa !8
  %53 = icmp sgt i64 %52, 1
  br i1 %53, label %.lr.ph, label %.preheader71

.preheader71:                                     ; preds = %.lr.ph, %49
  %54 = phi i64 [ %52, %49 ], [ %60, %.lr.ph ]
  %55 = load i64, ptr @M, align 8, !tbaa !8
  %56 = icmp sgt i64 %55, 0
  br i1 %56, label %.lr.ph77, label %._crit_edge

.lr.ph:                                           ; preds = %49, %.lr.ph
  %.04975 = phi i64 [ %59, %.lr.ph ], [ 1, %49 ]
  %57 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %.04975
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %57)
  %59 = add nuw nsw i64 %.04975, 1
  %60 = load i64, ptr @N, align 8, !tbaa !8
  %61 = icmp slt i64 %59, %60
  br i1 %61, label %.lr.ph, label %.preheader71, !llvm.loop !11

._crit_edge.loopexit:                             ; preds = %.lr.ph77
  %.pre = load i64, ptr @N, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader71
  %62 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %54, %.preheader71 ]
  %63 = getelementptr inbounds i64, ptr @dp, i64 %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store double 1.000000e+09, ptr %1, align 8, !tbaa !13
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull %63, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr @dp, align 16, !tbaa !8
  %64 = load i64, ptr @M, align 8, !tbaa !8
  %65 = icmp sgt i64 %64, 0
  br i1 %65, label %.lr.ph90, label %._crit_edge91

.lr.ph77:                                         ; preds = %.preheader71, %.lr.ph77
  %.05176 = phi i64 [ %76, %.lr.ph77 ], [ 0, %.preheader71 ]
  %66 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %.05176
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %66)
  %68 = getelementptr inbounds [20 x i64], ptr @E, i64 0, i64 %.05176
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(8) %68)
  %70 = getelementptr inbounds [20 x i64], ptr @L, i64 0, i64 %.05176
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 8 dereferenceable(8) %70)
  %72 = load i64, ptr %66, align 8, !tbaa !8
  %73 = add nsw i64 %72, -1
  store i64 %73, ptr %66, align 8, !tbaa !8
  %74 = load i64, ptr %68, align 8, !tbaa !8
  %75 = add nsw i64 %74, -1
  store i64 %75, ptr %68, align 8, !tbaa !8
  %76 = add nuw nsw i64 %.05176, 1
  %77 = load i64, ptr @M, align 8, !tbaa !8
  %78 = icmp slt i64 %76, %77
  br i1 %78, label %.lr.ph77, label %._crit_edge.loopexit, !llvm.loop !15

._crit_edge91:                                    ; preds = %.preheader.preheader, %._crit_edge
  %79 = load i64, ptr @N, align 8, !tbaa !8
  %80 = add nsw i64 %79, -1
  %81 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 10)
  %85 = load i64, ptr @T, align 8, !tbaa !8
  %86 = add nsw i64 %85, -1
  store i64 %86, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %85, 0
  br i1 %.not, label %._crit_edge95, label %49, !llvm.loop !16

.lr.ph90:                                         ; preds = %._crit_edge, %.preheader.preheader
  %.05688 = phi i64 [ %98, %.preheader.preheader ], [ 0, %._crit_edge ]
  %87 = load i64, ptr @N, align 8, !tbaa !8
  %88 = getelementptr inbounds i64, ptr @dp, i64 %87
  %89 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull @dp, ptr noundef nonnull %88, ptr noundef nonnull @cdp)
  call void @llvm.lifetime.start.p0(i64 1536, ptr nonnull %2) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.1) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.2) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.3) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.4) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.5) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.6) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.7) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.8) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.9) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.10) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.11) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.12) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.13) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.14) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.15) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.16) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.17) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.18) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.19) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.20) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.21) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.22) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.23) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.24) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.25) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.26) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.27) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.28) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.29) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.30) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr.31) #7
  %90 = getelementptr inbounds [20 x i64], ptr @S, i64 0, i64 %.05688
  %91 = load i64, ptr %90, align 8, !tbaa !8
  %92 = getelementptr inbounds [20 x i64], ptr @E, i64 0, i64 %.05688
  %93 = load i64, ptr %92, align 8, !tbaa !8
  %.not65.not81 = icmp slt i64 %91, %93
  br i1 %.not65.not81, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %.lr.ph90
  %94 = getelementptr inbounds [20 x i64], ptr @L, i64 0, i64 %.05688
  br label %101

._crit_edge87:                                    ; preds = %142, %.lr.ph90
  %95 = load i64, ptr @N, align 8, !tbaa !8
  %96 = getelementptr inbounds i64, ptr @cdp, i64 %95
  %97 = invoke noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull @cdp, ptr noundef nonnull %96, ptr noundef nonnull @dp)
          to label %.preheader.preheader unwind label %164

.preheader.preheader:                             ; preds = %._crit_edge87
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %20) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %22) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %23) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %24) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %28) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %29) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %30) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %33) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %34) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %37) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %38) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %39) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %40) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %41) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %42) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %43) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %44) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %45) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %46) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %47) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %48) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 1536, ptr nonnull %2) #7
  %98 = add nuw nsw i64 %.05688, 1
  %99 = load i64, ptr @M, align 8, !tbaa !8
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %.lr.ph90, label %._crit_edge91, !llvm.loop !17

101:                                              ; preds = %.lr.ph86, %142
  %.057.in83 = phi i64 [ %91, %.lr.ph86 ], [ %.05784, %142 ]
  %.05882 = phi i64 [ 0, %.lr.ph86 ], [ %143, %142 ]
  %.05784 = add nsw i64 %.057.in83, 1
  %102 = load i64, ptr %94, align 8, !tbaa !8
  %103 = sub nsw i64 %.05784, %102
  %104 = load i64, ptr %90, align 8, !tbaa !8
  %.not66.not = icmp sgt i64 %103, %104
  br i1 %.not66.not, label %105, label %118

105:                                              ; preds = %101
  %106 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %2, i64 0, i64 %.05882
  %107 = add nsw i64 %103, -1
  %108 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %107
  %109 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE4findERKx(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %110 unwind label %116

110:                                              ; preds = %105
  %111 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr %109)
          to label %112 unwind label %116

112:                                              ; preds = %110
  %113 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %103
  %114 = load i64, ptr %113, align 8, !tbaa !8
  %115 = xor i64 %114, %.05882
  br label %118

116:                                              ; preds = %110, %105
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %166

118:                                              ; preds = %112, %101
  %.159 = phi i64 [ %115, %112 ], [ %.05882, %101 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !18
  invoke void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef nonnull %3, ptr noundef nonnull %17, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %119 unwind label %126

119:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %120 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %.05784
  br label %128

121:                                              ; preds = %138
  %122 = load i64, ptr %120, align 8, !tbaa !8
  %123 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %2, i64 0, i64 %122
  %124 = getelementptr inbounds [100000 x i64], ptr @dp, i64 0, i64 %.057.in83
  %125 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %123, ptr noundef nonnull align 8 dereferenceable(8) %124)
          to label %140 unwind label %148

126:                                              ; preds = %118
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %163

128:                                              ; preds = %119, %138
  %.05078 = phi i64 [ 0, %119 ], [ %139, %138 ]
  %129 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 %.05078
  %130 = load i8, ptr %129, align 1, !tbaa !20, !range !22, !noundef !23
  %131 = trunc nuw i8 %130 to i1
  br i1 %131, label %138, label %132

132:                                              ; preds = %128
  store i8 1, ptr %129, align 1, !tbaa !20
  %133 = load i64, ptr %120, align 8, !tbaa !8
  %134 = xor i64 %133, %.05078
  %135 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 %134
  store i8 1, ptr %135, align 1, !tbaa !20
  %136 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %2, i64 0, i64 %.05078
  %137 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %2, i64 0, i64 %134
  call void @_ZNSt8multisetIxSt4lessIxESaIxEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48) %136, ptr noundef nonnull align 8 dereferenceable(48) %137) #7
  br label %138

138:                                              ; preds = %128, %132
  %139 = add nuw nsw i64 %.05078, 1
  %exitcond.not = icmp eq i64 %139, 32
  br i1 %exitcond.not, label %121, label %128, !llvm.loop !24

140:                                              ; preds = %121
  %141 = load i64, ptr %120, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 1000000000, ptr %5, align 8, !tbaa !8
  br label %150

142:                                              ; preds = %161
  %143 = xor i64 %141, %.159
  %144 = getelementptr inbounds [100000 x i64], ptr @cdp, i64 0, i64 %.05784
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %146 = load i64, ptr %145, align 8, !tbaa !8
  store i64 %146, ptr %144, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  %147 = load i64, ptr %92, align 8, !tbaa !8
  %.not65.not = icmp slt i64 %.05784, %147
  br i1 %.not65.not, label %101, label %._crit_edge87, !llvm.loop !25

148:                                              ; preds = %121
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %163

150:                                              ; preds = %140, %161
  %.079 = phi i64 [ 0, %140 ], [ %162, %161 ]
  %151 = getelementptr inbounds [32 x %"class.std::multiset"], ptr %2, i64 0, i64 %.079
  %152 = call noundef i64 @_ZNKSt8multisetIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %151) #7
  %.not70 = icmp eq i64 %152, 0
  br i1 %.not70, label %161, label %153

153:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %154 = add nsw i64 %.079, -16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %155 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %151) #7
  store ptr %155, ptr %7, align 8
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %157 = load i64, ptr %156, align 8, !tbaa !8
  %158 = add nsw i64 %154, %157
  store i64 %158, ptr %6, align 8, !tbaa !8
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %160 = load i64, ptr %159, align 8, !tbaa !8
  store i64 %160, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %161

161:                                              ; preds = %150, %153
  %162 = add nuw nsw i64 %.079, 1
  %exitcond96.not = icmp eq i64 %162, 32
  br i1 %exitcond96.not, label %142, label %150, !llvm.loop !26

163:                                              ; preds = %148, %126
  %.pn = phi { ptr, i32 } [ %149, %148 ], [ %127, %126 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %166

164:                                              ; preds = %._crit_edge87
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %166

166:                                              ; preds = %116, %163, %164
  %.pn.pn.pn = phi { ptr, i32 } [ %165, %164 ], [ %.pn, %163 ], [ %117, %116 ]
  %167 = getelementptr inbounds i8, ptr %2, i64 1488
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %167) #7
  %168 = getelementptr inbounds i8, ptr %2, i64 1440
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %168) #7
  %169 = getelementptr inbounds i8, ptr %2, i64 1392
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %169) #7
  %170 = getelementptr inbounds i8, ptr %2, i64 1344
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %170) #7
  %171 = getelementptr inbounds i8, ptr %2, i64 1296
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %171) #7
  %172 = getelementptr inbounds i8, ptr %2, i64 1248
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %172) #7
  %173 = getelementptr inbounds i8, ptr %2, i64 1200
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %173) #7
  %174 = getelementptr inbounds i8, ptr %2, i64 1152
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %174) #7
  %175 = getelementptr inbounds i8, ptr %2, i64 1104
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %175) #7
  %176 = getelementptr inbounds i8, ptr %2, i64 1056
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %176) #7
  %177 = getelementptr inbounds i8, ptr %2, i64 1008
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %177) #7
  %178 = getelementptr inbounds i8, ptr %2, i64 960
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %178) #7
  %179 = getelementptr inbounds i8, ptr %2, i64 912
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %179) #7
  %180 = getelementptr inbounds i8, ptr %2, i64 864
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %180) #7
  %181 = getelementptr inbounds i8, ptr %2, i64 816
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %181) #7
  %182 = getelementptr inbounds i8, ptr %2, i64 768
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %182) #7
  %183 = getelementptr inbounds i8, ptr %2, i64 720
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %183) #7
  %184 = getelementptr inbounds i8, ptr %2, i64 672
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %184) #7
  %185 = getelementptr inbounds i8, ptr %2, i64 624
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %185) #7
  %186 = getelementptr inbounds i8, ptr %2, i64 576
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %186) #7
  %187 = getelementptr inbounds i8, ptr %2, i64 528
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %187) #7
  %188 = getelementptr inbounds i8, ptr %2, i64 480
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %188) #7
  %189 = getelementptr inbounds i8, ptr %2, i64 432
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %189) #7
  %190 = getelementptr inbounds i8, ptr %2, i64 384
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %190) #7
  %191 = getelementptr inbounds i8, ptr %2, i64 336
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %191) #7
  %192 = getelementptr inbounds i8, ptr %2, i64 288
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %192) #7
  %193 = getelementptr inbounds i8, ptr %2, i64 240
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %193) #7
  %194 = getelementptr inbounds i8, ptr %2, i64 192
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %194) #7
  %195 = getelementptr inbounds i8, ptr %2, i64 144
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %195) #7
  %196 = getelementptr inbounds i8, ptr %2, i64 96
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %196) #7
  %197 = getelementptr inbounds i8, ptr %2, i64 48
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %197) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 1536, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn.pn

._crit_edge95:                                    ; preds = %._crit_edge91, %0
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8multisetIxSt4lessIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; 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 #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_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 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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