; LLVM IR from eyangch/competitive-programming :: COCI/2023_2 (lampice)

; 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::mersenne_twister_engine" = type { [624 x i64], i64 }
%"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::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<long long>::param_type" }
%"struct.std::uniform_int_distribution<long long>::param_type" = type { i64, i64 }

@rng = external dso_local global %"class.std::mersenne_twister_engine", align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@B = external dso_local global [151 x [1001 x [4 x i64]]], align 16
@cnt = external dso_local global [4 x [151 x [65536 x i64]]], align 16
@tupd = external dso_local global [4 x [151 x [1001 x i64]]], align 16
@tpt = external dso_local global [4 x [151 x i64]], align 16
@q1 = external dso_local global [4 x [151 x i64]], align 16
@q2 = external dso_local global [4 x [151 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::uniform_int_distribution", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %32 = 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)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %35 = load i64, ptr @N, align 8, !tbaa !8
  %36 = add nsw i64 %35, 1
  store i64 %36, ptr @N, align 8, !tbaa !8
  %37 = load i64, ptr @M, align 8, !tbaa !8
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr @M, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %39

39:                                               ; preds = %77, %0
  %40 = load i64, ptr %2, align 8, !tbaa !8
  %41 = load i64, ptr @K, align 8, !tbaa !8
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %80

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  br label %49

49:                                               ; preds = %73, %44
  %50 = load i64, ptr %8, align 8, !tbaa !8
  %51 = icmp slt i64 %50, 4
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef 0, i64 noundef 65535)
  %54 = call noundef i64 @_ZNSt24uniform_int_distributionIxEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEExRT_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(5000) @rng)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  store i64 %54, ptr %9, align 8, !tbaa !8
  %55 = load i64, ptr %9, align 8, !tbaa !8
  %56 = load i64, ptr %4, align 8, !tbaa !8
  %57 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %56
  %58 = load i64, ptr %5, align 8, !tbaa !8
  %59 = getelementptr inbounds [1001 x [4 x i64]], ptr %57, i64 0, i64 %58
  %60 = load i64, ptr %8, align 8, !tbaa !8
  %61 = getelementptr inbounds [4 x i64], ptr %59, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = xor i64 %62, %55
  store i64 %63, ptr %61, align 8, !tbaa !8
  %64 = load i64, ptr %9, align 8, !tbaa !8
  %65 = load i64, ptr %6, align 8, !tbaa !8
  %66 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %65
  %67 = load i64, ptr %7, align 8, !tbaa !8
  %68 = getelementptr inbounds [1001 x [4 x i64]], ptr %66, i64 0, i64 %67
  %69 = load i64, ptr %8, align 8, !tbaa !8
  %70 = getelementptr inbounds [4 x i64], ptr %68, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = xor i64 %71, %64
  store i64 %72, ptr %70, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %73

73:                                               ; preds = %53
  %74 = load i64, ptr %8, align 8, !tbaa !8
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %8, align 8, !tbaa !8
  br label %49, !llvm.loop !11

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

77:                                               ; preds = %76
  %78 = load i64, ptr %2, align 8, !tbaa !8
  %79 = add nsw i64 %78, 1
  store i64 %79, ptr %2, align 8, !tbaa !8
  br label %39, !llvm.loop !13

80:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %81

81:                                               ; preds = %170, %80
  %82 = load i64, ptr %11, align 8, !tbaa !8
  %83 = load i64, ptr @N, align 8, !tbaa !8
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %173

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %87

87:                                               ; preds = %166, %86
  %88 = load i64, ptr %12, align 8, !tbaa !8
  %89 = load i64, ptr @M, align 8, !tbaa !8
  %90 = icmp slt i64 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %169

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

93:                                               ; preds = %162, %92
  %94 = load i64, ptr %13, align 8, !tbaa !8
  %95 = icmp slt i64 %94, 4
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %165

97:                                               ; preds = %93
  %98 = load i64, ptr %11, align 8, !tbaa !8
  %99 = icmp ne i64 %98, 0
  br i1 %99, label %100, label %117

100:                                              ; preds = %97
  %101 = load i64, ptr %11, align 8, !tbaa !8
  %102 = sub nsw i64 %101, 1
  %103 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %102
  %104 = load i64, ptr %12, align 8, !tbaa !8
  %105 = getelementptr inbounds [1001 x [4 x i64]], ptr %103, i64 0, i64 %104
  %106 = load i64, ptr %13, align 8, !tbaa !8
  %107 = getelementptr inbounds [4 x i64], ptr %105, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !8
  %109 = load i64, ptr %11, align 8, !tbaa !8
  %110 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %109
  %111 = load i64, ptr %12, align 8, !tbaa !8
  %112 = getelementptr inbounds [1001 x [4 x i64]], ptr %110, i64 0, i64 %111
  %113 = load i64, ptr %13, align 8, !tbaa !8
  %114 = getelementptr inbounds [4 x i64], ptr %112, i64 0, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !8
  %116 = xor i64 %115, %108
  store i64 %116, ptr %114, align 8, !tbaa !8
  br label %117

117:                                              ; preds = %100, %97
  %118 = load i64, ptr %12, align 8, !tbaa !8
  %119 = icmp ne i64 %118, 0
  br i1 %119, label %120, label %137

120:                                              ; preds = %117
  %121 = load i64, ptr %11, align 8, !tbaa !8
  %122 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %121
  %123 = load i64, ptr %12, align 8, !tbaa !8
  %124 = sub nsw i64 %123, 1
  %125 = getelementptr inbounds [1001 x [4 x i64]], ptr %122, i64 0, i64 %124
  %126 = load i64, ptr %13, align 8, !tbaa !8
  %127 = getelementptr inbounds [4 x i64], ptr %125, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !8
  %129 = load i64, ptr %11, align 8, !tbaa !8
  %130 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %129
  %131 = load i64, ptr %12, align 8, !tbaa !8
  %132 = getelementptr inbounds [1001 x [4 x i64]], ptr %130, i64 0, i64 %131
  %133 = load i64, ptr %13, align 8, !tbaa !8
  %134 = getelementptr inbounds [4 x i64], ptr %132, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !8
  %136 = xor i64 %135, %128
  store i64 %136, ptr %134, align 8, !tbaa !8
  br label %137

137:                                              ; preds = %120, %117
  %138 = load i64, ptr %11, align 8, !tbaa !8
  %139 = icmp ne i64 %138, 0
  br i1 %139, label %140, label %161

140:                                              ; preds = %137
  %141 = load i64, ptr %12, align 8, !tbaa !8
  %142 = icmp ne i64 %141, 0
  br i1 %142, label %143, label %161

143:                                              ; preds = %140
  %144 = load i64, ptr %11, align 8, !tbaa !8
  %145 = sub nsw i64 %144, 1
  %146 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %145
  %147 = load i64, ptr %12, align 8, !tbaa !8
  %148 = sub nsw i64 %147, 1
  %149 = getelementptr inbounds [1001 x [4 x i64]], ptr %146, i64 0, i64 %148
  %150 = load i64, ptr %13, align 8, !tbaa !8
  %151 = getelementptr inbounds [4 x i64], ptr %149, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !8
  %153 = load i64, ptr %11, align 8, !tbaa !8
  %154 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %153
  %155 = load i64, ptr %12, align 8, !tbaa !8
  %156 = getelementptr inbounds [1001 x [4 x i64]], ptr %154, i64 0, i64 %155
  %157 = load i64, ptr %13, align 8, !tbaa !8
  %158 = getelementptr inbounds [4 x i64], ptr %156, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !8
  %160 = xor i64 %159, %152
  store i64 %160, ptr %158, align 8, !tbaa !8
  br label %161

161:                                              ; preds = %143, %140, %137
  br label %162

162:                                              ; preds = %161
  %163 = load i64, ptr %13, align 8, !tbaa !8
  %164 = add nsw i64 %163, 1
  store i64 %164, ptr %13, align 8, !tbaa !8
  br label %93, !llvm.loop !14

165:                                              ; preds = %96
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %12, align 8, !tbaa !8
  %168 = add nsw i64 %167, 1
  store i64 %168, ptr %12, align 8, !tbaa !8
  br label %87, !llvm.loop !15

169:                                              ; preds = %91
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %11, align 8, !tbaa !8
  %172 = add nsw i64 %171, 1
  store i64 %172, ptr %11, align 8, !tbaa !8
  br label %81, !llvm.loop !16

173:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %174

174:                                              ; preds = %359, %173
  %175 = load i64, ptr %15, align 8, !tbaa !8
  %176 = load i64, ptr @N, align 8, !tbaa !8
  %177 = icmp slt i64 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %362

179:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !8
  br label %180

180:                                              ; preds = %231, %179
  %181 = load i64, ptr %16, align 8, !tbaa !8
  %182 = load i64, ptr %15, align 8, !tbaa !8
  %183 = icmp slt i64 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %234

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

186:                                              ; preds = %227, %185
  %187 = load i64, ptr %17, align 8, !tbaa !8
  %188 = icmp slt i64 %187, 4
  br i1 %188, label %190, label %189

189:                                              ; preds = %186
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %230

190:                                              ; preds = %186
  br label %191

191:                                              ; preds = %198, %190
  %192 = load i64, ptr %17, align 8, !tbaa !8
  %193 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 %192
  %194 = load i64, ptr %16, align 8, !tbaa !8
  %195 = getelementptr inbounds [151 x i64], ptr %193, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !8
  %197 = icmp sgt i64 %196, 0
  br i1 %197, label %198, label %218

198:                                              ; preds = %191
  %199 = load i64, ptr %17, align 8, !tbaa !8
  %200 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 %199
  %201 = load i64, ptr %16, align 8, !tbaa !8
  %202 = getelementptr inbounds [151 x [65536 x i64]], ptr %200, i64 0, i64 %201
  %203 = load i64, ptr %17, align 8, !tbaa !8
  %204 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 %203
  %205 = load i64, ptr %16, align 8, !tbaa !8
  %206 = getelementptr inbounds [151 x [1001 x i64]], ptr %204, i64 0, i64 %205
  %207 = load i64, ptr %17, align 8, !tbaa !8
  %208 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 %207
  %209 = load i64, ptr %16, align 8, !tbaa !8
  %210 = getelementptr inbounds [151 x i64], ptr %208, i64 0, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !8
  %212 = add nsw i64 %211, -1
  store i64 %212, ptr %210, align 8, !tbaa !8
  %213 = getelementptr inbounds [1001 x i64], ptr %206, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !8
  %215 = getelementptr inbounds [65536 x i64], ptr %202, i64 0, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !8
  %217 = add nsw i64 %216, -1
  store i64 %217, ptr %215, align 8, !tbaa !8
  br label %191, !llvm.loop !17

218:                                              ; preds = %191
  %219 = load i64, ptr %17, align 8, !tbaa !8
  %220 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 %219
  %221 = load i64, ptr %16, align 8, !tbaa !8
  %222 = getelementptr inbounds [151 x i64], ptr %220, i64 0, i64 %221
  store i64 -1, ptr %222, align 8, !tbaa !8
  %223 = load i64, ptr %17, align 8, !tbaa !8
  %224 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 %223
  %225 = load i64, ptr %16, align 8, !tbaa !8
  %226 = getelementptr inbounds [151 x i64], ptr %224, i64 0, i64 %225
  store i64 0, ptr %226, align 8, !tbaa !8
  br label %227

227:                                              ; preds = %218
  %228 = load i64, ptr %17, align 8, !tbaa !8
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %17, align 8, !tbaa !8
  br label %186, !llvm.loop !18

230:                                              ; preds = %189
  br label %231

231:                                              ; preds = %230
  %232 = load i64, ptr %16, align 8, !tbaa !8
  %233 = add nsw i64 %232, 1
  store i64 %233, ptr %16, align 8, !tbaa !8
  br label %180, !llvm.loop !19

234:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !8
  br label %235

235:                                              ; preds = %355, %234
  %236 = load i64, ptr %18, align 8, !tbaa !8
  %237 = load i64, ptr @M, align 8, !tbaa !8
  %238 = icmp slt i64 %236, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %235
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %358

240:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !8
  br label %241

241:                                              ; preds = %295, %240
  %242 = load i64, ptr %19, align 8, !tbaa !8
  %243 = load i64, ptr %15, align 8, !tbaa !8
  %244 = icmp slt i64 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %298

246:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %247

247:                                              ; preds = %291, %246
  %248 = load i64, ptr %20, align 8, !tbaa !8
  %249 = icmp slt i64 %248, 4
  br i1 %249, label %251, label %250

250:                                              ; preds = %247
  store i32 34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %294

251:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %252 = load i64, ptr %20, align 8, !tbaa !8
  %253 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 %252
  %254 = load i64, ptr %19, align 8, !tbaa !8
  %255 = getelementptr inbounds [151 x i64], ptr %253, i64 0, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !8
  store i64 %256, ptr %21, align 8, !tbaa !8
  %257 = load i64, ptr %21, align 8, !tbaa !8
  %258 = xor i64 %257, -1
  %259 = icmp ne i64 %258, 0
  br i1 %259, label %260, label %281

260:                                              ; preds = %251
  %261 = load i64, ptr %20, align 8, !tbaa !8
  %262 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 %261
  %263 = load i64, ptr %19, align 8, !tbaa !8
  %264 = getelementptr inbounds [151 x [65536 x i64]], ptr %262, i64 0, i64 %263
  %265 = load i64, ptr %21, align 8, !tbaa !8
  %266 = getelementptr inbounds [65536 x i64], ptr %264, i64 0, i64 %265
  %267 = load i64, ptr %266, align 8, !tbaa !8
  %268 = add nsw i64 %267, 1
  store i64 %268, ptr %266, align 8, !tbaa !8
  %269 = load i64, ptr %21, align 8, !tbaa !8
  %270 = load i64, ptr %20, align 8, !tbaa !8
  %271 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 %270
  %272 = load i64, ptr %19, align 8, !tbaa !8
  %273 = getelementptr inbounds [151 x [1001 x i64]], ptr %271, i64 0, i64 %272
  %274 = load i64, ptr %20, align 8, !tbaa !8
  %275 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 %274
  %276 = load i64, ptr %19, align 8, !tbaa !8
  %277 = getelementptr inbounds [151 x i64], ptr %275, i64 0, i64 %276
  %278 = load i64, ptr %277, align 8, !tbaa !8
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %277, align 8, !tbaa !8
  %280 = getelementptr inbounds [1001 x i64], ptr %273, i64 0, i64 %278
  store i64 %269, ptr %280, align 8, !tbaa !8
  br label %281

281:                                              ; preds = %260, %251
  %282 = load i64, ptr %20, align 8, !tbaa !8
  %283 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 %282
  %284 = load i64, ptr %19, align 8, !tbaa !8
  %285 = getelementptr inbounds [151 x i64], ptr %283, i64 0, i64 %284
  %286 = load i64, ptr %285, align 8, !tbaa !8
  %287 = load i64, ptr %20, align 8, !tbaa !8
  %288 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 %287
  %289 = load i64, ptr %19, align 8, !tbaa !8
  %290 = getelementptr inbounds [151 x i64], ptr %288, i64 0, i64 %289
  store i64 %286, ptr %290, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %291

291:                                              ; preds = %281
  %292 = load i64, ptr %20, align 8, !tbaa !8
  %293 = add nsw i64 %292, 1
  store i64 %293, ptr %20, align 8, !tbaa !8
  br label %247, !llvm.loop !20

294:                                              ; preds = %250
  br label %295

295:                                              ; preds = %294
  %296 = load i64, ptr %19, align 8, !tbaa !8
  %297 = add nsw i64 %296, 1
  store i64 %297, ptr %19, align 8, !tbaa !8
  br label %241, !llvm.loop !21

298:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !8
  br label %299

299:                                              ; preds = %351, %298
  %300 = load i64, ptr %22, align 8, !tbaa !8
  %301 = load i64, ptr %15, align 8, !tbaa !8
  %302 = icmp slt i64 %300, %301
  br i1 %302, label %304, label %303

303:                                              ; preds = %299
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %354

304:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 1000000000, ptr %23, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 0, ptr %24, align 8, !tbaa !8
  br label %305

305:                                              ; preds = %344, %304
  %306 = load i64, ptr %24, align 8, !tbaa !8
  %307 = icmp slt i64 %306, 4
  br i1 %307, label %309, label %308

308:                                              ; preds = %305
  store i32 40, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %347

309:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %310 = load i64, ptr %15, align 8, !tbaa !8
  %311 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %310
  %312 = load i64, ptr %18, align 8, !tbaa !8
  %313 = getelementptr inbounds [1001 x [4 x i64]], ptr %311, i64 0, i64 %312
  %314 = load i64, ptr %24, align 8, !tbaa !8
  %315 = getelementptr inbounds [4 x i64], ptr %313, i64 0, i64 %314
  %316 = load i64, ptr %315, align 8, !tbaa !8
  store i64 %316, ptr %25, align 8, !tbaa !8
  %317 = load i64, ptr %22, align 8, !tbaa !8
  %318 = icmp ne i64 %317, 0
  br i1 %318, label %319, label %330

319:                                              ; preds = %309
  %320 = load i64, ptr %22, align 8, !tbaa !8
  %321 = sub nsw i64 %320, 1
  %322 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %321
  %323 = load i64, ptr %18, align 8, !tbaa !8
  %324 = getelementptr inbounds [1001 x [4 x i64]], ptr %322, i64 0, i64 %323
  %325 = load i64, ptr %24, align 8, !tbaa !8
  %326 = getelementptr inbounds [4 x i64], ptr %324, i64 0, i64 %325
  %327 = load i64, ptr %326, align 8, !tbaa !8
  %328 = load i64, ptr %25, align 8, !tbaa !8
  %329 = xor i64 %328, %327
  store i64 %329, ptr %25, align 8, !tbaa !8
  br label %330

330:                                              ; preds = %319, %309
  %331 = load i64, ptr %25, align 8, !tbaa !8
  %332 = load i64, ptr %24, align 8, !tbaa !8
  %333 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 %332
  %334 = load i64, ptr %22, align 8, !tbaa !8
  %335 = getelementptr inbounds [151 x i64], ptr %333, i64 0, i64 %334
  store i64 %331, ptr %335, align 8, !tbaa !8
  %336 = load i64, ptr %24, align 8, !tbaa !8
  %337 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 %336
  %338 = load i64, ptr %22, align 8, !tbaa !8
  %339 = getelementptr inbounds [151 x [65536 x i64]], ptr %337, i64 0, i64 %338
  %340 = load i64, ptr %25, align 8, !tbaa !8
  %341 = getelementptr inbounds [65536 x i64], ptr %339, i64 0, i64 %340
  %342 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %341)
  %343 = load i64, ptr %342, align 8, !tbaa !8
  store i64 %343, ptr %23, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %344

344:                                              ; preds = %330
  %345 = load i64, ptr %24, align 8, !tbaa !8
  %346 = add nsw i64 %345, 1
  store i64 %346, ptr %24, align 8, !tbaa !8
  br label %305, !llvm.loop !22

347:                                              ; preds = %308
  %348 = load i64, ptr %23, align 8, !tbaa !8
  %349 = load i64, ptr %14, align 8, !tbaa !8
  %350 = add nsw i64 %349, %348
  store i64 %350, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %351

351:                                              ; preds = %347
  %352 = load i64, ptr %22, align 8, !tbaa !8
  %353 = add nsw i64 %352, 1
  store i64 %353, ptr %22, align 8, !tbaa !8
  br label %299, !llvm.loop !23

354:                                              ; preds = %303
  br label %355

355:                                              ; preds = %354
  %356 = load i64, ptr %18, align 8, !tbaa !8
  %357 = add nsw i64 %356, 1
  store i64 %357, ptr %18, align 8, !tbaa !8
  br label %235, !llvm.loop !24

358:                                              ; preds = %239
  br label %359

359:                                              ; preds = %358
  %360 = load i64, ptr %15, align 8, !tbaa !8
  %361 = add nsw i64 %360, 1
  store i64 %361, ptr %15, align 8, !tbaa !8
  br label %174, !llvm.loop !25

362:                                              ; preds = %178
  %363 = load i64, ptr %14, align 8, !tbaa !8
  %364 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %363)
  %365 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %364, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %366 = load i32, ptr %1, align 4
  ret i32 %366
}

; 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: mustprogress uwtable
declare dso_local void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #3 align 2

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

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

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

; 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = 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}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !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::mersenne_twister_engine" = type { [624 x i64], i64 }
%"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::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<long long>::param_type" }
%"struct.std::uniform_int_distribution<long long>::param_type" = type { i64, i64 }

@rng = external dso_local global %"class.std::mersenne_twister_engine", align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@B = external dso_local local_unnamed_addr global [151 x [1001 x [4 x i64]]], align 16
@cnt = external dso_local global [4 x [151 x [65536 x i64]]], align 16
@tupd = external dso_local local_unnamed_addr global [4 x [151 x [1001 x i64]]], align 16
@tpt = external dso_local local_unnamed_addr global [4 x [151 x i64]], align 16
@q1 = external dso_local local_unnamed_addr global [4 x [151 x i64]], align 16
@q2 = external dso_local local_unnamed_addr global [4 x [151 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::uniform_int_distribution", align 8
  %6 = alloca i64, align 8
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = 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) @N)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %16 = load i64, ptr @N, align 8, !tbaa !8
  %17 = add nsw i64 %16, 1
  store i64 %17, ptr @N, align 8, !tbaa !8
  %18 = load i64, ptr @M, align 8, !tbaa !8
  %19 = add nsw i64 %18, 1
  store i64 %19, ptr @M, align 8, !tbaa !8
  %20 = load i64, ptr @K, align 8, !tbaa !8
  %21 = icmp sgt i64 %20, 0
  br i1 %21, label %.lr.ph, label %.preheader126

.preheader126.loopexit:                           ; preds = %.lr.ph
  %.pre = load i64, ptr @N, align 8, !tbaa !8
  br label %.preheader126

.preheader126:                                    ; preds = %.preheader126.loopexit, %0
  %22 = phi i64 [ %.pre, %.preheader126.loopexit ], [ %17, %0 ]
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.preheader125.lr.ph, label %._crit_edge167

.preheader125.lr.ph:                              ; preds = %.preheader126
  %24 = load i64, ptr @M, align 8, !tbaa !8
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.preheader125.us.preheader, label %.preheader122.preheader

.preheader125.us.preheader:                       ; preds = %.preheader125.lr.ph
  %exitcond.peel.not = icmp eq i64 %24, 1
  %exitcond183.peel.not = icmp eq i64 %24, 1
  br label %.preheader125.us

.preheader125.us:                                 ; preds = %.preheader125.us.preheader, %._crit_edge.us
  %.0112136.us = phi i64 [ %49, %._crit_edge.us ], [ 0, %.preheader125.us.preheader ]
  %.not169 = icmp eq i64 %.0112136.us, 0
  %26 = add nsw i64 %.0112136.us, -1
  br i1 %.not169, label %.split.split.us.peel, label %.split.us.us.us.peel

.split.us.us.us.peel:                             ; preds = %.preheader125.us
  %27 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 0, i64 0
  %28 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 0, i64 0
  %29 = load <2 x i64>, ptr %27, align 16, !tbaa !8
  %30 = load <2 x i64>, ptr %28, align 16, !tbaa !8
  %31 = xor <2 x i64> %30, %29
  store <2 x i64> %31, ptr %28, align 16, !tbaa !8
  %32 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 0, i64 2
  %33 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 0, i64 2
  %34 = load <2 x i64>, ptr %32, align 16, !tbaa !8
  %35 = load <2 x i64>, ptr %33, align 16, !tbaa !8
  %36 = xor <2 x i64> %35, %34
  store <2 x i64> %36, ptr %33, align 16, !tbaa !8
  br i1 %exitcond.peel.not, label %._crit_edge.us, label %.split.us.us.us

.split.split.us.peel:                             ; preds = %.preheader125.us
  br i1 %exitcond183.peel.not, label %._crit_edge.us, label %.split.split.us

.split.split.us:                                  ; preds = %.split.split.us.peel, %.split.split.us
  %.0111132.us141 = phi i64 [ %48, %.split.split.us ], [ 1, %.split.split.us.peel ]
  %37 = add nsw i64 %.0111132.us141, -1
  %38 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 0, i64 %37, i64 0
  %39 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 0, i64 %.0111132.us141, i64 0
  %40 = load <2 x i64>, ptr %38, align 16, !tbaa !8
  %41 = load <2 x i64>, ptr %39, align 16, !tbaa !8
  %42 = xor <2 x i64> %41, %40
  store <2 x i64> %42, ptr %39, align 16, !tbaa !8
  %43 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 0, i64 %37, i64 2
  %44 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 0, i64 %.0111132.us141, i64 2
  %45 = load <2 x i64>, ptr %43, align 16, !tbaa !8
  %46 = load <2 x i64>, ptr %44, align 16, !tbaa !8
  %47 = xor <2 x i64> %46, %45
  store <2 x i64> %47, ptr %44, align 16, !tbaa !8
  %48 = add nuw nsw i64 %.0111132.us141, 1
  %exitcond183.not = icmp eq i64 %48, %24
  br i1 %exitcond183.not, label %._crit_edge.us, label %.split.split.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %.split.us.us.us, %.split.split.us, %.split.us.us.us.peel, %.split.split.us.peel
  %49 = add nuw nsw i64 %.0112136.us, 1
  %exitcond185.not = icmp eq i64 %49, %22
  br i1 %exitcond185.not, label %.preheader123, label %.preheader125.us, !llvm.loop !14

.split.us.us.us:                                  ; preds = %.split.us.us.us.peel, %.split.us.us.us
  %.0111132.us.us = phi i64 [ %73, %.split.us.us.us ], [ 1, %.split.us.us.us.peel ]
  %50 = add nsw i64 %.0111132.us.us, -1
  %51 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 %.0111132.us.us, i64 0
  %52 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 %.0111132.us.us, i64 0
  %53 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 %50, i64 0
  %54 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 %50, i64 0
  %55 = load <2 x i64>, ptr %51, align 16, !tbaa !8
  %56 = load <2 x i64>, ptr %52, align 16, !tbaa !8
  %57 = xor <2 x i64> %56, %55
  %58 = load <2 x i64>, ptr %53, align 16, !tbaa !8
  %59 = xor <2 x i64> %57, %58
  %60 = load <2 x i64>, ptr %54, align 16, !tbaa !8
  %61 = xor <2 x i64> %59, %60
  store <2 x i64> %61, ptr %52, align 16, !tbaa !8
  %62 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 %.0111132.us.us, i64 2
  %63 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 %.0111132.us.us, i64 2
  %64 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0112136.us, i64 %50, i64 2
  %65 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %26, i64 %50, i64 2
  %66 = load <2 x i64>, ptr %62, align 16, !tbaa !8
  %67 = load <2 x i64>, ptr %63, align 16, !tbaa !8
  %68 = xor <2 x i64> %67, %66
  %69 = load <2 x i64>, ptr %64, align 16, !tbaa !8
  %70 = xor <2 x i64> %68, %69
  %71 = load <2 x i64>, ptr %65, align 16, !tbaa !8
  %72 = xor <2 x i64> %70, %71
  store <2 x i64> %72, ptr %63, align 16, !tbaa !8
  %73 = add nuw nsw i64 %.0111132.us.us, 1
  %exitcond.not = icmp eq i64 %73, %24
  br i1 %exitcond.not, label %._crit_edge.us, label %.split.us.us.us, !llvm.loop !15

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.0102128 = phi i64 [ %122, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %75 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %75, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %76, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0, i64 noundef 65535)
  %78 = call noundef i64 @_ZNSt24uniform_int_distributionIxEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEExRT_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(5000) @rng)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %79 = load i64, ptr %1, align 8, !tbaa !8
  %80 = load i64, ptr %2, align 8, !tbaa !8
  %81 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %79, i64 %80, i64 0
  %82 = load i64, ptr %81, align 16, !tbaa !8
  %83 = xor i64 %82, %78
  store i64 %83, ptr %81, align 16, !tbaa !8
  %84 = load i64, ptr %3, align 8, !tbaa !8
  %85 = load i64, ptr %4, align 8, !tbaa !8
  %86 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %84, i64 %85, i64 0
  %87 = load i64, ptr %86, align 16, !tbaa !8
  %88 = xor i64 %87, %78
  store i64 %88, ptr %86, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0, i64 noundef 65535)
  %89 = call noundef i64 @_ZNSt24uniform_int_distributionIxEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEExRT_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(5000) @rng)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %90 = load i64, ptr %1, align 8, !tbaa !8
  %91 = load i64, ptr %2, align 8, !tbaa !8
  %92 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %90, i64 %91, i64 1
  %93 = load i64, ptr %92, align 8, !tbaa !8
  %94 = xor i64 %93, %89
  store i64 %94, ptr %92, align 8, !tbaa !8
  %95 = load i64, ptr %3, align 8, !tbaa !8
  %96 = load i64, ptr %4, align 8, !tbaa !8
  %97 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %95, i64 %96, i64 1
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = xor i64 %98, %89
  store i64 %99, ptr %97, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0, i64 noundef 65535)
  %100 = call noundef i64 @_ZNSt24uniform_int_distributionIxEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEExRT_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(5000) @rng)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %101 = load i64, ptr %1, align 8, !tbaa !8
  %102 = load i64, ptr %2, align 8, !tbaa !8
  %103 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %101, i64 %102, i64 2
  %104 = load i64, ptr %103, align 16, !tbaa !8
  %105 = xor i64 %104, %100
  store i64 %105, ptr %103, align 16, !tbaa !8
  %106 = load i64, ptr %3, align 8, !tbaa !8
  %107 = load i64, ptr %4, align 8, !tbaa !8
  %108 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %106, i64 %107, i64 2
  %109 = load i64, ptr %108, align 16, !tbaa !8
  %110 = xor i64 %109, %100
  store i64 %110, ptr %108, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 0, i64 noundef 65535)
  %111 = call noundef i64 @_ZNSt24uniform_int_distributionIxEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEExRT_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(5000) @rng)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %112 = load i64, ptr %1, align 8, !tbaa !8
  %113 = load i64, ptr %2, align 8, !tbaa !8
  %114 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %112, i64 %113, i64 3
  %115 = load i64, ptr %114, align 8, !tbaa !8
  %116 = xor i64 %115, %111
  store i64 %116, ptr %114, align 8, !tbaa !8
  %117 = load i64, ptr %3, align 8, !tbaa !8
  %118 = load i64, ptr %4, align 8, !tbaa !8
  %119 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %117, i64 %118, i64 3
  %120 = load i64, ptr %119, align 8, !tbaa !8
  %121 = xor i64 %120, %111
  store i64 %121, ptr %119, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %122 = add nuw nsw i64 %.0102128, 1
  %123 = load i64, ptr @K, align 8, !tbaa !8
  %124 = icmp slt i64 %122, %123
  br i1 %124, label %.lr.ph, label %.preheader126.loopexit, !llvm.loop !16

.preheader123:                                    ; preds = %._crit_edge.us
  br i1 %23, label %.preheader122.preheader, label %._crit_edge167

.preheader122.preheader:                          ; preds = %.preheader125.lr.ph, %.preheader123
  br label %.preheader122

.preheader122:                                    ; preds = %.preheader122.preheader, %._crit_edge163
  %125 = phi i64 [ %233, %._crit_edge163 ], [ %22, %.preheader122.preheader ]
  %.0108166 = phi i64 [ %234, %._crit_edge163 ], [ 0, %.preheader122.preheader ]
  %.0109165 = phi i64 [ %.1.lcssa, %._crit_edge163 ], [ 0, %.preheader122.preheader ]
  %.not172 = icmp eq i64 %.0108166, 0
  br i1 %.not172, label %.preheader121, label %.preheader120

._crit_edge167:                                   ; preds = %._crit_edge163, %.preheader126, %.preheader123
  %.0109.lcssa = phi i64 [ 0, %.preheader123 ], [ 0, %.preheader126 ], [ %.1.lcssa, %._crit_edge163 ]
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.0109.lcssa)
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %126, i8 noundef signext 10)
  ret i32 0

.preheader121:                                    ; preds = %228, %.preheader122
  %128 = load i64, ptr @M, align 8, !tbaa !8
  %129 = icmp sgt i64 %128, 0
  br i1 %129, label %.preheader119.lr.ph, label %._crit_edge163

.preheader119.lr.ph:                              ; preds = %.preheader121
  %exitcond192.peel.not = icmp eq i64 %.0108166, 1
  br label %.preheader119

.preheader120:                                    ; preds = %.preheader122, %228
  %.0107151 = phi i64 [ %231, %228 ], [ 0, %.preheader122 ]
  %130 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 0, i64 %.0107151
  %.promoted = load i64, ptr %130, align 8, !tbaa !8
  %131 = icmp sgt i64 %.promoted, 0
  br i1 %131, label %.lr.ph149.preheader, label %.preheader117.1

.lr.ph149.preheader:                              ; preds = %.preheader120
  %xtraiter = and i64 %.promoted, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph149.prol.loopexit, label %.lr.ph149.prol

.lr.ph149.prol:                                   ; preds = %.lr.ph149.preheader
  %132 = add nsw i64 %.promoted, -1
  %133 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 0, i64 %.0107151, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !8
  %135 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 %.0107151, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !8
  %137 = add nsw i64 %136, -1
  store i64 %137, ptr %135, align 8, !tbaa !8
  br label %.lr.ph149.prol.loopexit

.lr.ph149.prol.loopexit:                          ; preds = %.lr.ph149.prol, %.lr.ph149.preheader
  %.unr = phi i64 [ %.promoted, %.lr.ph149.preheader ], [ %132, %.lr.ph149.prol ]
  %138 = icmp eq i64 %.promoted, 1
  br i1 %138, label %._crit_edge, label %.lr.ph149

.lr.ph149:                                        ; preds = %.lr.ph149.prol.loopexit, %.lr.ph149
  %139 = phi i64 [ %146, %.lr.ph149 ], [ %.unr, %.lr.ph149.prol.loopexit ]
  %140 = add nsw i64 %139, -1
  %141 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 0, i64 %.0107151, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !8
  %143 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 %.0107151, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !8
  %145 = add nsw i64 %144, -1
  store i64 %145, ptr %143, align 8, !tbaa !8
  %146 = add nsw i64 %139, -2
  %147 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 0, i64 %.0107151, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !8
  %149 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 %.0107151, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = add nsw i64 %150, -1
  store i64 %151, ptr %149, align 8, !tbaa !8
  %152 = icmp ugt i64 %140, 1
  br i1 %152, label %.lr.ph149, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph149, %.lr.ph149.prol.loopexit
  store i64 0, ptr %130, align 8, !tbaa !8
  br label %.preheader117.1

.preheader117.1:                                  ; preds = %._crit_edge, %.preheader120
  %153 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 0, i64 %.0107151
  store i64 -1, ptr %153, align 8, !tbaa !8
  %154 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 0, i64 %.0107151
  store i64 0, ptr %154, align 8, !tbaa !8
  %155 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 1, i64 %.0107151
  %.promoted.1 = load i64, ptr %155, align 8, !tbaa !8
  %156 = icmp sgt i64 %.promoted.1, 0
  br i1 %156, label %.lr.ph149.1.preheader, label %.preheader117.2

.lr.ph149.1.preheader:                            ; preds = %.preheader117.1
  %xtraiter201 = and i64 %.promoted.1, 1
  %lcmp.mod202.not = icmp eq i64 %xtraiter201, 0
  br i1 %lcmp.mod202.not, label %.lr.ph149.1.prol.loopexit, label %.lr.ph149.1.prol

.lr.ph149.1.prol:                                 ; preds = %.lr.ph149.1.preheader
  %157 = add nsw i64 %.promoted.1, -1
  %158 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 1, i64 %.0107151, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !8
  %160 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 %.0107151, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !8
  %162 = add nsw i64 %161, -1
  store i64 %162, ptr %160, align 8, !tbaa !8
  br label %.lr.ph149.1.prol.loopexit

.lr.ph149.1.prol.loopexit:                        ; preds = %.lr.ph149.1.prol, %.lr.ph149.1.preheader
  %.unr203 = phi i64 [ %.promoted.1, %.lr.ph149.1.preheader ], [ %157, %.lr.ph149.1.prol ]
  %163 = icmp eq i64 %.promoted.1, 1
  br i1 %163, label %._crit_edge.1, label %.lr.ph149.1

.lr.ph149.1:                                      ; preds = %.lr.ph149.1.prol.loopexit, %.lr.ph149.1
  %164 = phi i64 [ %171, %.lr.ph149.1 ], [ %.unr203, %.lr.ph149.1.prol.loopexit ]
  %165 = add nsw i64 %164, -1
  %166 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 1, i64 %.0107151, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !8
  %168 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 %.0107151, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !8
  %170 = add nsw i64 %169, -1
  store i64 %170, ptr %168, align 8, !tbaa !8
  %171 = add nsw i64 %164, -2
  %172 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 1, i64 %.0107151, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !8
  %174 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 %.0107151, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !8
  %176 = add nsw i64 %175, -1
  store i64 %176, ptr %174, align 8, !tbaa !8
  %177 = icmp ugt i64 %165, 1
  br i1 %177, label %.lr.ph149.1, label %._crit_edge.1, !llvm.loop !17

._crit_edge.1:                                    ; preds = %.lr.ph149.1, %.lr.ph149.1.prol.loopexit
  store i64 0, ptr %155, align 8, !tbaa !8
  br label %.preheader117.2

.preheader117.2:                                  ; preds = %._crit_edge.1, %.preheader117.1
  %178 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 1, i64 %.0107151
  store i64 -1, ptr %178, align 8, !tbaa !8
  %179 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 1, i64 %.0107151
  store i64 0, ptr %179, align 8, !tbaa !8
  %180 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 2, i64 %.0107151
  %.promoted.2 = load i64, ptr %180, align 8, !tbaa !8
  %181 = icmp sgt i64 %.promoted.2, 0
  br i1 %181, label %.lr.ph149.2.preheader, label %.preheader117.3

.lr.ph149.2.preheader:                            ; preds = %.preheader117.2
  %xtraiter204 = and i64 %.promoted.2, 1
  %lcmp.mod205.not = icmp eq i64 %xtraiter204, 0
  br i1 %lcmp.mod205.not, label %.lr.ph149.2.prol.loopexit, label %.lr.ph149.2.prol

.lr.ph149.2.prol:                                 ; preds = %.lr.ph149.2.preheader
  %182 = add nsw i64 %.promoted.2, -1
  %183 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 2, i64 %.0107151, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !8
  %185 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 %.0107151, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !8
  %187 = add nsw i64 %186, -1
  store i64 %187, ptr %185, align 8, !tbaa !8
  br label %.lr.ph149.2.prol.loopexit

.lr.ph149.2.prol.loopexit:                        ; preds = %.lr.ph149.2.prol, %.lr.ph149.2.preheader
  %.unr206 = phi i64 [ %.promoted.2, %.lr.ph149.2.preheader ], [ %182, %.lr.ph149.2.prol ]
  %188 = icmp eq i64 %.promoted.2, 1
  br i1 %188, label %._crit_edge.2, label %.lr.ph149.2

.lr.ph149.2:                                      ; preds = %.lr.ph149.2.prol.loopexit, %.lr.ph149.2
  %189 = phi i64 [ %196, %.lr.ph149.2 ], [ %.unr206, %.lr.ph149.2.prol.loopexit ]
  %190 = add nsw i64 %189, -1
  %191 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 2, i64 %.0107151, i64 %190
  %192 = load i64, ptr %191, align 8, !tbaa !8
  %193 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 %.0107151, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !8
  %195 = add nsw i64 %194, -1
  store i64 %195, ptr %193, align 8, !tbaa !8
  %196 = add nsw i64 %189, -2
  %197 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 2, i64 %.0107151, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !8
  %199 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 %.0107151, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !8
  %201 = add nsw i64 %200, -1
  store i64 %201, ptr %199, align 8, !tbaa !8
  %202 = icmp ugt i64 %190, 1
  br i1 %202, label %.lr.ph149.2, label %._crit_edge.2, !llvm.loop !17

._crit_edge.2:                                    ; preds = %.lr.ph149.2, %.lr.ph149.2.prol.loopexit
  store i64 0, ptr %180, align 8, !tbaa !8
  br label %.preheader117.3

.preheader117.3:                                  ; preds = %._crit_edge.2, %.preheader117.2
  %203 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 2, i64 %.0107151
  store i64 -1, ptr %203, align 8, !tbaa !8
  %204 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 2, i64 %.0107151
  store i64 0, ptr %204, align 8, !tbaa !8
  %205 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 3, i64 %.0107151
  %.promoted.3 = load i64, ptr %205, align 8, !tbaa !8
  %206 = icmp sgt i64 %.promoted.3, 0
  br i1 %206, label %.lr.ph149.3.preheader, label %228

.lr.ph149.3.preheader:                            ; preds = %.preheader117.3
  %xtraiter207 = and i64 %.promoted.3, 1
  %lcmp.mod208.not = icmp eq i64 %xtraiter207, 0
  br i1 %lcmp.mod208.not, label %.lr.ph149.3.prol.loopexit, label %.lr.ph149.3.prol

.lr.ph149.3.prol:                                 ; preds = %.lr.ph149.3.preheader
  %207 = add nsw i64 %.promoted.3, -1
  %208 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 3, i64 %.0107151, i64 %207
  %209 = load i64, ptr %208, align 8, !tbaa !8
  %210 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 %.0107151, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !8
  %212 = add nsw i64 %211, -1
  store i64 %212, ptr %210, align 8, !tbaa !8
  br label %.lr.ph149.3.prol.loopexit

.lr.ph149.3.prol.loopexit:                        ; preds = %.lr.ph149.3.prol, %.lr.ph149.3.preheader
  %.unr209 = phi i64 [ %.promoted.3, %.lr.ph149.3.preheader ], [ %207, %.lr.ph149.3.prol ]
  %213 = icmp eq i64 %.promoted.3, 1
  br i1 %213, label %._crit_edge.3, label %.lr.ph149.3

.lr.ph149.3:                                      ; preds = %.lr.ph149.3.prol.loopexit, %.lr.ph149.3
  %214 = phi i64 [ %221, %.lr.ph149.3 ], [ %.unr209, %.lr.ph149.3.prol.loopexit ]
  %215 = add nsw i64 %214, -1
  %216 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 3, i64 %.0107151, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !8
  %218 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 %.0107151, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !8
  %220 = add nsw i64 %219, -1
  store i64 %220, ptr %218, align 8, !tbaa !8
  %221 = add nsw i64 %214, -2
  %222 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 3, i64 %.0107151, i64 %221
  %223 = load i64, ptr %222, align 8, !tbaa !8
  %224 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 %.0107151, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !8
  %226 = add nsw i64 %225, -1
  store i64 %226, ptr %224, align 8, !tbaa !8
  %227 = icmp ugt i64 %215, 1
  br i1 %227, label %.lr.ph149.3, label %._crit_edge.3, !llvm.loop !17

._crit_edge.3:                                    ; preds = %.lr.ph149.3, %.lr.ph149.3.prol.loopexit
  store i64 0, ptr %205, align 8, !tbaa !8
  br label %228

228:                                              ; preds = %._crit_edge.3, %.preheader117.3
  %229 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 3, i64 %.0107151
  store i64 -1, ptr %229, align 8, !tbaa !8
  %230 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 3, i64 %.0107151
  store i64 0, ptr %230, align 8, !tbaa !8
  %231 = add nuw nsw i64 %.0107151, 1
  %exitcond187.not = icmp eq i64 %231, %.0108166
  br i1 %exitcond187.not, label %.preheader121, label %.preheader120, !llvm.loop !18

.preheader119:                                    ; preds = %.preheader119.lr.ph, %._crit_edge160
  %232 = phi i64 [ %128, %.preheader119.lr.ph ], [ %314, %._crit_edge160 ]
  %.0105162 = phi i64 [ 0, %.preheader119.lr.ph ], [ %315, %._crit_edge160 ]
  %.1161 = phi i64 [ %.0109165, %.preheader119.lr.ph ], [ %.2.lcssa, %._crit_edge160 ]
  br i1 %.not172, label %._crit_edge160, label %.preheader

._crit_edge163.loopexit:                          ; preds = %._crit_edge160
  %.pre195 = load i64, ptr @N, align 8, !tbaa !8
  br label %._crit_edge163

._crit_edge163:                                   ; preds = %._crit_edge163.loopexit, %.preheader121
  %233 = phi i64 [ %125, %.preheader121 ], [ %.pre195, %._crit_edge163.loopexit ]
  %.1.lcssa = phi i64 [ %.0109165, %.preheader121 ], [ %.2.lcssa, %._crit_edge163.loopexit ]
  %234 = add nuw nsw i64 %.0108166, 1
  %235 = icmp slt i64 %234, %233
  br i1 %235, label %.preheader122, label %._crit_edge167, !llvm.loop !19

.split156.us.peel:                                ; preds = %310
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 1000000000, ptr %6, align 8, !tbaa !8
  %236 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 0
  %237 = load i64, ptr %236, align 16, !tbaa !8
  store i64 %237, ptr @q2, align 16, !tbaa !8
  %238 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 0, i64 %237
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %238)
  %240 = load i64, ptr %239, align 8, !tbaa !8
  store i64 %240, ptr %6, align 8, !tbaa !8
  %241 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 1
  %242 = load i64, ptr %241, align 8, !tbaa !8
  store i64 %242, ptr getelementptr inbounds (i8, ptr @q2, i64 1208), align 8, !tbaa !8
  %243 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 0, i64 %242
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %243)
  %245 = load i64, ptr %244, align 8, !tbaa !8
  store i64 %245, ptr %6, align 8, !tbaa !8
  %246 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 2
  %247 = load i64, ptr %246, align 16, !tbaa !8
  store i64 %247, ptr getelementptr inbounds (i8, ptr @q2, i64 2416), align 16, !tbaa !8
  %248 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 0, i64 %247
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %248)
  %250 = load i64, ptr %249, align 8, !tbaa !8
  store i64 %250, ptr %6, align 8, !tbaa !8
  %251 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 3
  %252 = load i64, ptr %251, align 8, !tbaa !8
  store i64 %252, ptr getelementptr inbounds (i8, ptr @q2, i64 3624), align 8, !tbaa !8
  %253 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 0, i64 %252
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %253)
  %255 = load i64, ptr %254, align 8, !tbaa !8
  %256 = add nsw i64 %255, %.1161
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br i1 %exitcond192.peel.not, label %._crit_edge160.loopexit, label %.lr.ph159.peel.next

.lr.ph159.peel.next:                              ; preds = %.split156.us.peel
  %257 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 0
  %258 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 1
  %259 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 2
  %260 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %.0108166, i64 %.0105162, i64 3
  br label %.split156.us

.preheader:                                       ; preds = %.preheader119, %310
  %.0104153 = phi i64 [ %313, %310 ], [ 0, %.preheader119 ]
  %261 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 0, i64 %.0104153
  %262 = load i64, ptr %261, align 8, !tbaa !8
  %.not115 = icmp eq i64 %262, -1
  br i1 %.not115, label %271, label %263

263:                                              ; preds = %.preheader
  %264 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 %.0104153, i64 %262
  %265 = load i64, ptr %264, align 8, !tbaa !8
  %266 = add nsw i64 %265, 1
  store i64 %266, ptr %264, align 8, !tbaa !8
  %267 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 0, i64 %.0104153
  %268 = load i64, ptr %267, align 8, !tbaa !8
  %269 = add nsw i64 %268, 1
  store i64 %269, ptr %267, align 8, !tbaa !8
  %270 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 0, i64 %.0104153, i64 %268
  store i64 %262, ptr %270, align 8, !tbaa !8
  br label %271

271:                                              ; preds = %263, %.preheader
  %272 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 0, i64 %.0104153
  %273 = load i64, ptr %272, align 8, !tbaa !8
  store i64 %273, ptr %261, align 8, !tbaa !8
  %274 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 1, i64 %.0104153
  %275 = load i64, ptr %274, align 8, !tbaa !8
  %.not115.1 = icmp eq i64 %275, -1
  br i1 %.not115.1, label %284, label %276

276:                                              ; preds = %271
  %277 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 %.0104153, i64 %275
  %278 = load i64, ptr %277, align 8, !tbaa !8
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %277, align 8, !tbaa !8
  %280 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 1, i64 %.0104153
  %281 = load i64, ptr %280, align 8, !tbaa !8
  %282 = add nsw i64 %281, 1
  store i64 %282, ptr %280, align 8, !tbaa !8
  %283 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 1, i64 %.0104153, i64 %281
  store i64 %275, ptr %283, align 8, !tbaa !8
  br label %284

284:                                              ; preds = %276, %271
  %285 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 1, i64 %.0104153
  %286 = load i64, ptr %285, align 8, !tbaa !8
  store i64 %286, ptr %274, align 8, !tbaa !8
  %287 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 2, i64 %.0104153
  %288 = load i64, ptr %287, align 8, !tbaa !8
  %.not115.2 = icmp eq i64 %288, -1
  br i1 %.not115.2, label %297, label %289

289:                                              ; preds = %284
  %290 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 %.0104153, i64 %288
  %291 = load i64, ptr %290, align 8, !tbaa !8
  %292 = add nsw i64 %291, 1
  store i64 %292, ptr %290, align 8, !tbaa !8
  %293 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 2, i64 %.0104153
  %294 = load i64, ptr %293, align 8, !tbaa !8
  %295 = add nsw i64 %294, 1
  store i64 %295, ptr %293, align 8, !tbaa !8
  %296 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 2, i64 %.0104153, i64 %294
  store i64 %288, ptr %296, align 8, !tbaa !8
  br label %297

297:                                              ; preds = %289, %284
  %298 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 2, i64 %.0104153
  %299 = load i64, ptr %298, align 8, !tbaa !8
  store i64 %299, ptr %287, align 8, !tbaa !8
  %300 = getelementptr inbounds [4 x [151 x i64]], ptr @q1, i64 0, i64 3, i64 %.0104153
  %301 = load i64, ptr %300, align 8, !tbaa !8
  %.not115.3 = icmp eq i64 %301, -1
  br i1 %.not115.3, label %310, label %302

302:                                              ; preds = %297
  %303 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 %.0104153, i64 %301
  %304 = load i64, ptr %303, align 8, !tbaa !8
  %305 = add nsw i64 %304, 1
  store i64 %305, ptr %303, align 8, !tbaa !8
  %306 = getelementptr inbounds [4 x [151 x i64]], ptr @tpt, i64 0, i64 3, i64 %.0104153
  %307 = load i64, ptr %306, align 8, !tbaa !8
  %308 = add nsw i64 %307, 1
  store i64 %308, ptr %306, align 8, !tbaa !8
  %309 = getelementptr inbounds [4 x [151 x [1001 x i64]]], ptr @tupd, i64 0, i64 3, i64 %.0104153, i64 %307
  store i64 %301, ptr %309, align 8, !tbaa !8
  br label %310

310:                                              ; preds = %302, %297
  %311 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 3, i64 %.0104153
  %312 = load i64, ptr %311, align 8, !tbaa !8
  store i64 %312, ptr %300, align 8, !tbaa !8
  %313 = add nuw nsw i64 %.0104153, 1
  %exitcond189.not = icmp eq i64 %313, %.0108166
  br i1 %exitcond189.not, label %.split156.us.peel, label %.preheader, !llvm.loop !20

._crit_edge160.loopexit:                          ; preds = %.split156.us, %.split156.us.peel
  %.lcssa180 = phi i64 [ %256, %.split156.us.peel ], [ %350, %.split156.us ]
  %.pre194 = load i64, ptr @M, align 8, !tbaa !8
  br label %._crit_edge160

._crit_edge160:                                   ; preds = %.preheader119, %._crit_edge160.loopexit
  %314 = phi i64 [ %.pre194, %._crit_edge160.loopexit ], [ %232, %.preheader119 ]
  %.2.lcssa = phi i64 [ %.lcssa180, %._crit_edge160.loopexit ], [ %.1161, %.preheader119 ]
  %315 = add nuw nsw i64 %.0105162, 1
  %316 = icmp slt i64 %315, %314
  br i1 %316, label %.preheader119, label %._crit_edge163.loopexit, !llvm.loop !21

.split156.us:                                     ; preds = %.lr.ph159.peel.next, %.split156.us
  %.0101158 = phi i64 [ %351, %.split156.us ], [ 1, %.lr.ph159.peel.next ]
  %.2157 = phi i64 [ %350, %.split156.us ], [ %256, %.lr.ph159.peel.next ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 1000000000, ptr %6, align 8, !tbaa !8
  %317 = add nsw i64 %.0101158, -1
  %318 = load i64, ptr %257, align 16, !tbaa !8
  %319 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %317, i64 %.0105162, i64 0
  %320 = load i64, ptr %319, align 16, !tbaa !8
  %321 = xor i64 %320, %318
  %322 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 0, i64 %.0101158
  store i64 %321, ptr %322, align 8, !tbaa !8
  %323 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 0, i64 %.0101158, i64 %321
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %323)
  %325 = load i64, ptr %324, align 8, !tbaa !8
  store i64 %325, ptr %6, align 8, !tbaa !8
  %326 = load i64, ptr %258, align 8, !tbaa !8
  %327 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %317, i64 %.0105162, i64 1
  %328 = load i64, ptr %327, align 8, !tbaa !8
  %329 = xor i64 %328, %326
  %330 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 1, i64 %.0101158
  store i64 %329, ptr %330, align 8, !tbaa !8
  %331 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 1, i64 %.0101158, i64 %329
  %332 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %331)
  %333 = load i64, ptr %332, align 8, !tbaa !8
  store i64 %333, ptr %6, align 8, !tbaa !8
  %334 = load i64, ptr %259, align 16, !tbaa !8
  %335 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %317, i64 %.0105162, i64 2
  %336 = load i64, ptr %335, align 16, !tbaa !8
  %337 = xor i64 %336, %334
  %338 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 2, i64 %.0101158
  store i64 %337, ptr %338, align 8, !tbaa !8
  %339 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 2, i64 %.0101158, i64 %337
  %340 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %339)
  %341 = load i64, ptr %340, align 8, !tbaa !8
  store i64 %341, ptr %6, align 8, !tbaa !8
  %342 = load i64, ptr %260, align 8, !tbaa !8
  %343 = getelementptr inbounds [151 x [1001 x [4 x i64]]], ptr @B, i64 0, i64 %317, i64 %.0105162, i64 3
  %344 = load i64, ptr %343, align 8, !tbaa !8
  %345 = xor i64 %344, %342
  %346 = getelementptr inbounds [4 x [151 x i64]], ptr @q2, i64 0, i64 3, i64 %.0101158
  store i64 %345, ptr %346, align 8, !tbaa !8
  %347 = getelementptr inbounds [4 x [151 x [65536 x i64]]], ptr @cnt, i64 0, i64 3, i64 %.0101158, i64 %345
  %348 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %347)
  %349 = load i64, ptr %348, align 8, !tbaa !8
  %350 = add nsw i64 %349, %.2157
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %351 = add nuw nsw i64 %.0101158, 1
  %exitcond192.not = icmp eq i64 %351, %.0108166
  br i1 %exitcond192.not, label %._crit_edge160.loopexit, label %.split156.us, !llvm.loop !22
}

; 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 uwtable
declare dso_local void @_ZNSt24uniform_int_distributionIxEC2Exx(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #3 align 2

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

; 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 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 #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #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 #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !13}
!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, !13}


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