; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK67/Problem C (C)

; 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::__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" }

@x = external dso_local global [300100 x i64], align 16
@y = external dso_local global [300100 x i64], align 16
@sumlx = external dso_local global [300100 x i64], align 16
@sumrx = external dso_local global [300100 x i64], align 16
@sumly = external dso_local global [300100 x i64], align 16
@sumry = external dso_local global [300100 x i64], align 16
@_Z1sB5cxx11 = 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 i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %28

28:                                               ; preds = %42, %0
  %29 = load i32, ptr %4, align 4, !tbaa !8
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %4, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [300100 x i64], ptr @x, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = load i32, ptr %4, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [300100 x i64], ptr @y, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %40)
  br label %42

42:                                               ; preds = %33
  %43 = load i32, ptr %4, align 4, !tbaa !8
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %4, align 4, !tbaa !8
  br label %28, !llvm.loop !11

45:                                               ; preds = %32
  %46 = load i32, ptr %2, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i64, ptr @x, i64 %47
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @x, ptr noundef %48)
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i64, ptr @y, i64 %50
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @y, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %78, %45
  %53 = load i32, ptr %5, align 4, !tbaa !8
  %54 = load i32, ptr %2, align 4, !tbaa !8
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

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

57:                                               ; preds = %52
  %58 = load i32, ptr %5, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [300100 x i64], ptr @x, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = load i32, ptr %5, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %63
  store i64 %61, ptr %64, align 8, !tbaa !13
  %65 = load i32, ptr %5, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %66
  store i64 %61, ptr %67, align 8, !tbaa !13
  %68 = load i32, ptr %5, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [300100 x i64], ptr @y, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !13
  %72 = load i32, ptr %5, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %73
  store i64 %71, ptr %74, align 8, !tbaa !13
  %75 = load i32, ptr %5, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %76
  store i64 %71, ptr %77, align 8, !tbaa !13
  br label %78

78:                                               ; preds = %57
  %79 = load i32, ptr %5, align 4, !tbaa !8
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !8
  br label %52, !llvm.loop !15

81:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %82

82:                                               ; preds = %108, %81
  %83 = load i32, ptr %6, align 4, !tbaa !8
  %84 = load i32, ptr %2, align 4, !tbaa !8
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %111

87:                                               ; preds = %82
  %88 = load i32, ptr %6, align 4, !tbaa !8
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !13
  %93 = load i32, ptr %6, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !13
  %97 = add nsw i64 %96, %92
  store i64 %97, ptr %95, align 8, !tbaa !13
  %98 = load i32, ptr %6, align 4, !tbaa !8
  %99 = sub nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !13
  %103 = load i32, ptr %6, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !13
  %107 = add nsw i64 %106, %102
  store i64 %107, ptr %105, align 8, !tbaa !13
  br label %108

108:                                              ; preds = %87
  %109 = load i32, ptr %6, align 4, !tbaa !8
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !8
  br label %82, !llvm.loop !16

111:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %112 = load i32, ptr %2, align 4, !tbaa !8
  %113 = sub nsw i32 %112, 2
  store i32 %113, ptr %7, align 4, !tbaa !8
  br label %114

114:                                              ; preds = %139, %111
  %115 = load i32, ptr %7, align 4, !tbaa !8
  %116 = icmp sge i32 %115, 0
  br i1 %116, label %118, label %117

117:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %142

118:                                              ; preds = %114
  %119 = load i32, ptr %7, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !13
  %124 = load i32, ptr %7, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !13
  %128 = add nsw i64 %127, %123
  store i64 %128, ptr %126, align 8, !tbaa !13
  %129 = load i32, ptr %7, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !13
  %134 = load i32, ptr %7, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !13
  %138 = add nsw i64 %137, %133
  store i64 %138, ptr %136, align 8, !tbaa !13
  br label %139

139:                                              ; preds = %118
  %140 = load i32, ptr %7, align 4, !tbaa !8
  %141 = add nsw i32 %140, -1
  store i32 %141, ptr %7, align 4, !tbaa !8
  br label %114, !llvm.loop !17

142:                                              ; preds = %117
  %143 = 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) @_Z1sB5cxx11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %144

144:                                              ; preds = %264, %142
  %145 = load i32, ptr %10, align 4, !tbaa !8
  %146 = load i32, ptr %3, align 4, !tbaa !8
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

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

149:                                              ; preds = %144
  %150 = load i32, ptr %10, align 4, !tbaa !8
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %151)
  %153 = load i8, ptr %152, align 1, !tbaa !18
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 68
  br i1 %155, label %156, label %159

156:                                              ; preds = %149
  %157 = load i64, ptr %9, align 8, !tbaa !13
  %158 = add nsw i64 %157, -1
  store i64 %158, ptr %9, align 8, !tbaa !13
  br label %184

159:                                              ; preds = %149
  %160 = load i32, ptr %10, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %161)
  %163 = load i8, ptr %162, align 1, !tbaa !18
  %164 = sext i8 %163 to i32
  %165 = icmp eq i32 %164, 85
  br i1 %165, label %166, label %169

166:                                              ; preds = %159
  %167 = load i64, ptr %9, align 8, !tbaa !13
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %9, align 8, !tbaa !13
  br label %183

169:                                              ; preds = %159
  %170 = load i32, ptr %10, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %171)
  %173 = load i8, ptr %172, align 1, !tbaa !18
  %174 = sext i8 %173 to i32
  %175 = icmp eq i32 %174, 76
  br i1 %175, label %176, label %179

176:                                              ; preds = %169
  %177 = load i64, ptr %8, align 8, !tbaa !13
  %178 = add nsw i64 %177, -1
  store i64 %178, ptr %8, align 8, !tbaa !13
  br label %182

179:                                              ; preds = %169
  %180 = load i64, ptr %8, align 8, !tbaa !13
  %181 = add nsw i64 %180, 1
  store i64 %181, ptr %8, align 8, !tbaa !13
  br label %182

182:                                              ; preds = %179, %176
  br label %183

183:                                              ; preds = %182, %166
  br label %184

184:                                              ; preds = %183, %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %185 = load i32, ptr %2, align 4, !tbaa !8
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i64, ptr @x, i64 %186
  %188 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef @x, ptr noundef %187, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %189 = ptrtoint ptr %188 to i64
  %190 = sub i64 %189, ptrtoint (ptr @x to i64)
  %191 = sdiv exact i64 %190, 8
  %192 = trunc i64 %191 to i32
  store i32 %192, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %193 = load i32, ptr %2, align 4, !tbaa !8
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i64, ptr @y, i64 %194
  %196 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef @y, ptr noundef %195, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %197 = ptrtoint ptr %196 to i64
  %198 = sub i64 %197, ptrtoint (ptr @y to i64)
  %199 = sdiv exact i64 %198, 8
  %200 = trunc i64 %199 to i32
  store i32 %200, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %201 = load i32, ptr %11, align 4, !tbaa !8
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %202
  %204 = load i64, ptr %203, align 8, !tbaa !13
  %205 = load i64, ptr %8, align 8, !tbaa !13
  %206 = load i32, ptr %2, align 4, !tbaa !8
  %207 = load i32, ptr %11, align 4, !tbaa !8
  %208 = sub nsw i32 %206, %207
  %209 = sext i32 %208 to i64
  %210 = mul nsw i64 %205, %209
  %211 = sub nsw i64 %204, %210
  %212 = load i32, ptr %11, align 4, !tbaa !8
  %213 = sub nsw i32 %212, 1
  %214 = icmp sge i32 %213, 0
  br i1 %214, label %215, label %226

215:                                              ; preds = %184
  %216 = load i64, ptr %8, align 8, !tbaa !13
  %217 = load i32, ptr %11, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = mul nsw i64 %216, %218
  %220 = load i32, ptr %11, align 4, !tbaa !8
  %221 = sub nsw i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %222
  %224 = load i64, ptr %223, align 8, !tbaa !13
  %225 = sub nsw i64 %219, %224
  br label %227

226:                                              ; preds = %184
  br label %227

227:                                              ; preds = %226, %215
  %228 = phi i64 [ %225, %215 ], [ 0, %226 ]
  %229 = add nsw i64 %211, %228
  store i64 %229, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %230 = load i32, ptr %12, align 4, !tbaa !8
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %231
  %233 = load i64, ptr %232, align 8, !tbaa !13
  %234 = load i64, ptr %9, align 8, !tbaa !13
  %235 = load i32, ptr %2, align 4, !tbaa !8
  %236 = load i32, ptr %12, align 4, !tbaa !8
  %237 = sub nsw i32 %235, %236
  %238 = sext i32 %237 to i64
  %239 = mul nsw i64 %234, %238
  %240 = sub nsw i64 %233, %239
  %241 = load i32, ptr %12, align 4, !tbaa !8
  %242 = sub nsw i32 %241, 1
  %243 = icmp sge i32 %242, 0
  br i1 %243, label %244, label %255

244:                                              ; preds = %227
  %245 = load i64, ptr %9, align 8, !tbaa !13
  %246 = load i32, ptr %12, align 4, !tbaa !8
  %247 = sext i32 %246 to i64
  %248 = mul nsw i64 %245, %247
  %249 = load i32, ptr %12, align 4, !tbaa !8
  %250 = sub nsw i32 %249, 1
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %251
  %253 = load i64, ptr %252, align 8, !tbaa !13
  %254 = sub nsw i64 %248, %253
  br label %256

255:                                              ; preds = %227
  br label %256

256:                                              ; preds = %255, %244
  %257 = phi i64 [ %254, %244 ], [ 0, %255 ]
  %258 = add nsw i64 %240, %257
  store i64 %258, ptr %14, align 8, !tbaa !13
  %259 = load i64, ptr %13, align 8, !tbaa !13
  %260 = load i64, ptr %14, align 8, !tbaa !13
  %261 = add nsw i64 %259, %260
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %261)
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %262, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %264

264:                                              ; preds = %256
  %265 = load i32, ptr %10, align 4, !tbaa !8
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %10, align 4, !tbaa !8
  br label %144, !llvm.loop !19

267:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #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 @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; 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)) #4 align 2

; 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 @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #5

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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

; 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) #4 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !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::__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" }

@x = external dso_local global [300100 x i64], align 16
@y = external dso_local global [300100 x i64], align 16
@sumlx = external dso_local local_unnamed_addr global [300100 x i64], align 16
@sumrx = external dso_local local_unnamed_addr global [300100 x i64], align 16
@sumly = external dso_local local_unnamed_addr global [300100 x i64], align 16
@sumry = external dso_local local_unnamed_addr global [300100 x i64], align 16
@_Z1sB5cxx11 = 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 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %18 = load i32, ptr %1, align 4, !tbaa !8
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre82 = sext i32 %18 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre82, %.._crit_edge_crit_edge ], [ %31, %.lr.ph ]
  %20 = getelementptr inbounds i64, ptr @x, i64 %.pre-phi
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @x, ptr noundef nonnull %20)
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i64, ptr @y, i64 %22
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @y, ptr noundef nonnull %23)
  %24 = load i32, ptr %1, align 4, !tbaa !8
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.preheader, label %._crit_edge63

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %26 = getelementptr inbounds [300100 x i64], ptr @x, i64 0, i64 %indvars.iv
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = getelementptr inbounds [300100 x i64], ptr @y, i64 0, i64 %indvars.iv
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i32, ptr %1, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %._crit_edge
  %33 = zext nneg i32 %24 to i64
  %34 = shl nuw nsw i64 %33, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @sumrx, ptr nonnull align 16 @x, i64 %34, i1 false), !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @sumlx, ptr nonnull align 16 @x, i64 %34, i1 false), !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @sumry, ptr nonnull align 16 @y, i64 %34, i1 false), !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @sumly, ptr nonnull align 16 @y, i64 %34, i1 false), !tbaa !13
  %.not = icmp eq i32 %24, 1
  br i1 %.not, label %._crit_edge63, label %.lr.ph58.preheader

.lr.ph58.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %24 to i64
  %.pre = load i64, ptr @sumlx, align 16, !tbaa !13
  %.pre81 = load i64, ptr @sumly, align 16, !tbaa !13
  %35 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %35, 1
  %36 = icmp eq i32 %24, 2
  br i1 %36, label %._crit_edge59.unr-lcssa, label %.lr.ph58.preheader.new

.lr.ph58.preheader.new:                           ; preds = %.lr.ph58.preheader
  %unroll_iter = and i64 %35, -2
  br label %.lr.ph58

._crit_edge59.unr-lcssa:                          ; preds = %.lr.ph58, %.lr.ph58.preheader
  %.unr = phi i64 [ %.pre81, %.lr.ph58.preheader ], [ %68, %.lr.ph58 ]
  %.unr87 = phi i64 [ %.pre, %.lr.ph58.preheader ], [ %65, %.lr.ph58 ]
  %indvars.iv72.unr = phi i64 [ 1, %.lr.ph58.preheader ], [ %indvars.iv.next73.1, %.lr.ph58 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge59, label %.lr.ph58.epil

.lr.ph58.epil:                                    ; preds = %._crit_edge59.unr-lcssa
  %37 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %indvars.iv72.unr
  %38 = load i64, ptr %37, align 8, !tbaa !13
  %39 = add nsw i64 %38, %.unr87
  store i64 %39, ptr %37, align 8, !tbaa !13
  %40 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %indvars.iv72.unr
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = add nsw i64 %41, %.unr
  store i64 %42, ptr %40, align 8, !tbaa !13
  br label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge59.unr-lcssa, %.lr.ph58.epil
  br i1 %.not, label %._crit_edge63, label %.lr.ph62.preheader

.lr.ph62.preheader:                               ; preds = %._crit_edge59
  %43 = add nsw i32 %24, -2
  %44 = zext i32 %43 to i64
  %45 = shl nuw nsw i64 %44, 3
  %46 = add nuw nsw i64 %45, 8
  %scevgep = getelementptr i8, ptr @sumry, i64 %46
  %load_initial = load i64, ptr %scevgep, align 8
  %scevgep84 = getelementptr i8, ptr @sumrx, i64 %46
  %load_initial85 = load i64, ptr %scevgep84, align 8
  %47 = and i64 %44, 1
  %lcmp.mod89.not.not = icmp eq i64 %47, 0
  br i1 %lcmp.mod89.not.not, label %.lr.ph62.prol, label %.lr.ph62.prol.loopexit

.lr.ph62.prol:                                    ; preds = %.lr.ph62.preheader
  %48 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %44
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = add nsw i64 %49, %load_initial85
  store i64 %50, ptr %48, align 8, !tbaa !13
  %51 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %44
  %52 = load i64, ptr %51, align 8, !tbaa !13
  %53 = add nsw i64 %52, %load_initial
  store i64 %53, ptr %51, align 8, !tbaa !13
  %indvars.iv.next76.prol = add nsw i64 %44, -1
  br label %.lr.ph62.prol.loopexit

.lr.ph62.prol.loopexit:                           ; preds = %.lr.ph62.prol, %.lr.ph62.preheader
  %store_forwarded86.unr = phi i64 [ %load_initial85, %.lr.ph62.preheader ], [ %50, %.lr.ph62.prol ]
  %store_forwarded.unr = phi i64 [ %load_initial, %.lr.ph62.preheader ], [ %53, %.lr.ph62.prol ]
  %indvars.iv75.unr = phi i64 [ %44, %.lr.ph62.preheader ], [ %indvars.iv.next76.prol, %.lr.ph62.prol ]
  %54 = icmp eq i32 %43, 0
  br i1 %54, label %._crit_edge63, label %.lr.ph62

.lr.ph58:                                         ; preds = %.lr.ph58, %.lr.ph58.preheader.new
  %55 = phi i64 [ %.pre81, %.lr.ph58.preheader.new ], [ %68, %.lr.ph58 ]
  %56 = phi i64 [ %.pre, %.lr.ph58.preheader.new ], [ %65, %.lr.ph58 ]
  %indvars.iv72 = phi i64 [ 1, %.lr.ph58.preheader.new ], [ %indvars.iv.next73.1, %.lr.ph58 ]
  %niter = phi i64 [ 0, %.lr.ph58.preheader.new ], [ %niter.next.1, %.lr.ph58 ]
  %57 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %indvars.iv72
  %58 = load i64, ptr %57, align 8, !tbaa !13
  %59 = add nsw i64 %58, %56
  store i64 %59, ptr %57, align 8, !tbaa !13
  %60 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %indvars.iv72
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = add nsw i64 %61, %55
  store i64 %62, ptr %60, align 8, !tbaa !13
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %63 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %indvars.iv.next73
  %64 = load i64, ptr %63, align 8, !tbaa !13
  %65 = add nsw i64 %64, %59
  store i64 %65, ptr %63, align 8, !tbaa !13
  %66 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %indvars.iv.next73
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = add nsw i64 %67, %62
  store i64 %68, ptr %66, align 8, !tbaa !13
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge59.unr-lcssa, label %.lr.ph58, !llvm.loop !15

._crit_edge63:                                    ; preds = %.lr.ph62.prol.loopexit, %.lr.ph62, %._crit_edge, %.preheader, %._crit_edge59
  %69 = 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) @_Z1sB5cxx11)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr %4, align 8, !tbaa !13
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %.lr.ph66, label %._crit_edge67

.lr.ph62:                                         ; preds = %.lr.ph62.prol.loopexit, %.lr.ph62
  %store_forwarded86 = phi i64 [ %80, %.lr.ph62 ], [ %store_forwarded86.unr, %.lr.ph62.prol.loopexit ]
  %store_forwarded = phi i64 [ %83, %.lr.ph62 ], [ %store_forwarded.unr, %.lr.ph62.prol.loopexit ]
  %indvars.iv75 = phi i64 [ %indvars.iv.next76.1, %.lr.ph62 ], [ %indvars.iv75.unr, %.lr.ph62.prol.loopexit ]
  %72 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %indvars.iv75
  %73 = load i64, ptr %72, align 8, !tbaa !13
  %74 = add nsw i64 %73, %store_forwarded86
  store i64 %74, ptr %72, align 8, !tbaa !13
  %75 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %indvars.iv75
  %76 = load i64, ptr %75, align 8, !tbaa !13
  %77 = add nsw i64 %76, %store_forwarded
  store i64 %77, ptr %75, align 8, !tbaa !13
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, -1
  %78 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %indvars.iv.next76
  %79 = load i64, ptr %78, align 8, !tbaa !13
  %80 = add nsw i64 %79, %74
  store i64 %80, ptr %78, align 8, !tbaa !13
  %81 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %indvars.iv.next76
  %82 = load i64, ptr %81, align 8, !tbaa !13
  %83 = add nsw i64 %82, %77
  store i64 %83, ptr %81, align 8, !tbaa !13
  %indvars.iv.next76.1 = add nsw i64 %indvars.iv75, -2
  %.not83.1 = icmp eq i64 %indvars.iv.next76, 0
  br i1 %.not83.1, label %._crit_edge63, label %.lr.ph62, !llvm.loop !16

._crit_edge67:                                    ; preds = %154, %._crit_edge63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph66:                                         ; preds = %._crit_edge63, %154
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %154 ], [ 0, %._crit_edge63 ]
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv78)
  %85 = load i8, ptr %84, align 1, !tbaa !17
  %86 = icmp eq i8 %85, 68
  br i1 %86, label %87, label %90

87:                                               ; preds = %.lr.ph66
  %88 = load i64, ptr %4, align 8, !tbaa !13
  %89 = add nsw i64 %88, -1
  store i64 %89, ptr %4, align 8, !tbaa !13
  br label %106

90:                                               ; preds = %.lr.ph66
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv78)
  %92 = load i8, ptr %91, align 1, !tbaa !17
  %93 = icmp eq i8 %92, 85
  br i1 %93, label %94, label %97

94:                                               ; preds = %90
  %95 = load i64, ptr %4, align 8, !tbaa !13
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %4, align 8, !tbaa !13
  br label %106

97:                                               ; preds = %90
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv78)
  %99 = load i8, ptr %98, align 1, !tbaa !17
  %100 = icmp eq i8 %99, 76
  %101 = load i64, ptr %3, align 8, !tbaa !13
  br i1 %100, label %102, label %104

102:                                              ; preds = %97
  %103 = add nsw i64 %101, -1
  store i64 %103, ptr %3, align 8, !tbaa !13
  br label %106

104:                                              ; preds = %97
  %105 = add nsw i64 %101, 1
  store i64 %105, ptr %3, align 8, !tbaa !13
  br label %106

106:                                              ; preds = %94, %104, %102, %87
  %107 = load i32, ptr %1, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i64, ptr @x, i64 %108
  %110 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @x, ptr noundef nonnull %109, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %111 = ptrtoint ptr %110 to i64
  %112 = sub i64 %111, ptrtoint (ptr @x to i64)
  %113 = lshr exact i64 %112, 3
  %114 = trunc i64 %113 to i32
  %115 = load i32, ptr %1, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i64, ptr @y, i64 %116
  %118 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @y, ptr noundef nonnull %117, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %119 = ptrtoint ptr %118 to i64
  %120 = sub i64 %119, ptrtoint (ptr @y to i64)
  %121 = lshr exact i64 %120, 3
  %122 = trunc i64 %121 to i32
  %sext = shl i64 %112, 29
  %123 = ashr i64 %sext, 32
  %124 = getelementptr inbounds [300100 x i64], ptr @sumrx, i64 0, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !13
  %126 = load i64, ptr %3, align 8, !tbaa !13
  %127 = load i32, ptr %1, align 4, !tbaa !8
  %128 = sub nsw i32 %127, %114
  %129 = sext i32 %128 to i64
  %.neg = mul i64 %126, %129
  %130 = icmp sgt i32 %114, 0
  br i1 %130, label %131, label %138

131:                                              ; preds = %106
  %132 = add nuw nsw i64 %113, 4294967295
  %133 = mul nsw i64 %126, %123
  %134 = and i64 %132, 4294967295
  %135 = getelementptr inbounds [300100 x i64], ptr @sumlx, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !13
  %137 = sub nsw i64 %133, %136
  br label %138

138:                                              ; preds = %106, %131
  %139 = phi i64 [ %137, %131 ], [ 0, %106 ]
  %sext49 = shl i64 %120, 29
  %140 = ashr i64 %sext49, 32
  %141 = getelementptr inbounds [300100 x i64], ptr @sumry, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !13
  %143 = load i64, ptr %4, align 8, !tbaa !13
  %144 = sub nsw i32 %127, %122
  %145 = sext i32 %144 to i64
  %.neg50 = mul i64 %143, %145
  %146 = icmp sgt i32 %122, 0
  br i1 %146, label %147, label %154

147:                                              ; preds = %138
  %148 = add nuw nsw i64 %121, 4294967295
  %149 = mul nsw i64 %143, %140
  %150 = and i64 %148, 4294967295
  %151 = getelementptr inbounds [300100 x i64], ptr @sumly, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !13
  %153 = sub nsw i64 %149, %152
  br label %154

154:                                              ; preds = %138, %147
  %155 = phi i64 [ %153, %147 ], [ 0, %138 ]
  %reass.add = add i64 %.neg50, %.neg
  %156 = add i64 %139, %125
  %157 = add i64 %156, %142
  %158 = sub i64 %157, %reass.add
  %159 = add i64 %158, %155
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %159)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %160, i8 noundef signext 10)
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %162 = load i32, ptr %2, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = icmp slt i64 %indvars.iv.next79, %163
  br i1 %164, label %.lr.ph66, label %._crit_edge67, !llvm.loop !18
}

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

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

; Function Attrs: mustprogress 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 @_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 nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress 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 @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

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: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

; 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 #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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


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