; LLVM IR from kazunetakahashi/atcoder :: 2017/1111_ARC085 (E)

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

%"class.std::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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_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 i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %27 = 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)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #7
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #7
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %30, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %31 unwind label %37

31:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %47, %31
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %41, label %36

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

37:                                               ; preds = %0
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %253

41:                                               ; preds = %32
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %43) #7
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %46 unwind label %50

46:                                               ; preds = %41
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %8, align 4, !tbaa !5
  br label %32, !llvm.loop !11

50:                                               ; preds = %41
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %252

54:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %55 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %55, ptr %9, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %104, %54
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = sdiv i32 %58, 3
  %60 = icmp sgt i32 %57, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %107

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %79, %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = mul nsw i32 %64, %65
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = icmp sle i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %63
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %82

70:                                               ; preds = %63
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = mul nsw i32 %71, %72
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %74) #7
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = load i64, ptr %11, align 8, !tbaa !9
  %78 = add nsw i64 %77, %76
  store i64 %78, ptr %11, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %70
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %12, align 4, !tbaa !5
  br label %63, !llvm.loop !13

82:                                               ; preds = %69
  %83 = load i64, ptr %11, align 8, !tbaa !9
  %84 = icmp slt i64 %83, 0
  br i1 %84, label %85, label %103

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %99, %85
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = mul nsw i32 %87, %88
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %86
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %102

93:                                               ; preds = %86
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !5
  %96 = mul nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %97) #7
  store i64 0, ptr %98, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %93
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %13, align 4, !tbaa !5
  br label %86, !llvm.loop !14

102:                                              ; preds = %92
  br label %103

103:                                              ; preds = %102, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %9, align 4, !tbaa !5
  br label %56, !llvm.loop !15

107:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = sdiv i32 %108, 6
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %232, %107
  %112 = load i32, ptr %16, align 4, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !5
  %114 = shl i32 1, %113
  %115 = icmp slt i32 %112, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %111
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %240

117:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %118 unwind label %124

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %155, %118
  %120 = load i32, ptr %18, align 4, !tbaa !5
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %128, label %123

123:                                              ; preds = %119
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %158

124:                                              ; preds = %117
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %6, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %7, align 4
  br label %239

128:                                              ; preds = %119
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = load i32, ptr %18, align 4, !tbaa !5
  %131 = ashr i32 %129, %130
  %132 = and i32 %131, 1
  %133 = icmp eq i32 %132, 1
  br i1 %133, label %134, label %154

134:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %150, %134
  %138 = load i32, ptr %19, align 4, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !5
  %140 = mul nsw i32 %138, %139
  %141 = load i32, ptr %2, align 4, !tbaa !5
  %142 = icmp sle i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %137
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %153

144:                                              ; preds = %137
  %145 = load i32, ptr %19, align 4, !tbaa !5
  %146 = load i32, ptr %20, align 4, !tbaa !5
  %147 = mul nsw i32 %145, %146
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %148) #7
  store i64 0, ptr %149, align 8, !tbaa !9
  br label %150

150:                                              ; preds = %144
  %151 = load i32, ptr %20, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %20, align 4, !tbaa !5
  br label %137, !llvm.loop !16

153:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %154

154:                                              ; preds = %153, %128
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %18, align 4, !tbaa !5
  br label %119, !llvm.loop !17

158:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %159 = load i32, ptr %2, align 4, !tbaa !5
  %160 = sdiv i32 %159, 3
  store i32 %160, ptr %21, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %209, %158
  %162 = load i32, ptr %21, align 4, !tbaa !5
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  %165 = icmp sge i32 %162, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %161
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %212

167:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %184, %167
  %169 = load i32, ptr %23, align 4, !tbaa !5
  %170 = load i32, ptr %21, align 4, !tbaa !5
  %171 = mul nsw i32 %169, %170
  %172 = load i32, ptr %2, align 4, !tbaa !5
  %173 = icmp sle i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %168
  store i32 26, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %187

175:                                              ; preds = %168
  %176 = load i32, ptr %23, align 4, !tbaa !5
  %177 = load i32, ptr %21, align 4, !tbaa !5
  %178 = mul nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %179) #7
  %181 = load i64, ptr %180, align 8, !tbaa !9
  %182 = load i64, ptr %22, align 8, !tbaa !9
  %183 = add nsw i64 %182, %181
  store i64 %183, ptr %22, align 8, !tbaa !9
  br label %184

184:                                              ; preds = %175
  %185 = load i32, ptr %23, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %23, align 4, !tbaa !5
  br label %168, !llvm.loop !18

187:                                              ; preds = %174
  %188 = load i64, ptr %22, align 8, !tbaa !9
  %189 = icmp slt i64 %188, 0
  br i1 %189, label %190, label %208

190:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %204, %190
  %192 = load i32, ptr %24, align 4, !tbaa !5
  %193 = load i32, ptr %21, align 4, !tbaa !5
  %194 = mul nsw i32 %192, %193
  %195 = load i32, ptr %2, align 4, !tbaa !5
  %196 = icmp sle i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %191
  store i32 29, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %207

198:                                              ; preds = %191
  %199 = load i32, ptr %24, align 4, !tbaa !5
  %200 = load i32, ptr %21, align 4, !tbaa !5
  %201 = mul nsw i32 %199, %200
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %202) #7
  store i64 0, ptr %203, align 8, !tbaa !9
  br label %204

204:                                              ; preds = %198
  %205 = load i32, ptr %24, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %24, align 4, !tbaa !5
  br label %191, !llvm.loop !19

207:                                              ; preds = %197
  br label %208

208:                                              ; preds = %207, %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %21, align 4, !tbaa !5
  %211 = add nsw i32 %210, -1
  store i32 %211, ptr %21, align 4, !tbaa !5
  br label %161, !llvm.loop !20

212:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %225, %212
  %214 = load i32, ptr %26, align 4, !tbaa !5
  %215 = load i32, ptr %2, align 4, !tbaa !5
  %216 = icmp sle i32 %214, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  store i32 32, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %228

218:                                              ; preds = %213
  %219 = load i32, ptr %26, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %220) #7
  %222 = load i64, ptr %221, align 8, !tbaa !9
  %223 = load i64, ptr %25, align 8, !tbaa !9
  %224 = add nsw i64 %223, %222
  store i64 %224, ptr %25, align 8, !tbaa !9
  br label %225

225:                                              ; preds = %218
  %226 = load i32, ptr %26, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %26, align 4, !tbaa !5
  br label %213, !llvm.loop !21

228:                                              ; preds = %217
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %230 unwind label %235

230:                                              ; preds = %228
  %231 = load i64, ptr %229, align 8, !tbaa !9
  store i64 %231, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %232

232:                                              ; preds = %230
  %233 = load i32, ptr %16, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %16, align 4, !tbaa !5
  br label %111, !llvm.loop !22

235:                                              ; preds = %228
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %6, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  br label %239

239:                                              ; preds = %235, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %251

240:                                              ; preds = %116
  %241 = load i64, ptr %15, align 8, !tbaa !9
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %241)
          to label %243 unwind label %247

243:                                              ; preds = %240
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %242, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %245 unwind label %247

245:                                              ; preds = %243
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %246 = load i32, ptr %1, align 4
  ret i32 %246

247:                                              ; preds = %243, %240
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %6, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %7, align 4
  br label %251

251:                                              ; preds = %247, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %252

252:                                              ; preds = %251, %50
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %253

253:                                              ; preds = %252, %37
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %254

254:                                              ; preds = %253
  %255 = load ptr, ptr %6, align 8
  %256 = load i32, ptr %7, align 4
  %257 = insertvalue { ptr, i32 } poison, ptr %255, 0
  %258 = insertvalue { ptr, i32 } %257, i32 %256, 1
  resume { ptr, i32 } %258
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

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

; 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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_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 i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %8 = 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)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = add nsw i32 %9, 1
  %11 = sext i32 %10 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %12 unwind label %16

12:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %13 = load i32, ptr %1, align 4
  %.not96 = icmp slt i32 %13, 1
  br i1 %.not96, label %._crit_edge108, label %.lr.ph

.preheader93:                                     ; preds = %20
  %14 = icmp sgt i32 %21, 0
  br i1 %14, label %.preheader92.preheader, label %._crit_edge108

.preheader92.preheader:                           ; preds = %.preheader93
  %15 = zext nneg i32 %21 to i64
  br label %.preheader92

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %100

.lr.ph:                                           ; preds = %12, %20
  %indvars.iv = phi i64 [ %indvars.iv.next, %20 ], [ 1, %12 ]
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #8
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %20 unwind label %23

20:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %1, align 4
  %22 = sext i32 %21 to i64
  %.not.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not.not, label %.lr.ph, label %.preheader93, !llvm.loop !11

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %99

.preheader92:                                     ; preds = %.preheader92.preheader, %.loopexit91
  %25 = phi i32 [ %21, %.preheader92.preheader ], [ %45, %.loopexit91 ]
  %indvars.iv152 = phi i64 [ %15, %.preheader92.preheader ], [ %indvars.iv.next153, %.loopexit91 ]
  %26 = sext i32 %25 to i64
  %.not8298 = icmp sgt i64 %indvars.iv152, %26
  br i1 %.not8298, label %.loopexit91, label %.lr.ph101

._crit_edge108:                                   ; preds = %.loopexit91, %12, %.preheader93
  %.lcssa = phi i32 [ %21, %.preheader93 ], [ %13, %12 ], [ %45, %.loopexit91 ]
  %27 = sdiv i32 %.lcssa, 6
  %28 = add nsw i32 %27, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store i64 0, ptr %5, align 8, !tbaa !9
  %.not = icmp eq i32 %28, 31
  br i1 %.not, label %._crit_edge139, label %.lr.ph138

.lr.ph138:                                        ; preds = %._crit_edge108
  %29 = shl nuw i32 1, %28
  %.not75114 = icmp slt i32 %.lcssa, -5
  %30 = add nsw i32 %27, 2
  %31 = sext i32 %30 to i64
  %smax = call i32 @llvm.smax.i32(i32 %29, i32 1)
  %wide.trip.count = zext i32 %28 to i64
  br label %51

._crit_edge:                                      ; preds = %.lr.ph101
  %32 = icmp sgt i64 %36, -1
  %.not83103 = icmp sgt i64 %indvars.iv152, %39
  %or.cond = or i1 %32, %.not83103
  br i1 %or.cond, label %.loopexit91, label %.lr.ph105

.lr.ph101:                                        ; preds = %.preheader92, %.lr.ph101
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph101 ], [ 1, %.preheader92 ]
  %.06499 = phi i64 [ %36, %.lr.ph101 ], [ 0, %.preheader92 ]
  %33 = mul nsw i64 %indvars.iv146, %indvars.iv152
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %33) #8
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = add nsw i64 %35, %.06499
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %37 = mul nsw i64 %indvars.iv.next147, %indvars.iv152
  %38 = load i32, ptr %1, align 4
  %39 = sext i32 %38 to i64
  %.not82 = icmp sgt i64 %37, %39
  br i1 %.not82, label %._crit_edge, label %.lr.ph101, !llvm.loop !13

.lr.ph105:                                        ; preds = %._crit_edge, %.lr.ph105
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %.lr.ph105 ], [ 1, %._crit_edge ]
  %40 = mul nsw i64 %indvars.iv149, %indvars.iv152
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %40) #8
  store i64 0, ptr %41, align 8, !tbaa !9
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %42 = mul nsw i64 %indvars.iv.next150, %indvars.iv152
  %43 = load i32, ptr %1, align 4
  %44 = sext i32 %43 to i64
  %.not83 = icmp sgt i64 %42, %44
  br i1 %.not83, label %.loopexit91, label %.lr.ph105, !llvm.loop !14

.loopexit91:                                      ; preds = %.lr.ph105, %.preheader92, %._crit_edge
  %45 = phi i32 [ %38, %._crit_edge ], [ %25, %.preheader92 ], [ %43, %.lr.ph105 ]
  %indvars.iv.next153 = add nsw i64 %indvars.iv152, -1
  %46 = sdiv i32 %45, 3
  %47 = sext i32 %46 to i64
  %48 = icmp sgt i64 %indvars.iv.next153, %47
  br i1 %48, label %.preheader92, label %._crit_edge108, !llvm.loop !15

._crit_edge139.loopexit:                          ; preds = %._crit_edge135
  %.pre = load i64, ptr %5, align 8, !tbaa !9
  br label %._crit_edge139

._crit_edge139:                                   ; preds = %._crit_edge139.loopexit, %._crit_edge108
  %49 = phi i64 [ %.pre, %._crit_edge139.loopexit ], [ 0, %._crit_edge108 ]
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %49)
          to label %93 unwind label %96

51:                                               ; preds = %.lr.ph138, %._crit_edge135
  %.058136 = phi i32 [ 0, %.lr.ph138 ], [ %86, %._crit_edge135 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  invoke void @_ZNSt6vectorIxSaIxEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %.preheader89 unwind label %55

.preheader89:                                     ; preds = %51
  br i1 %.not75114, label %._crit_edge117, label %.lr.ph116

._crit_edge117:                                   ; preds = %.loopexit88, %.preheader89
  %52 = load i32, ptr %1, align 4
  %53 = sdiv i32 %52, 3
  %.not76127 = icmp slt i32 %53, %30
  br i1 %.not76127, label %._crit_edge130, label %.preheader87.preheader

.preheader87.preheader:                           ; preds = %._crit_edge117
  %54 = sext i32 %53 to i64
  br label %.preheader87

55:                                               ; preds = %51
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %98

.lr.ph116:                                        ; preds = %.preheader89, %.loopexit88
  %indvars.iv158 = phi i64 [ %.pre175, %.loopexit88 ], [ 0, %.preheader89 ]
  %57 = trunc nuw nsw i64 %indvars.iv158 to i32
  %58 = shl nuw i32 1, %57
  %59 = and i32 %58, %.058136
  %.not80 = icmp ne i32 %59, 0
  %.pre175 = add nuw nsw i64 %indvars.iv158, 1
  %60 = load i32, ptr %1, align 4
  %61 = sext i32 %60 to i64
  %.not81110.not = icmp slt i64 %indvars.iv158, %61
  %or.cond196 = select i1 %.not80, i1 %.not81110.not, i1 false
  br i1 %or.cond196, label %.lr.ph113, label %.loopexit88

.lr.ph113:                                        ; preds = %.lr.ph116, %.lr.ph113
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %.lr.ph113 ], [ 1, %.lr.ph116 ]
  %62 = mul nuw nsw i64 %indvars.iv155, %.pre175
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %62) #8
  store i64 0, ptr %63, align 8, !tbaa !9
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %64 = mul nuw nsw i64 %indvars.iv.next156, %.pre175
  %65 = load i32, ptr %1, align 4, !tbaa !5
  %66 = trunc nuw i64 %64 to i32
  %.not81 = icmp slt i32 %65, %66
  br i1 %.not81, label %.loopexit88, label %.lr.ph113, !llvm.loop !16

.loopexit88:                                      ; preds = %.lr.ph113, %.lr.ph116
  %exitcond.not = icmp eq i64 %.pre175, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge117, label %.lr.ph116, !llvm.loop !17

.preheader87:                                     ; preds = %.preheader87.preheader, %.loopexit
  %67 = phi i32 [ %52, %.preheader87.preheader ], [ %83, %.loopexit ]
  %indvars.iv167 = phi i64 [ %54, %.preheader87.preheader ], [ %indvars.iv.next168, %.loopexit ]
  %68 = sext i32 %67 to i64
  %.not78118 = icmp sgt i64 %indvars.iv167, %68
  br i1 %.not78118, label %.loopexit, label %.lr.ph121

._crit_edge130:                                   ; preds = %.loopexit, %._crit_edge117
  %69 = phi i32 [ %52, %._crit_edge117 ], [ %83, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store i64 0, ptr %7, align 8, !tbaa !9
  %.not77131 = icmp slt i32 %69, 1
  br i1 %.not77131, label %._crit_edge135, label %.lr.ph134

._crit_edge122:                                   ; preds = %.lr.ph121
  %70 = icmp sgt i64 %74, -1
  %.not79124 = icmp sgt i64 %indvars.iv167, %77
  %or.cond140 = or i1 %70, %.not79124
  br i1 %or.cond140, label %.loopexit, label %.lr.ph126

.lr.ph121:                                        ; preds = %.preheader87, %.lr.ph121
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %.lr.ph121 ], [ 1, %.preheader87 ]
  %.053119 = phi i64 [ %74, %.lr.ph121 ], [ 0, %.preheader87 ]
  %71 = mul nsw i64 %indvars.iv161, %indvars.iv167
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %71) #8
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = add nsw i64 %73, %.053119
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %75 = mul nsw i64 %indvars.iv.next162, %indvars.iv167
  %76 = load i32, ptr %1, align 4
  %77 = sext i32 %76 to i64
  %.not78 = icmp sgt i64 %75, %77
  br i1 %.not78, label %._crit_edge122, label %.lr.ph121, !llvm.loop !18

.lr.ph126:                                        ; preds = %._crit_edge122, %.lr.ph126
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %.lr.ph126 ], [ 1, %._crit_edge122 ]
  %78 = mul nsw i64 %indvars.iv164, %indvars.iv167
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %78) #8
  store i64 0, ptr %79, align 8, !tbaa !9
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %80 = mul nsw i64 %indvars.iv.next165, %indvars.iv167
  %81 = load i32, ptr %1, align 4
  %82 = sext i32 %81 to i64
  %.not79 = icmp sgt i64 %80, %82
  br i1 %.not79, label %.loopexit, label %.lr.ph126, !llvm.loop !19

.loopexit:                                        ; preds = %.lr.ph126, %.preheader87, %._crit_edge122
  %83 = phi i32 [ %76, %._crit_edge122 ], [ %67, %.preheader87 ], [ %81, %.lr.ph126 ]
  %indvars.iv.next168 = add nsw i64 %indvars.iv167, -1
  %.not76.not = icmp sgt i64 %indvars.iv167, %31
  br i1 %.not76.not, label %.preheader87, label %._crit_edge130, !llvm.loop !20

._crit_edge135:                                   ; preds = %.lr.ph134, %._crit_edge130
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %85 = load i64, ptr %84, align 8, !tbaa !9
  store i64 %85, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  %86 = add nuw nsw i32 %.058136, 1
  %exitcond173.not = icmp eq i32 %86, %smax
  br i1 %exitcond173.not, label %._crit_edge139.loopexit, label %51, !llvm.loop !21

.lr.ph134:                                        ; preds = %._crit_edge130, %.lr.ph134
  %indvars.iv170 = phi i64 [ %indvars.iv.next171, %.lr.ph134 ], [ 1, %._crit_edge130 ]
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv170) #8
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = load i64, ptr %7, align 8, !tbaa !9
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %7, align 8, !tbaa !9
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %91 = load i32, ptr %1, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %.not77.not = icmp slt i64 %indvars.iv170, %92
  br i1 %.not77.not, label %.lr.ph134, label %._crit_edge135, !llvm.loop !22

93:                                               ; preds = %._crit_edge139
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %95 unwind label %96

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

96:                                               ; preds = %93, %._crit_edge139
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %98

98:                                               ; preds = %96, %55
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %99

99:                                               ; preds = %98, %23
  %.pn84 = phi { ptr, i32 } [ %24, %23 ], [ %.pn, %98 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  br label %100

100:                                              ; preds = %99, %16
  %.pn84.pn = phi { ptr, i32 } [ %.pn84, %99 ], [ %17, %16 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn84.pn
}

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

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 #2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; 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: 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)) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

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


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