; LLVM IR from abeaumont/competitive-programming :: cses (1110)

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

@h = external dso_local global [2000000 x i64], align 16
@p = external dso_local global [2000000 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 %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %15 = invoke 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) %2)
          to label %16 unwind label %31

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %17 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %5, align 4, !tbaa !5
  %19 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %20 unwind label %35

20:                                               ; preds = %16
  %21 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef 0)
          to label %22 unwind label %35

22:                                               ; preds = %20
  %23 = load i8, ptr %21, align 1, !tbaa !9
  %24 = sext i8 %23 to i64
  store i64 %24, ptr @h, align 16, !tbaa !10
  store i64 1, ptr @p, align 16, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %67, %22
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = mul nsw i32 2, %27
  %29 = icmp slt i32 %26, %28
  br i1 %29, label %39, label %30

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

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %3, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %4, align 4
  br label %272

35:                                               ; preds = %20, %16
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %3, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %4, align 4
  br label %271

39:                                               ; preds = %25
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sub nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !10
  %45 = mul nsw i64 %44, 911382323
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %47)
          to label %49 unwind label %70

49:                                               ; preds = %39
  %50 = load i8, ptr %48, align 1, !tbaa !9
  %51 = sext i8 %50 to i64
  %52 = add nsw i64 %45, %51
  %53 = srem i64 %52, 972663749
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %55
  store i64 %53, ptr %56, align 8, !tbaa !10
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !10
  %62 = mul nsw i64 %61, 911382323
  %63 = srem i64 %62, 972663749
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %65
  store i64 %63, ptr %66, align 8, !tbaa !10
  br label %67

67:                                               ; preds = %49
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %6, align 4, !tbaa !5
  br label %25, !llvm.loop !12

70:                                               ; preds = %39
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %3, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %271

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

75:                                               ; preds = %246, %74
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %80, label %79

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

80:                                               ; preds = %75
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %82)
          to label %84 unwind label %95

84:                                               ; preds = %80
  %85 = load i8, ptr %83, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %88)
          to label %90 unwind label %95

90:                                               ; preds = %84
  %91 = load i8, ptr %89, align 1, !tbaa !9
  %92 = sext i8 %91 to i32
  %93 = icmp slt i32 %86, %92
  br i1 %93, label %94, label %99

94:                                               ; preds = %90
  br label %246

95:                                               ; preds = %103, %99, %84, %80
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %3, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %4, align 4
  br label %249

99:                                               ; preds = %90
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %101)
          to label %103 unwind label %95

103:                                              ; preds = %99
  %104 = load i8, ptr %102, align 1, !tbaa !9
  %105 = sext i8 %104 to i32
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %107)
          to label %109 unwind label %95

109:                                              ; preds = %103
  %110 = load i8, ptr %108, align 1, !tbaa !9
  %111 = sext i8 %110 to i32
  %112 = icmp sgt i32 %105, %111
  br i1 %112, label %113, label %115

113:                                              ; preds = %109
  %114 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %114, ptr %7, align 4, !tbaa !5
  br label %246

115:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = sdiv i32 %116, 2
  store i32 %117, ptr %11, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %207, %115
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = icmp sge i32 %119, 1
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %210

122:                                              ; preds = %118
  br label %123

123:                                              ; preds = %205, %122
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = add nsw i32 %124, %125
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %129, label %206

129:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = add nsw i32 %130, %131
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = add nsw i32 %132, %133
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !10
  %138 = load i32, ptr %8, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !10
  %143 = load i32, ptr %10, align 4, !tbaa !5
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = add nsw i32 %143, %144
  %146 = add nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %147
  %149 = load i64, ptr %148, align 8, !tbaa !10
  %150 = mul nsw i64 %142, %149
  %151 = sub nsw i64 %137, %150
  %152 = srem i64 %151, 972663749
  store i64 %152, ptr %12, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = add nsw i32 %153, %154
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = add nsw i32 %155, %156
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !10
  %161 = load i32, ptr %7, align 4, !tbaa !5
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %177

163:                                              ; preds = %129
  %164 = load i32, ptr %7, align 4, !tbaa !5
  %165 = sub nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !10
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = load i32, ptr %11, align 4, !tbaa !5
  %171 = add nsw i32 %169, %170
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !10
  %176 = mul nsw i64 %168, %175
  br label %178

177:                                              ; preds = %129
  br label %178

178:                                              ; preds = %177, %163
  %179 = phi i64 [ %176, %163 ], [ 0, %177 ]
  %180 = sub nsw i64 %160, %179
  %181 = srem i64 %180, 972663749
  store i64 %181, ptr %13, align 8, !tbaa !10
  %182 = load i64, ptr %12, align 8, !tbaa !10
  %183 = icmp slt i64 %182, 0
  br i1 %183, label %184, label %187

184:                                              ; preds = %178
  %185 = load i64, ptr %12, align 8, !tbaa !10
  %186 = add nsw i64 %185, 972663749
  store i64 %186, ptr %12, align 8, !tbaa !10
  br label %187

187:                                              ; preds = %184, %178
  %188 = load i64, ptr %13, align 8, !tbaa !10
  %189 = icmp slt i64 %188, 0
  br i1 %189, label %190, label %193

190:                                              ; preds = %187
  %191 = load i64, ptr %13, align 8, !tbaa !10
  %192 = add nsw i64 %191, 972663749
  store i64 %192, ptr %13, align 8, !tbaa !10
  br label %193

193:                                              ; preds = %190, %187
  %194 = load i64, ptr %12, align 8, !tbaa !10
  %195 = load i64, ptr %13, align 8, !tbaa !10
  %196 = icmp eq i64 %194, %195
  br i1 %196, label %197, label %201

197:                                              ; preds = %193
  %198 = load i32, ptr %11, align 4, !tbaa !5
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = add nsw i32 %199, %198
  store i32 %200, ptr %10, align 4, !tbaa !5
  br label %202

201:                                              ; preds = %193
  store i32 12, ptr %9, align 4
  br label %203

202:                                              ; preds = %197
  store i32 0, ptr %9, align 4
  br label %203

203:                                              ; preds = %202, %201
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %204 = load i32, ptr %9, align 4
  switch i32 %204, label %278 [
    i32 0, label %205
    i32 12, label %206
  ]

205:                                              ; preds = %203
  br label %123, !llvm.loop !14

206:                                              ; preds = %203, %123
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %11, align 4, !tbaa !5
  %209 = sdiv i32 %208, 2
  store i32 %209, ptr %11, align 4, !tbaa !5
  br label %118, !llvm.loop !15

210:                                              ; preds = %121
  %211 = load i32, ptr %10, align 4, !tbaa !5
  %212 = load i32, ptr %5, align 4, !tbaa !5
  %213 = sub nsw i32 %212, 1
  %214 = icmp eq i32 %211, %213
  br i1 %214, label %215, label %216

215:                                              ; preds = %210
  store i32 7, ptr %9, align 4
  br label %243

216:                                              ; preds = %210
  %217 = load i32, ptr %7, align 4, !tbaa !5
  %218 = load i32, ptr %10, align 4, !tbaa !5
  %219 = add nsw i32 %217, %218
  %220 = add nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %221)
          to label %223 unwind label %238

223:                                              ; preds = %216
  %224 = load i8, ptr %222, align 1, !tbaa !9
  %225 = sext i8 %224 to i32
  %226 = load i32, ptr %8, align 4, !tbaa !5
  %227 = load i32, ptr %10, align 4, !tbaa !5
  %228 = add nsw i32 %226, %227
  %229 = add nsw i32 %228, 1
  %230 = sext i32 %229 to i64
  %231 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %230)
          to label %232 unwind label %238

232:                                              ; preds = %223
  %233 = load i8, ptr %231, align 1, !tbaa !9
  %234 = sext i8 %233 to i32
  %235 = icmp sgt i32 %225, %234
  br i1 %235, label %236, label %242

236:                                              ; preds = %232
  %237 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %237, ptr %7, align 4, !tbaa !5
  br label %242

238:                                              ; preds = %223, %216
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %3, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %249

242:                                              ; preds = %236, %232
  store i32 0, ptr %9, align 4
  br label %243

243:                                              ; preds = %242, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %244 = load i32, ptr %9, align 4
  switch i32 %244, label %278 [
    i32 0, label %245
    i32 7, label %246
  ]

245:                                              ; preds = %243
  br label %246

246:                                              ; preds = %245, %243, %113, %94
  %247 = load i32, ptr %8, align 4, !tbaa !5
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %8, align 4, !tbaa !5
  br label %75, !llvm.loop !16

249:                                              ; preds = %238, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %270

250:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  %251 = load i32, ptr %7, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = load i32, ptr %5, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %252, i64 noundef %254)
          to label %255 unwind label %261

255:                                              ; preds = %250
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %257 unwind label %265

257:                                              ; preds = %255
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %259 unwind label %265

259:                                              ; preds = %257
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %260 = load i32, ptr %1, align 4
  ret i32 %260

261:                                              ; preds = %250
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %3, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %4, align 4
  br label %269

265:                                              ; preds = %257, %255
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %3, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %4, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %269

269:                                              ; preds = %265, %261
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %270

270:                                              ; preds = %269, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %271

271:                                              ; preds = %270, %70, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %272

272:                                              ; preds = %271, %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %3, align 8
  %275 = load i32, ptr %4, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277

278:                                              ; preds = %243, %203
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #4 align 2

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

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

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

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

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


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

@h = external dso_local local_unnamed_addr global [2000000 x i64], align 16
@p = external dso_local local_unnamed_addr global [2000000 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 %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %3 = invoke 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) %1)
          to label %4 unwind label %110

4:                                                ; preds = %0
  %5 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %6 = trunc i64 %5 to i32
  %7 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %8 unwind label %112

8:                                                ; preds = %4
  %9 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef 0)
  %10 = load i8, ptr %9, align 1, !tbaa !5
  %11 = sext i8 %10 to i64
  store i64 %11, ptr @h, align 16, !tbaa !8
  store i64 1, ptr @p, align 16, !tbaa !8
  %12 = icmp sgt i32 %6, 0
  br i1 %12, label %.lr.ph.preheader, label %._crit_edge96

.lr.ph.preheader:                                 ; preds = %8
  %13 = shl nuw i32 %6, 1
  %smax = call i32 @llvm.smax.i32(i32 %13, i32 2)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %.lr.ph

.preheader83:                                     ; preds = %.lr.ph
  %.not = icmp eq i32 %6, 1
  br i1 %.not, label %._crit_edge96, label %.lr.ph95

.lr.ph95:                                         ; preds = %.preheader83
  %.05685111 = lshr i32 %6, 1
  %14 = add nsw i32 %6, -1
  %15 = and i64 %5, 2147483647
  %wide.trip.count123 = and i64 %5, 2147483647
  br label %16

16:                                               ; preds = %72, %.lr.ph95
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %72 ], [ 1, %.lr.ph95 ]
  %.06090.us = phi i32 [ %.363.us, %72 ], [ 0, %.lr.ph95 ]
  %.06090.us.fr = freeze i32 %.06090.us
  %17 = sext i32 %.06090.us.fr to i64
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %17)
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv120)
  %21 = load i8, ptr %20, align 1, !tbaa !5
  %22 = icmp slt i8 %19, %21
  br i1 %22, label %72, label %23

23:                                               ; preds = %16
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %17)
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv120)
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %28 = icmp sgt i8 %25, %27
  %29 = trunc nuw nsw i64 %indvars.iv120 to i32
  br i1 %28, label %72, label %.preheader82.us

30:                                               ; preds = %._crit_edge.us
  %31 = add i32 %.06090.us.fr, 1
  %32 = add i32 %31, %.us-phi89.us
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %33)
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = trunc i64 %indvars.iv120 to i32
  %37 = add i32 %36, 1
  %38 = add i32 %37, %.us-phi89.us
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %39)
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = icmp sgt i8 %35, %41
  %spec.select81.us = select i1 %42, i32 %29, i32 %.06090.us.fr
  br label %72

43:                                               ; preds = %.preheader.us99, %46
  %indvars.iv114 = phi i64 [ %75, %.preheader.us99 ], [ %indvars.iv.next115, %46 ]
  %indvars.iv.next115 = add nsw i64 %indvars.iv114, %76
  %44 = icmp slt i64 %indvars.iv.next115, %15
  %45 = trunc nsw i64 %indvars.iv114 to i32
  br i1 %44, label %46, label %.split.us

46:                                               ; preds = %43
  %47 = add i32 %73, %45
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = load i64, ptr %78, align 8, !tbaa !8
  %52 = add nsw i64 %indvars.iv.next115, 1
  %53 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !8
  %55 = mul nsw i64 %54, %51
  %56 = sub nsw i64 %50, %55
  %57 = srem i64 %56, 972663749
  %58 = add i32 %74, %45
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !8
  %62 = load i64, ptr %81, align 8, !tbaa !8
  %63 = mul nsw i64 %62, %54
  %64 = sub nsw i64 %61, %63
  %65 = srem i64 %64, 972663749
  %66 = icmp slt i64 %57, 0
  %67 = add nsw i64 %57, 972663749
  %spec.select.us = select i1 %66, i64 %67, i64 %57
  %68 = icmp slt i64 %65, 0
  %69 = add nsw i64 %65, 972663749
  %.0.us = select i1 %68, i64 %69, i64 %65
  %70 = icmp eq i64 %spec.select.us, %.0.us
  br i1 %70, label %43, label %.split.us

.split.us:                                        ; preds = %46, %43
  %.056.us98126 = lshr i32 %.05687.us100, 1
  %71 = icmp ugt i32 %.05687.us100, 1
  br i1 %71, label %.preheader.us99, label %._crit_edge.us, !llvm.loop !10

72:                                               ; preds = %30, %._crit_edge.us, %23, %16
  %.363.us = phi i32 [ %.06090.us.fr, %16 ], [ %29, %23 ], [ %spec.select81.us, %30 ], [ %.06090.us.fr, %._crit_edge.us ]
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond124.not = icmp eq i64 %indvars.iv.next121, %wide.trip.count123
  br i1 %exitcond124.not, label %._crit_edge96.loopexit, label %16, !llvm.loop !12

.preheader.us99:                                  ; preds = %.preheader82.us, %.split.us
  %.05687.us100 = phi i32 [ %.056.us98126, %.split.us ], [ %.05685111, %.preheader82.us ]
  %.05786.us101 = phi i64 [ %indvars.iv114, %.split.us ], [ 0, %.preheader82.us ]
  %73 = add i32 %.05687.us100, %29
  %74 = add i32 %.05687.us100, %.06090.us.fr
  %sext125 = shl i64 %.05786.us101, 32
  %75 = ashr exact i64 %sext125, 32
  %76 = zext nneg i32 %.05687.us100 to i64
  br label %43

.preheader82.us:                                  ; preds = %23
  %77 = add nsw i64 %indvars.iv120, -1
  %78 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %77
  %.not.us = icmp eq i32 %.06090.us.fr, 0
  %79 = add nsw i32 %.06090.us.fr, -1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %80
  br i1 %.not.us, label %.preheader.us.us, label %.preheader.us99

._crit_edge.us:                                   ; preds = %.split.us, %.split.us.us.us
  %.us-phi89.us = phi i32 [ %88, %.split.us.us.us ], [ %45, %.split.us ]
  %82 = icmp eq i32 %.us-phi89.us, %14
  br i1 %82, label %72, label %30

.preheader.us.us:                                 ; preds = %.preheader82.us, %.split.us.us.us
  %.05687.us.us = phi i32 [ %.056.us.us128, %.split.us.us.us ], [ %.05685111, %.preheader82.us ]
  %.05786.us.us = phi i64 [ %indvars.iv117, %.split.us.us.us ], [ 0, %.preheader82.us ]
  %83 = add i32 %.05687.us.us, %29
  %sext127 = shl i64 %.05786.us.us, 32
  %84 = ashr exact i64 %sext127, 32
  %85 = zext nneg i32 %.05687.us.us to i64
  br label %86

86:                                               ; preds = %89, %.preheader.us.us
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %89 ], [ %84, %.preheader.us.us ]
  %indvars.iv.next118 = add nsw i64 %indvars.iv117, %85
  %87 = icmp slt i64 %indvars.iv.next118, %15
  %88 = trunc nsw i64 %indvars.iv117 to i32
  br i1 %87, label %89, label %.split.us.us.us

89:                                               ; preds = %86
  %90 = add i32 %83, %88
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !8
  %94 = load i64, ptr %78, align 8, !tbaa !8
  %95 = add nsw i64 %indvars.iv.next118, 1
  %96 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !8
  %98 = mul nsw i64 %97, %94
  %99 = sub nsw i64 %93, %98
  %100 = srem i64 %99, 972663749
  %101 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %indvars.iv.next118
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = srem i64 %102, 972663749
  %104 = icmp slt i64 %100, 0
  %105 = add nsw i64 %100, 972663749
  %spec.select.us.us.us = select i1 %104, i64 %105, i64 %100
  %106 = icmp slt i64 %103, 0
  %107 = add nsw i64 %103, 972663749
  %.0.us.us.us = select i1 %106, i64 %107, i64 %103
  %108 = icmp eq i64 %spec.select.us.us.us, %.0.us.us.us
  br i1 %108, label %86, label %.split.us.us.us

.split.us.us.us:                                  ; preds = %89, %86
  %.056.us.us128 = lshr i32 %.05687.us.us, 1
  %109 = icmp ugt i32 %.05687.us.us, 1
  br i1 %109, label %.preheader.us.us, label %._crit_edge.us, !llvm.loop !10

110:                                              ; preds = %0
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %140

112:                                              ; preds = %4
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %140

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %114 = phi i64 [ %11, %.lr.ph.preheader ], [ %121, %.lr.ph ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %115 = add nsw i64 %indvars.iv, -1
  %116 = mul nsw i64 %114, 911382323
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %118 = load i8, ptr %117, align 1, !tbaa !5
  %119 = sext i8 %118 to i64
  %120 = add nsw i64 %116, %119
  %121 = srem i64 %120, 972663749
  %122 = getelementptr inbounds [2000000 x i64], ptr @h, i64 0, i64 %indvars.iv
  store i64 %121, ptr %122, align 8, !tbaa !8
  %123 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %115
  %124 = load i64, ptr %123, align 8, !tbaa !8
  %125 = mul nsw i64 %124, 911382323
  %126 = srem i64 %125, 972663749
  %127 = getelementptr inbounds [2000000 x i64], ptr @p, i64 0, i64 %indvars.iv
  store i64 %126, ptr %127, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader83, label %.lr.ph, !llvm.loop !13

._crit_edge96.loopexit:                           ; preds = %72
  %128 = sext i32 %.363.us to i64
  br label %._crit_edge96

._crit_edge96:                                    ; preds = %8, %._crit_edge96.loopexit, %.preheader83
  %.060.lcssa = phi i64 [ 0, %.preheader83 ], [ %128, %._crit_edge96.loopexit ], [ 0, %8 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  %sext = shl i64 %5, 32
  %129 = ashr exact i64 %sext, 32
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.060.lcssa, i64 noundef %129)
          to label %130 unwind label %135

130:                                              ; preds = %._crit_edge96
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %132 unwind label %137

132:                                              ; preds = %130
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %134 unwind label %137

134:                                              ; preds = %132
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 0

135:                                              ; preds = %._crit_edge96
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %139

137:                                              ; preds = %132, %130
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %139

139:                                              ; preds = %137, %135
  %.pn = phi { ptr, i32 } [ %138, %137 ], [ %136, %135 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %140

140:                                              ; preds = %112, %139, %110
  %.pn.pn.pn = phi { ptr, i32 } [ %111, %110 ], [ %.pn, %139 ], [ %113, %112 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 nosync nounwind speculatable willreturn memory(none) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass