; LLVM IR from kazunetakahashi/atcoder :: 2018/0325_ARC093 (F)

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

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@A = external dso_local global [100 x i64], align 16
@DP = external dso_local global [65536 x i64], align 16
@L = external dso_local global [100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @M)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %35, %0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr @M, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %38

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = add nsw i64 %33, -1
  store i64 %34, ptr %32, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %25
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !11

38:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @DP, ptr noundef getelementptr inbounds (i64, ptr @DP, i64 65536), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  store i64 1, ptr @DP, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %39 = load i32, ptr @M, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %123, %38
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = icmp sge i32 %42, 0
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %126

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %46 = load i32, ptr @N, align 4, !tbaa !5
  %47 = shl i32 1, %46
  %48 = sub nsw i32 %47, 1
  store i32 %48, ptr %6, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %119, %45
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = icmp sge i32 %50, 0
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = icmp eq i64 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %53
  br label %119

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

61:                                               ; preds = %115, %60
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = load i32, ptr @N, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = ashr i32 %67, %68
  %70 = and i32 %69, 1
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %114

72:                                               ; preds = %66
  %73 = load i32, ptr @N, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %74)
  %76 = sub nsw i64 %75, 1
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !9
  %81 = sub nsw i64 %76, %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = sub nsw i64 %81, %83
  %85 = trunc i64 %84 to i32
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %87)
  %89 = sub nsw i64 %88, 1
  %90 = trunc i64 %89 to i32
  %91 = call noundef i64 @_Z1Cii(i32 noundef %85, i32 noundef %90)
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = mul nsw i64 %91, %95
  %97 = srem i64 %96, 1000000007
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = shl i32 1, %99
  %101 = add nsw i32 %98, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = add nsw i64 %104, %97
  store i64 %105, ptr %103, align 8, !tbaa !9
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = shl i32 1, %107
  %109 = add nsw i32 %106, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = srem i64 %112, 1000000007
  store i64 %113, ptr %111, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %72, %66
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %7, align 4, !tbaa !5
  br label %61, !llvm.loop !13

118:                                              ; preds = %65
  br label %119

119:                                              ; preds = %118, %59
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %6, align 4, !tbaa !5
  br label %49, !llvm.loop !14

122:                                              ; preds = %52
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = add nsw i32 %124, -1
  store i32 %125, ptr %4, align 4, !tbaa !5
  br label %41, !llvm.loop !15

126:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %185, %126
  %128 = load i32, ptr %8, align 4, !tbaa !5
  %129 = load i32, ptr @N, align 4, !tbaa !5
  %130 = shl i32 1, %129
  %131 = icmp slt i32 %128, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %127
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %188

133:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %134 = load i32, ptr @N, align 4, !tbaa !5
  %135 = shl i32 1, %134
  %136 = sub nsw i32 %135, 1
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = sub nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  store i64 %139, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %175, %133
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = load i32, ptr @N, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %178

145:                                              ; preds = %140
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = ashr i32 %146, %147
  %149 = and i32 %148, 1
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %174

151:                                              ; preds = %145
  %152 = load i64, ptr %9, align 8, !tbaa !9
  %153 = trunc i64 %152 to i32
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %155)
  %157 = trunc i64 %156 to i32
  %158 = call noundef i64 @_Z1Cii(i32 noundef %153, i32 noundef %157)
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = mul nsw i64 %162, %158
  store i64 %163, ptr %161, align 8, !tbaa !9
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !9
  %168 = srem i64 %167, 1000000007
  store i64 %168, ptr %166, align 8, !tbaa !9
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %170)
  %172 = load i64, ptr %9, align 8, !tbaa !9
  %173 = sub nsw i64 %172, %171
  store i64 %173, ptr %9, align 8, !tbaa !9
  br label %174

174:                                              ; preds = %151, %145
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %10, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %10, align 4, !tbaa !5
  br label %140, !llvm.loop !16

178:                                              ; preds = %144
  %179 = load i64, ptr %9, align 8, !tbaa !9
  %180 = icmp eq i64 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %178
  br label %184

182:                                              ; preds = %178
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 126, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

183:                                              ; No predecessors!
  br label %184

184:                                              ; preds = %183, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %8, align 4, !tbaa !5
  br label %127, !llvm.loop !17

188:                                              ; preds = %132
  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 0, ptr %12, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %233, %188
  %190 = load i32, ptr %12, align 4, !tbaa !5
  %191 = load i32, ptr @N, align 4, !tbaa !5
  %192 = shl i32 1, %191
  %193 = icmp slt i32 %190, %192
  br i1 %193, label %195, label %194

194:                                              ; preds = %189
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %236

195:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %196

196:                                              ; preds = %208, %195
  %197 = load i32, ptr %14, align 4, !tbaa !5
  %198 = load i32, ptr @N, align 4, !tbaa !5
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %211

201:                                              ; preds = %196
  %202 = load i32, ptr %12, align 4, !tbaa !5
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = ashr i32 %202, %203
  %205 = and i32 %204, 1
  %206 = load i32, ptr %13, align 4, !tbaa !5
  %207 = add nsw i32 %206, %205
  store i32 %207, ptr %13, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %201
  %209 = load i32, ptr %14, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %14, align 4, !tbaa !5
  br label %196, !llvm.loop !18

211:                                              ; preds = %200
  %212 = load i32, ptr %13, align 4, !tbaa !5
  %213 = srem i32 %212, 2
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %222

215:                                              ; preds = %211
  %216 = load i32, ptr %12, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !9
  %220 = load i64, ptr %11, align 8, !tbaa !9
  %221 = add nsw i64 %220, %219
  store i64 %221, ptr %11, align 8, !tbaa !9
  br label %230

222:                                              ; preds = %211
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !9
  %227 = sub nsw i64 1000000007, %226
  %228 = load i64, ptr %11, align 8, !tbaa !9
  %229 = add nsw i64 %228, %227
  store i64 %229, ptr %11, align 8, !tbaa !9
  br label %230

230:                                              ; preds = %222, %215
  %231 = load i64, ptr %11, align 8, !tbaa !9
  %232 = srem i64 %231, 1000000007
  store i64 %232, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %233

233:                                              ; preds = %230
  %234 = load i32, ptr %12, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %12, align 4, !tbaa !5
  br label %189, !llvm.loop !19

236:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %285, %236
  %238 = load i32, ptr %15, align 4, !tbaa !5
  %239 = load i32, ptr @N, align 4, !tbaa !5
  %240 = icmp slt i32 %238, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %237
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %288

242:                                              ; preds = %237
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %244
  store i64 1, ptr %245, 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 %246

246:                                              ; preds = %281, %242
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = load i32, ptr %15, align 4, !tbaa !5
  %249 = icmp slt i32 %247, %248
  br i1 %249, label %251, label %250

250:                                              ; preds = %246
  store i32 29, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %284

251:                                              ; preds = %246
  %252 = load i32, ptr %15, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %253)
  %255 = load i32, ptr %16, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %256)
  %258 = sub nsw i64 %254, %257
  %259 = trunc i64 %258 to i32
  %260 = load i32, ptr %16, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %261)
  %263 = trunc i64 %262 to i32
  %264 = call noundef i64 @_Z1Cii(i32 noundef %259, i32 noundef %263)
  %265 = load i32, ptr %16, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %266
  %268 = load i64, ptr %267, align 8, !tbaa !9
  %269 = mul nsw i64 %264, %268
  %270 = srem i64 %269, 1000000007
  %271 = load i32, ptr %15, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %272
  %274 = load i64, ptr %273, align 8, !tbaa !9
  %275 = mul nsw i64 %274, %270
  store i64 %275, ptr %273, align 8, !tbaa !9
  %276 = load i32, ptr %15, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !9
  %280 = srem i64 %279, 1000000007
  store i64 %280, ptr %278, align 8, !tbaa !9
  br label %281

281:                                              ; preds = %251
  %282 = load i32, ptr %16, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %16, align 4, !tbaa !5
  br label %246, !llvm.loop !20

284:                                              ; preds = %250
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %15, align 4, !tbaa !5
  br label %237, !llvm.loop !21

288:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %289

289:                                              ; preds = %303, %288
  %290 = load i32, ptr %17, align 4, !tbaa !5
  %291 = load i32, ptr @N, align 4, !tbaa !5
  %292 = icmp slt i32 %290, %291
  br i1 %292, label %294, label %293

293:                                              ; preds = %289
  store i32 32, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %306

294:                                              ; preds = %289
  %295 = load i32, ptr %17, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %296
  %298 = load i64, ptr %297, align 8, !tbaa !9
  %299 = load i64, ptr %11, align 8, !tbaa !9
  %300 = mul nsw i64 %299, %298
  store i64 %300, ptr %11, align 8, !tbaa !9
  %301 = load i64, ptr %11, align 8, !tbaa !9
  %302 = srem i64 %301, 1000000007
  store i64 %302, ptr %11, align 8, !tbaa !9
  br label %303

303:                                              ; preds = %294
  %304 = load i32, ptr %17, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %17, align 4, !tbaa !5
  br label %289, !llvm.loop !22

306:                                              ; preds = %293
  %307 = load i32, ptr @N, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %308)
  %310 = sub nsw i64 %309, 1
  %311 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %310)
  %312 = load i64, ptr %11, align 8, !tbaa !9
  %313 = mul nsw i64 %312, %311
  store i64 %313, ptr %11, align 8, !tbaa !9
  %314 = load i64, ptr %11, align 8, !tbaa !9
  %315 = srem i64 %314, 1000000007
  store i64 %315, ptr %11, align 8, !tbaa !9
  %316 = load i64, ptr %11, align 8, !tbaa !9
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %316)
  %318 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %317, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %319 = load i32, ptr %1, align 4
  ret i32 %319
}

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 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) #2 align 2

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

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

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@A = external dso_local global [100 x i64], align 16
@DP = external dso_local global [65536 x i64], align 16
@L = external dso_local local_unnamed_addr global [100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z1Cii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  tail call void @_Z4initv()
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %4 = load i32, ptr @M, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @DP, ptr noundef nonnull getelementptr inbounds (i8, ptr @DP, i64 524288), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  store i64 1, ptr @DP, align 16, !tbaa !9
  %6 = load i32, ptr @M, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph106.preheader, label %.preheader89

.lr.ph106.preheader:                              ; preds = %._crit_edge
  %8 = zext nneg i32 %6 to i64
  br label %.lr.ph102

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %9 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %indvars.iv
  %10 = 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) %9)
  %11 = load i64, ptr %9, align 8, !tbaa !9
  %12 = add nsw i64 %11, -1
  store i64 %12, ptr %9, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %13 = load i32, ptr @M, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = icmp slt i64 %indvars.iv.next, %14
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.loopexit91:                                      ; preds = %.loopexit
  %16 = icmp sgt i64 %indvars.iv155, 1
  br i1 %16, label %.lr.ph102, label %.preheader89, !llvm.loop !13

.preheader89:                                     ; preds = %.loopexit91, %._crit_edge
  %17 = load i32, ptr @N, align 4
  %.not = icmp eq i32 %17, 31
  br i1 %.not, label %.lr.ph130.preheader, label %.lr.ph113

.lr.ph113:                                        ; preds = %.preheader89
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph113.split.preheader, label %.lr.ph113.split.us

.lr.ph113.split.preheader:                        ; preds = %.lr.ph113
  %19 = shl nuw i32 1, %17
  br label %.lr.ph113.split

.lr.ph113.split.us:                               ; preds = %.lr.ph113
  %20 = icmp eq i32 %17, 0
  br i1 %20, label %.preheader87.lr.ph, label %.split.us

.lr.ph102:                                        ; preds = %.loopexit91, %.lr.ph106.preheader
  %indvars.iv155 = phi i64 [ %8, %.lr.ph106.preheader ], [ %indvars.iv.next156, %.loopexit91 ]
  %indvars.iv.next156 = add nsw i64 %indvars.iv155, -1
  %21 = load i32, ptr @N, align 4
  %notmask = shl nsw i32 -1, %21
  %22 = xor i32 %notmask, -1
  %23 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %indvars.iv.next156
  %24 = zext nneg i32 %22 to i64
  br label %25

25:                                               ; preds = %.lr.ph102, %.loopexit
  %26 = phi i32 [ %21, %.lr.ph102 ], [ %64, %.loopexit ]
  %27 = phi i32 [ %21, %.lr.ph102 ], [ %65, %.loopexit ]
  %indvars.iv152 = phi i64 [ %24, %.lr.ph102 ], [ %indvars.iv.next153, %.loopexit ]
  %28 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %indvars.iv152
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = icmp ne i64 %29, 0
  %31 = icmp sgt i32 %27, 0
  %or.cond = select i1 %30, i1 %31, i1 false
  br i1 %or.cond, label %.lr.ph98.preheader, label %.loopexit

.lr.ph98.preheader:                               ; preds = %25
  %32 = trunc nuw nsw i64 %indvars.iv152 to i32
  br label %.lr.ph98

.lr.ph98:                                         ; preds = %.lr.ph98.preheader, %60
  %33 = phi i32 [ %26, %.lr.ph98.preheader ], [ %61, %60 ]
  %indvars.iv149 = phi i64 [ 0, %.lr.ph98.preheader ], [ %indvars.iv.next150, %60 ]
  %34 = phi i32 [ %27, %.lr.ph98.preheader ], [ %61, %60 ]
  %35 = trunc nuw nsw i64 %indvars.iv149 to i32
  %36 = shl nuw i32 1, %35
  %37 = and i32 %36, %32
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %60

39:                                               ; preds = %.lr.ph98
  %40 = sext i32 %34 to i64
  %41 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %40)
  %42 = load i64, ptr %23, align 8, !tbaa !9
  %43 = xor i64 %42, -1
  %44 = add i64 %41, %43
  %45 = trunc i64 %44 to i32
  %46 = sub i32 %45, %32
  %47 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv149)
  %48 = trunc i64 %47 to i32
  %49 = add i32 %48, -1
  %50 = call noundef i64 @_Z1Cii(i32 noundef %46, i32 noundef %49)
  %51 = load i64, ptr %28, align 8, !tbaa !9
  %52 = mul nsw i64 %51, %50
  %53 = srem i64 %52, 1000000007
  %54 = add nuw nsw i32 %36, %32
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = add nsw i64 %53, %57
  %59 = srem i64 %58, 1000000007
  store i64 %59, ptr %56, align 8, !tbaa !9
  %.pre = load i32, ptr @N, align 4
  br label %60

60:                                               ; preds = %.lr.ph98, %39
  %61 = phi i32 [ %33, %.lr.ph98 ], [ %.pre, %39 ]
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next150, %62
  br i1 %63, label %.lr.ph98, label %.loopexit, !llvm.loop !14

.loopexit:                                        ; preds = %60, %25
  %64 = phi i32 [ %26, %25 ], [ %61, %60 ]
  %65 = phi i32 [ %27, %25 ], [ %61, %60 ]
  %indvars.iv.next153 = add nsw i64 %indvars.iv152, -1
  %66 = icmp sgt i64 %indvars.iv152, 0
  br i1 %66, label %25, label %.loopexit91, !llvm.loop !15

67:                                               ; preds = %._crit_edge111
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %68 = shl nuw i32 1, %81
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next163, %69
  br i1 %70, label %.lr.ph113.split, label %.preheader88, !llvm.loop !16

.preheader88:                                     ; preds = %67
  %.not204 = icmp eq i32 %81, 31
  br i1 %.not204, label %.preheader86, label %.preheader87.lr.ph

.preheader87.lr.ph:                               ; preds = %.lr.ph113.split.us, %.preheader88
  %.lcssa92186 = phi i32 [ %68, %.preheader88 ], [ 1, %.lr.ph113.split.us ]
  %71 = phi i32 [ %81, %.preheader88 ], [ 0, %.lr.ph113.split.us ]
  %72 = icmp sgt i32 %71, 0
  %wide.trip.count = zext nneg i32 %.lcssa92186 to i64
  %min.iters.check = icmp ult i32 %71, 8
  %n.vec = and i32 %71, 2147483640
  %cmp.n = icmp eq i32 %71, %n.vec
  br label %.preheader87

.lr.ph113.split:                                  ; preds = %.lr.ph113.split.preheader, %67
  %73 = phi i32 [ %81, %67 ], [ %17, %.lr.ph113.split.preheader ]
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %67 ], [ 0, %.lr.ph113.split.preheader ]
  %74 = phi i32 [ %68, %67 ], [ %19, %.lr.ph113.split.preheader ]
  %75 = trunc nuw nsw i64 %indvars.iv162 to i32
  %76 = xor i32 %75, -1
  %77 = add i32 %74, %76
  %78 = sext i32 %77 to i64
  %79 = icmp sgt i32 %73, 0
  br i1 %79, label %.lr.ph110, label %._crit_edge111

.lr.ph110:                                        ; preds = %.lr.ph113.split
  %80 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %indvars.iv162
  br label %83

._crit_edge111:                                   ; preds = %100, %.lr.ph113.split
  %81 = phi i32 [ %73, %.lr.ph113.split ], [ %101, %100 ]
  %.076.lcssa = phi i64 [ %78, %.lr.ph113.split ], [ %.177, %100 ]
  %82 = icmp eq i64 %.076.lcssa, 0
  br i1 %82, label %67, label %.split.us

83:                                               ; preds = %.lr.ph110, %100
  %84 = phi i32 [ %73, %.lr.ph110 ], [ %101, %100 ]
  %85 = phi i32 [ %73, %.lr.ph110 ], [ %102, %100 ]
  %indvars.iv159 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next160, %100 ]
  %.076107 = phi i64 [ %78, %.lr.ph110 ], [ %.177, %100 ]
  %86 = trunc nuw nsw i64 %indvars.iv159 to i32
  %87 = shl nuw i32 1, %86
  %88 = and i32 %87, %75
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %100

90:                                               ; preds = %83
  %91 = trunc i64 %.076107 to i32
  %92 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv159)
  %93 = trunc i64 %92 to i32
  %94 = call noundef i64 @_Z1Cii(i32 noundef %91, i32 noundef %93)
  %95 = load i64, ptr %80, align 8, !tbaa !9
  %96 = mul nsw i64 %95, %94
  %97 = srem i64 %96, 1000000007
  store i64 %97, ptr %80, align 8, !tbaa !9
  %98 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv159)
  %99 = sub nsw i64 %.076107, %98
  %.pre183 = load i32, ptr @N, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %83, %90
  %101 = phi i32 [ %.pre183, %90 ], [ %84, %83 ]
  %102 = phi i32 [ %.pre183, %90 ], [ %85, %83 ]
  %.177 = phi i64 [ %99, %90 ], [ %.076107, %83 ]
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %103 = sext i32 %102 to i64
  %104 = icmp slt i64 %indvars.iv.next160, %103
  br i1 %104, label %83, label %._crit_edge111, !llvm.loop !18

.split.us:                                        ; preds = %._crit_edge111, %.lr.ph113.split.us
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 126, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

.preheader87:                                     ; preds = %.preheader87.lr.ph, %127
  %indvars.iv166 = phi i64 [ 0, %.preheader87.lr.ph ], [ %indvars.iv.next167, %127 ]
  %.074122 = phi i64 [ 0, %.preheader87.lr.ph ], [ %128, %127 ]
  br i1 %72, label %.lr.ph119.preheader, label %._crit_edge120.thread

.lr.ph119.preheader:                              ; preds = %.preheader87
  %105 = trunc nuw nsw i64 %indvars.iv166 to i32
  br i1 %min.iters.check, label %.lr.ph119.preheader216, label %vector.ph

.lr.ph119.preheader216:                           ; preds = %middle.block, %.lr.ph119.preheader
  %.071118.ph = phi i32 [ 0, %.lr.ph119.preheader ], [ %n.vec, %middle.block ]
  %.072117.ph = phi i32 [ 0, %.lr.ph119.preheader ], [ %111, %middle.block ]
  br label %.lr.ph119

vector.ph:                                        ; preds = %.lr.ph119.preheader
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %105, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %108, %vector.body ]
  %vec.phi214 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %109, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %106 = lshr <4 x i32> %broadcast.splat, %vec.ind
  %107 = lshr <4 x i32> %broadcast.splat, %step.add
  %108 = add <4 x i32> %106, %vec.phi
  %109 = add <4 x i32> %107, %vec.phi214
  %index.next = add nuw i32 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %110 = icmp eq i32 %index.next, %n.vec
  br i1 %110, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %109, %108
  %111 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge120, label %.lr.ph119.preheader216

.preheader86:                                     ; preds = %127, %.preheader88
  %112 = phi i32 [ %81, %.preheader88 ], [ %71, %127 ]
  %.074.lcssa = phi i64 [ 0, %.preheader88 ], [ %128, %127 ]
  %113 = icmp sgt i32 %112, 0
  br i1 %113, label %.lr.ph130.preheader, label %._crit_edge135

.lr.ph130.preheader:                              ; preds = %.preheader89, %.preheader86
  %.074.lcssa191 = phi i64 [ %.074.lcssa, %.preheader86 ], [ 0, %.preheader89 ]
  %114 = phi i32 [ %112, %.preheader86 ], [ 31, %.preheader89 ]
  br label %.lr.ph130

._crit_edge120:                                   ; preds = %.lr.ph119, %middle.block
  %.lcssa206 = phi i32 [ %111, %middle.block ], [ %118, %.lr.ph119 ]
  %115 = and i32 %.lcssa206, 1
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %._crit_edge120.thread, label %123

.lr.ph119:                                        ; preds = %.lr.ph119.preheader216, %.lr.ph119
  %.071118 = phi i32 [ %119, %.lr.ph119 ], [ %.071118.ph, %.lr.ph119.preheader216 ]
  %.072117 = phi i32 [ %118, %.lr.ph119 ], [ %.072117.ph, %.lr.ph119.preheader216 ]
  %117 = lshr i32 %105, %.071118
  %118 = add i32 %117, %.072117
  %119 = add nuw nsw i32 %.071118, 1
  %exitcond165.not = icmp eq i32 %119, %71
  br i1 %exitcond165.not, label %._crit_edge120, label %.lr.ph119, !llvm.loop !22

._crit_edge120.thread:                            ; preds = %.preheader87, %._crit_edge120
  %120 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %indvars.iv166
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = add nsw i64 %121, %.074122
  br label %127

123:                                              ; preds = %._crit_edge120
  %124 = getelementptr inbounds [65536 x i64], ptr @DP, i64 0, i64 %indvars.iv166
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %reass.sub = add nsw i64 %.074122, 1000000007
  %126 = sub i64 %reass.sub, %125
  br label %127

127:                                              ; preds = %123, %._crit_edge120.thread
  %.1 = phi i64 [ %122, %._crit_edge120.thread ], [ %126, %123 ]
  %128 = srem i64 %.1, 1000000007
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %exitcond169.not = icmp eq i64 %indvars.iv.next167, %wide.trip.count
  br i1 %exitcond169.not, label %.preheader86, label %.preheader87, !llvm.loop !23

.preheader:                                       ; preds = %._crit_edge128
  %129 = icmp sgt i32 %133, 0
  br i1 %129, label %.lr.ph134.preheader, label %._crit_edge135

.lr.ph134.preheader:                              ; preds = %.preheader
  %wide.trip.count181 = zext nneg i32 %133 to i64
  %xtraiter = and i64 %wide.trip.count181, 1
  %130 = icmp eq i32 %133, 1
  br i1 %130, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134.preheader.new

.lr.ph134.preheader.new:                          ; preds = %.lr.ph134.preheader
  %unroll_iter = and i64 %wide.trip.count181, 2147483646
  br label %.lr.ph134

.lr.ph130:                                        ; preds = %.lr.ph130.preheader, %._crit_edge128
  %131 = phi i32 [ %114, %.lr.ph130.preheader ], [ %133, %._crit_edge128 ]
  %indvars.iv175 = phi i64 [ 0, %.lr.ph130.preheader ], [ %indvars.iv.next176, %._crit_edge128 ]
  %132 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %indvars.iv175
  store i64 1, ptr %132, align 8, !tbaa !9
  %.not139 = icmp eq i64 %indvars.iv175, 0
  br i1 %.not139, label %._crit_edge128, label %.lr.ph127

._crit_edge128.loopexit:                          ; preds = %.lr.ph127
  %.pre184 = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge128

._crit_edge128:                                   ; preds = %._crit_edge128.loopexit, %.lr.ph130
  %133 = phi i32 [ %.pre184, %._crit_edge128.loopexit ], [ %131, %.lr.ph130 ]
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %134 = sext i32 %133 to i64
  %135 = icmp slt i64 %indvars.iv.next176, %134
  br i1 %135, label %.lr.ph130, label %.preheader, !llvm.loop !24

.lr.ph127:                                        ; preds = %.lr.ph130, %.lr.ph127
  %indvars.iv170 = phi i64 [ %indvars.iv.next171, %.lr.ph127 ], [ 0, %.lr.ph130 ]
  %136 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv175)
  %137 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv170)
  %138 = sub nsw i64 %136, %137
  %139 = trunc i64 %138 to i32
  %140 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %indvars.iv170)
  %141 = trunc i64 %140 to i32
  %142 = call noundef i64 @_Z1Cii(i32 noundef %139, i32 noundef %141)
  %143 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %indvars.iv170
  %144 = load i64, ptr %143, align 8, !tbaa !9
  %145 = mul nsw i64 %144, %142
  %146 = srem i64 %145, 1000000007
  %147 = load i64, ptr %132, align 8, !tbaa !9
  %148 = mul nsw i64 %146, %147
  %149 = srem i64 %148, 1000000007
  store i64 %149, ptr %132, align 8, !tbaa !9
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %exitcond174.not = icmp eq i64 %indvars.iv.next171, %indvars.iv175
  br i1 %exitcond174.not, label %._crit_edge128.loopexit, label %.lr.ph127, !llvm.loop !25

._crit_edge135.loopexit.unr-lcssa:                ; preds = %.lr.ph134, %.lr.ph134.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph134.preheader ], [ %169, %.lr.ph134 ]
  %indvars.iv178.unr = phi i64 [ 0, %.lr.ph134.preheader ], [ %indvars.iv.next179.1, %.lr.ph134 ]
  %.2132.unr = phi i64 [ %.074.lcssa191, %.lr.ph134.preheader ], [ %169, %.lr.ph134 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge135, label %.lr.ph134.epil

.lr.ph134.epil:                                   ; preds = %._crit_edge135.loopexit.unr-lcssa
  %150 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %indvars.iv178.unr
  %151 = load i64, ptr %150, align 8, !tbaa !9
  %152 = mul nsw i64 %151, %.2132.unr
  %153 = srem i64 %152, 1000000007
  br label %._crit_edge135

._crit_edge135:                                   ; preds = %.lr.ph134.epil, %._crit_edge135.loopexit.unr-lcssa, %.preheader86, %.preheader
  %.lcssa195 = phi i32 [ %133, %.preheader ], [ %112, %.preheader86 ], [ %133, %._crit_edge135.loopexit.unr-lcssa ], [ %133, %.lr.ph134.epil ]
  %.2.lcssa = phi i64 [ %.074.lcssa191, %.preheader ], [ %.074.lcssa, %.preheader86 ], [ %.lcssa.ph, %._crit_edge135.loopexit.unr-lcssa ], [ %153, %.lr.ph134.epil ]
  %154 = sext i32 %.lcssa195 to i64
  %155 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %154)
  %156 = add nsw i64 %155, -1
  %157 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %156)
  %158 = mul nsw i64 %157, %.2.lcssa
  %159 = srem i64 %158, 1000000007
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %159)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph134:                                        ; preds = %.lr.ph134, %.lr.ph134.preheader.new
  %indvars.iv178 = phi i64 [ 0, %.lr.ph134.preheader.new ], [ %indvars.iv.next179.1, %.lr.ph134 ]
  %.2132 = phi i64 [ %.074.lcssa191, %.lr.ph134.preheader.new ], [ %169, %.lr.ph134 ]
  %niter = phi i64 [ 0, %.lr.ph134.preheader.new ], [ %niter.next.1, %.lr.ph134 ]
  %162 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %indvars.iv178
  %163 = load i64, ptr %162, align 16, !tbaa !9
  %164 = mul nsw i64 %163, %.2132
  %165 = srem i64 %164, 1000000007
  %indvars.iv.next179 = or disjoint i64 %indvars.iv178, 1
  %166 = getelementptr inbounds [100 x i64], ptr @L, i64 0, i64 %indvars.iv.next179
  %167 = load i64, ptr %166, align 8, !tbaa !9
  %168 = mul nsw i64 %167, %165
  %169 = srem i64 %168, 1000000007
  %indvars.iv.next179.1 = add nuw nsw i64 %indvars.iv178, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge135.loopexit.unr-lcssa, label %.lr.ph134, !llvm.loop !26
}

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind "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 }
attributes #9 = { noreturn 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}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !12, !21, !20}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}


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