; LLVM IR from eyangch/competitive-programming :: Codeforces/1327 (d)

; 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 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@p = external dso_local global [200000 x i64], align 16
@c = external dso_local global [200000 x i64], align 16
@vis = external dso_local global [200000 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i8, align 1
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %29

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

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

35:                                               ; preds = %44, %33
  %36 = load i64, ptr %2, align 8, !tbaa !8
  %37 = load i64, ptr @N, align 8, !tbaa !8
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %35
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = getelementptr inbounds [200000 x i64], ptr @p, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %42)
  br label %44

44:                                               ; preds = %40
  %45 = load i64, ptr %2, align 8, !tbaa !8
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %2, align 8, !tbaa !8
  br label %35, !llvm.loop !11

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

48:                                               ; preds = %57, %47
  %49 = load i64, ptr %3, align 8, !tbaa !8
  %50 = load i64, ptr @N, align 8, !tbaa !8
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %48
  %54 = load i64, ptr %3, align 8, !tbaa !8
  %55 = getelementptr inbounds [200000 x i64], ptr @c, i64 0, i64 %54
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %55)
  br label %57

57:                                               ; preds = %53
  %58 = load i64, ptr %3, align 8, !tbaa !8
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %3, align 8, !tbaa !8
  br label %48, !llvm.loop !13

60:                                               ; preds = %52
  %61 = load i64, ptr @N, align 8, !tbaa !8
  %62 = getelementptr inbounds i8, ptr @vis, i64 %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !14
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef @vis, ptr noundef %62, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 1000000000, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %63

63:                                               ; preds = %225, %60
  %64 = load i64, ptr %6, align 8, !tbaa !8
  %65 = load i64, ptr @N, align 8, !tbaa !8
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %69 = load i64, ptr %6, align 8, !tbaa !8
  store i64 %69, ptr %9, align 8, !tbaa !8
  br label %70

70:                                               ; preds = %81, %68
  %71 = load i64, ptr %9, align 8, !tbaa !8
  %72 = getelementptr inbounds [200000 x i8], ptr @vis, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !16, !range !18, !noundef !19
  %74 = trunc i8 %73 to i1
  %75 = xor i1 %74, true
  br i1 %75, label %76, label %90

76:                                               ; preds = %70
  %77 = load i64, ptr %9, align 8, !tbaa !8
  %78 = getelementptr inbounds [200000 x i8], ptr @vis, i64 0, i64 %77
  store i8 1, ptr %78, align 1, !tbaa !16
  %79 = load i64, ptr %9, align 8, !tbaa !8
  %80 = getelementptr inbounds [200000 x i64], ptr @c, i64 0, i64 %79
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %81 unwind label %86

81:                                               ; preds = %76
  %82 = load i64, ptr %9, align 8, !tbaa !8
  %83 = getelementptr inbounds [200000 x i64], ptr @p, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !8
  %85 = sub nsw i64 %84, 1
  store i64 %85, ptr %9, align 8, !tbaa !8
  br label %70, !llvm.loop !20

86:                                               ; preds = %76
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %10, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %11, align 4
  br label %228

90:                                               ; preds = %70
  %91 = call noundef zeroext i1 @_ZNKSt6vectorIxSaIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  store i32 12, ptr %7, align 4
  br label %222

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 1, ptr %12, align 8, !tbaa !8
  br label %94

94:                                               ; preds = %217, %93
  %95 = load i64, ptr %12, align 8, !tbaa !8
  %96 = load i64, ptr %12, align 8, !tbaa !8
  %97 = mul nsw i64 %95, %96
  %98 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %99 = icmp sle i64 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %94
  store i32 15, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %221

101:                                              ; preds = %94
  %102 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %103 = load i64, ptr %12, align 8, !tbaa !8
  %104 = srem i64 %102, %103
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %216

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !8
  br label %107

107:                                              ; preds = %152, %106
  %108 = load i64, ptr %13, align 8, !tbaa !8
  %109 = load i64, ptr %12, align 8, !tbaa !8
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 18, ptr %7, align 4
  br label %155

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %113 = load i64, ptr %13, align 8, !tbaa !8
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %113) #7
  %115 = load i64, ptr %114, align 8, !tbaa !8
  store i64 %115, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 1, ptr %15, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %116 = load i64, ptr %12, align 8, !tbaa !8
  %117 = load i64, ptr %13, align 8, !tbaa !8
  %118 = add nsw i64 %116, %117
  store i64 %118, ptr %16, align 8, !tbaa !8
  br label %119

119:                                              ; preds = %132, %112
  %120 = load i64, ptr %16, align 8, !tbaa !8
  %121 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 21, ptr %7, align 4
  br label %136

124:                                              ; preds = %119
  %125 = load i64, ptr %16, align 8, !tbaa !8
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %125) #7
  %127 = load i64, ptr %126, align 8, !tbaa !8
  %128 = load i64, ptr %14, align 8, !tbaa !8
  %129 = icmp ne i64 %127, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %124
  store i8 0, ptr %15, align 1, !tbaa !16
  store i32 21, ptr %7, align 4
  br label %136

131:                                              ; preds = %124
  br label %132

132:                                              ; preds = %131
  %133 = load i64, ptr %12, align 8, !tbaa !8
  %134 = load i64, ptr %16, align 8, !tbaa !8
  %135 = add nsw i64 %134, %133
  store i64 %135, ptr %16, align 8, !tbaa !8
  br label %119, !llvm.loop !21

136:                                              ; preds = %130, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %137

137:                                              ; preds = %136
  %138 = load i8, ptr %15, align 1, !tbaa !16, !range !18, !noundef !19
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %148

140:                                              ; preds = %137
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %142 unwind label %144

142:                                              ; preds = %140
  %143 = load i64, ptr %141, align 8, !tbaa !8
  store i64 %143, ptr %5, align 8, !tbaa !8
  store i32 18, ptr %7, align 4
  br label %149

144:                                              ; preds = %140
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %10, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %220

148:                                              ; preds = %137
  store i32 0, ptr %7, align 4
  br label %149

149:                                              ; preds = %148, %142
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %150 = load i32, ptr %7, align 4
  switch i32 %150, label %155 [
    i32 0, label %151
  ]

151:                                              ; preds = %149
  br label %152

152:                                              ; preds = %151
  %153 = load i64, ptr %13, align 8, !tbaa !8
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %13, align 8, !tbaa !8
  br label %107, !llvm.loop !22

155:                                              ; preds = %149, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %156

156:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %157

157:                                              ; preds = %211, %156
  %158 = load i64, ptr %17, align 8, !tbaa !8
  %159 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %160 = load i64, ptr %12, align 8, !tbaa !8
  %161 = sdiv i64 %159, %160
  %162 = icmp slt i64 %158, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %157
  store i32 24, ptr %7, align 4
  br label %214

164:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %165 = load i64, ptr %17, align 8, !tbaa !8
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %165) #7
  %167 = load i64, ptr %166, align 8, !tbaa !8
  store i64 %167, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  store i8 1, ptr %19, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %168 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %169 = load i64, ptr %12, align 8, !tbaa !8
  %170 = sdiv i64 %168, %169
  %171 = load i64, ptr %17, align 8, !tbaa !8
  %172 = add nsw i64 %170, %171
  store i64 %172, ptr %20, align 8, !tbaa !8
  br label %173

173:                                              ; preds = %186, %164
  %174 = load i64, ptr %20, align 8, !tbaa !8
  %175 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %176 = icmp slt i64 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 27, ptr %7, align 4
  br label %192

178:                                              ; preds = %173
  %179 = load i64, ptr %20, align 8, !tbaa !8
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %179) #7
  %181 = load i64, ptr %180, align 8, !tbaa !8
  %182 = load i64, ptr %18, align 8, !tbaa !8
  %183 = icmp ne i64 %181, %182
  br i1 %183, label %184, label %185

184:                                              ; preds = %178
  store i8 0, ptr %19, align 1, !tbaa !16
  store i32 27, ptr %7, align 4
  br label %192

185:                                              ; preds = %178
  br label %186

186:                                              ; preds = %185
  %187 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %188 = load i64, ptr %12, align 8, !tbaa !8
  %189 = sdiv i64 %187, %188
  %190 = load i64, ptr %20, align 8, !tbaa !8
  %191 = add nsw i64 %190, %189
  store i64 %191, ptr %20, align 8, !tbaa !8
  br label %173, !llvm.loop !23

192:                                              ; preds = %184, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %193

193:                                              ; preds = %192
  %194 = load i8, ptr %19, align 1, !tbaa !16, !range !18, !noundef !19
  %195 = trunc i8 %194 to i1
  br i1 %195, label %196, label %207

196:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %197 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %198 = load i64, ptr %12, align 8, !tbaa !8
  %199 = sdiv i64 %197, %198
  store i64 %199, ptr %21, align 8, !tbaa !8
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %201 unwind label %203

201:                                              ; preds = %196
  %202 = load i64, ptr %200, align 8, !tbaa !8
  store i64 %202, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  store i32 24, ptr %7, align 4
  br label %208

203:                                              ; preds = %196
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %10, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %220

207:                                              ; preds = %193
  store i32 0, ptr %7, align 4
  br label %208

208:                                              ; preds = %207, %201
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %209 = load i32, ptr %7, align 4
  switch i32 %209, label %214 [
    i32 0, label %210
  ]

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  %212 = load i64, ptr %17, align 8, !tbaa !8
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %17, align 8, !tbaa !8
  br label %157, !llvm.loop !24

214:                                              ; preds = %208, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %215

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215, %101
  br label %217

217:                                              ; preds = %216
  %218 = load i64, ptr %12, align 8, !tbaa !8
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %12, align 8, !tbaa !8
  br label %94, !llvm.loop !25

220:                                              ; preds = %203, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %228

221:                                              ; preds = %100
  store i32 0, ptr %7, align 4
  br label %222

222:                                              ; preds = %221, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  %223 = load i32, ptr %7, align 4
  switch i32 %223, label %240 [
    i32 0, label %224
    i32 12, label %225
  ]

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224, %222
  %226 = load i64, ptr %6, align 8, !tbaa !8
  %227 = add nsw i64 %226, 1
  store i64 %227, ptr %6, align 8, !tbaa !8
  br label %63, !llvm.loop !26

228:                                              ; preds = %220, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %235

229:                                              ; preds = %67
  %230 = load i64, ptr %5, align 8, !tbaa !8
  %231 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %230)
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %231, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %29, !llvm.loop !27

233:                                              ; preds = %29
  %234 = load i32, ptr %1, align 4
  ret i32 %234

235:                                              ; preds = %228
  %236 = load ptr, ptr %10, align 8
  %237 = load i32, ptr %11, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %222
  unreachable
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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) #1 align 2

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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

%"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 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@p = external dso_local global [200000 x i64], align 16
@c = external dso_local global [200000 x i64], align 16
@vis = external dso_local global [200000 x i8], 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 i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %13 = load i64, ptr @T, align 8, !tbaa !8
  %14 = add nsw i64 %13, -1
  store i64 %14, ptr @T, align 8, !tbaa !8
  %.not91 = icmp eq i64 %13, 0
  br i1 %.not91, label %._crit_edge94, label %.lr.ph93

.lr.ph93:                                         ; preds = %0, %._crit_edge90
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %16 = load i64, ptr @N, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.preheader60:                                     ; preds = %.lr.ph
  %18 = icmp sgt i64 %22, 0
  br i1 %18, label %.lr.ph63, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph93, %.lr.ph
  %.03761 = phi i64 [ %21, %.lr.ph ], [ 0, %.lr.ph93 ]
  %19 = getelementptr inbounds [200000 x i64], ptr @p, i64 0, i64 %.03761
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %21 = add nuw nsw i64 %.03761, 1
  %22 = load i64, ptr @N, align 8, !tbaa !8
  %23 = icmp slt i64 %21, %22
  br i1 %23, label %.lr.ph, label %.preheader60, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph63, %.lr.ph93, %.preheader60
  %.lcssa = phi i64 [ %22, %.preheader60 ], [ %16, %.lr.ph93 ], [ %30, %.lr.ph63 ]
  %24 = getelementptr inbounds i8, ptr @vis, i64 %.lcssa
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !13
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef nonnull @vis, ptr noundef nonnull %24, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 1000000000, ptr %2, align 8, !tbaa !8
  %25 = load i64, ptr @N, align 8, !tbaa !8
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph89, label %._crit_edge90

.lr.ph63:                                         ; preds = %.preheader60, %.lr.ph63
  %.04162 = phi i64 [ %29, %.lr.ph63 ], [ 0, %.preheader60 ]
  %27 = getelementptr inbounds [200000 x i64], ptr @c, i64 0, i64 %.04162
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = add nuw nsw i64 %.04162, 1
  %30 = load i64, ptr @N, align 8, !tbaa !8
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %.lr.ph63, label %._crit_edge, !llvm.loop !15

._crit_edge90.loopexit:                           ; preds = %108
  %.pre98 = load i64, ptr %2, align 8, !tbaa !8
  br label %._crit_edge90

._crit_edge90:                                    ; preds = %._crit_edge90.loopexit, %._crit_edge
  %32 = phi i64 [ %.pre98, %._crit_edge90.loopexit ], [ 1000000000, %._crit_edge ]
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %32)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %33, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %35 = load i64, ptr @T, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  store i64 %36, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %35, 0
  br i1 %.not, label %._crit_edge94, label %.lr.ph93, !llvm.loop !16

.lr.ph89:                                         ; preds = %._crit_edge, %108
  %.04387 = phi i64 [ %109, %108 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %37 = getelementptr inbounds [200000 x i8], ptr @vis, i64 0, i64 %.04387
  %38 = load i8, ptr %37, align 1, !tbaa !17, !range !19, !noundef !20
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %.lr.ph89, %42
  %40 = phi ptr [ %46, %42 ], [ %37, %.lr.ph89 ]
  %.04564 = phi i64 [ %45, %42 ], [ %.04387, %.lr.ph89 ]
  store i8 1, ptr %40, align 1, !tbaa !17
  %41 = getelementptr inbounds [200000 x i64], ptr @c, i64 0, i64 %.04564
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %41)
          to label %42 unwind label %49

42:                                               ; preds = %.lr.ph66
  %43 = getelementptr inbounds [200000 x i64], ptr @p, i64 0, i64 %.04564
  %44 = load i64, ptr %43, align 8, !tbaa !8
  %45 = add nsw i64 %44, -1
  %46 = getelementptr inbounds [200000 x i8], ptr @vis, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !17, !range !19, !noundef !20
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %._crit_edge67, label %.lr.ph66, !llvm.loop !21

49:                                               ; preds = %.lr.ph66
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  resume { ptr, i32 } %50

._crit_edge67:                                    ; preds = %42, %.lr.ph89
  %51 = call noundef zeroext i1 @_ZNKSt6vectorIxSaIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br i1 %51, label %108, label %52

52:                                               ; preds = %._crit_edge67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 1, ptr %4, align 8, !tbaa !8
  %53 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not4783 = icmp slt i64 %53, 1
  br i1 %.not4783, label %._crit_edge86, label %.lr.ph85

._crit_edge86:                                    ; preds = %.loopexit, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %108

.lr.ph85:                                         ; preds = %52, %.loopexit
  %54 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %55 = load i64, ptr %4, align 8, !tbaa !8
  %56 = srem i64 %54, %55
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.lr.ph85
  %58 = icmp sgt i64 %55, 0
  br i1 %58, label %.lr.ph74, label %.loopexit59

.lr.ph74:                                         ; preds = %.preheader, %.critedge53
  %.04273 = phi i64 [ %70, %.critedge53 ], [ 0, %.preheader ]
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04273) #7
  %60 = load i64, ptr %59, align 8, !tbaa !8
  %61 = load i64, ptr %4, align 8, !tbaa !8
  %62 = add nsw i64 %61, %.04273
  %63 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not4968 = icmp slt i64 %62, %63
  br i1 %.not4968, label %.lr.ph71, label %.critedge58

.lr.ph71:                                         ; preds = %.lr.ph74, %66
  %.03969 = phi i64 [ %68, %66 ], [ %62, %.lr.ph74 ]
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03969) #7
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %.not48 = icmp eq i64 %65, %60
  br i1 %.not48, label %66, label %.critedge53

66:                                               ; preds = %.lr.ph71
  %67 = load i64, ptr %4, align 8, !tbaa !8
  %68 = add nsw i64 %67, %.03969
  %69 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not49 = icmp slt i64 %68, %69
  br i1 %.not49, label %.lr.ph71, label %.critedge58, !llvm.loop !22

.critedge53:                                      ; preds = %.lr.ph71
  %70 = add nuw nsw i64 %.04273, 1
  %71 = load i64, ptr %4, align 8, !tbaa !8
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %.lr.ph74, label %.loopexit59, !llvm.loop !23

.critedge58:                                      ; preds = %.lr.ph74, %66
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %74 = load i64, ptr %73, align 8, !tbaa !8
  store i64 %74, ptr %2, align 8, !tbaa !8
  br label %.loopexit59

.loopexit59:                                      ; preds = %.critedge53, %.preheader, %.critedge58
  %75 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %76 = load i64, ptr %4, align 8, !tbaa !8
  %77 = sdiv i64 %75, %76
  %78 = icmp sgt i64 %77, 0
  br i1 %78, label %.lr.ph82, label %.loopexit

.lr.ph82:                                         ; preds = %.loopexit59, %.critedge57
  %.03880 = phi i64 [ %94, %.critedge57 ], [ 0, %.loopexit59 ]
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03880) #7
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %82 = load i64, ptr %4, align 8, !tbaa !8
  %83 = sdiv i64 %81, %82
  %84 = add nsw i64 %83, %.03880
  %85 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not5175 = icmp slt i64 %84, %85
  br i1 %.not5175, label %.lr.ph78, label %.critedge

.lr.ph78:                                         ; preds = %.lr.ph82, %88
  %.076 = phi i64 [ %92, %88 ], [ %84, %.lr.ph82 ]
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.076) #7
  %87 = load i64, ptr %86, align 8, !tbaa !8
  %.not50 = icmp eq i64 %87, %80
  br i1 %.not50, label %88, label %.critedge57

88:                                               ; preds = %.lr.ph78
  %89 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %90 = load i64, ptr %4, align 8, !tbaa !8
  %91 = sdiv i64 %89, %90
  %92 = add nsw i64 %91, %.076
  %93 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not51 = icmp slt i64 %92, %93
  br i1 %.not51, label %.lr.ph78, label %.critedge, !llvm.loop !24

.critedge57:                                      ; preds = %.lr.ph78
  %94 = add nuw nsw i64 %.03880, 1
  %95 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %96 = load i64, ptr %4, align 8, !tbaa !8
  %97 = sdiv i64 %95, %96
  %98 = icmp slt i64 %94, %97
  br i1 %98, label %.lr.ph82, label %.loopexit, !llvm.loop !25

.critedge:                                        ; preds = %.lr.ph82, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %99 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %100 = load i64, ptr %4, align 8, !tbaa !8
  %101 = sdiv i64 %99, %100
  store i64 %101, ptr %5, align 8, !tbaa !8
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %103 = load i64, ptr %102, align 8, !tbaa !8
  store i64 %103, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %.pre = load i64, ptr %4, align 8, !tbaa !8
  br label %.loopexit

.loopexit:                                        ; preds = %.critedge57, %.loopexit59, %.critedge, %.lr.ph85
  %104 = phi i64 [ %76, %.loopexit59 ], [ %.pre, %.critedge ], [ %55, %.lr.ph85 ], [ %96, %.critedge57 ]
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %4, align 8, !tbaa !8
  %106 = mul nsw i64 %105, %105
  %107 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not47 = icmp sgt i64 %106, %107
  br i1 %.not47, label %._crit_edge86, label %.lr.ph85, !llvm.loop !26

108:                                              ; preds = %._crit_edge67, %._crit_edge86
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  %109 = add nuw nsw i64 %.04387, 1
  %110 = load i64, ptr @N, align 8, !tbaa !8
  %111 = icmp slt i64 %109, %110
  br i1 %111, label %.lr.ph89, label %._crit_edge90.loopexit, !llvm.loop !27

._crit_edge94:                                    ; preds = %._crit_edge90, %0
  ret i32 0
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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