; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101955I)

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

@t = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@sz = external dso_local global i32, align 4
@lft = external dso_local global [3 x i32], align 4
@rht = external dso_local global [3 x i32], align 4
@f = external dso_local global [3 x [2049 x [2049 x i32]]], align 16
@cur = external dso_local global i32, align 4
@pre = external dso_local global i32, align 4
@g = external dso_local global [2 x [2049 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %270, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr @t, align 4, !tbaa !5
  %21 = icmp sle i32 %19, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %18
  store i32 0, ptr @mx, align 4, !tbaa !5
  store i32 1, ptr @sz, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 50380812, i1 false)
  %24 = load i32, ptr @cur, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %25
  %27 = getelementptr inbounds [2049 x i64], ptr %26, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 16392, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %37, %23
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 3
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %28
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr @lft, i64 %34
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %35)
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %28, !llvm.loop !9

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

41:                                               ; preds = %50, %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 3
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %41
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr @rht, i64 %47
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %48)
  br label %50

50:                                               ; preds = %45
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !11

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

54:                                               ; preds = %119, %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 3
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %122

58:                                               ; preds = %54
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [3 x i32], ptr @lft, i64 0, i64 %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [3 x i32], ptr @rht, i64 0, i64 %63
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %61, ptr noundef nonnull align 4 dereferenceable(4) %64)
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr @mx, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %73, %58
  %69 = load i32, ptr @sz, align 4, !tbaa !5
  %70 = load i32, ptr @mx, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr @sz, align 4, !tbaa !5
  %75 = shl i32 %74, 1
  store i32 %75, ptr @sz, align 4, !tbaa !5
  br label %68, !llvm.loop !12

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

77:                                               ; preds = %115, %76
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [3 x i32], ptr @lft, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = icmp sle i32 %78, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %77
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %118

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

86:                                               ; preds = %111, %85
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [3 x i32], ptr @rht, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp sle i32 %87, %91
  br i1 %92, label %94, label %93

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

94:                                               ; preds = %86
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 %96
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = sub nsw i32 %98, %99
  %101 = call i32 @llvm.abs.i32(i32 %100, i1 true)
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2049 x [2049 x i32]], ptr %97, i64 0, i64 %102
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = xor i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [2049 x i32], ptr %103, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %94
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %8, align 4, !tbaa !5
  br label %86, !llvm.loop !13

114:                                              ; preds = %93
  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 %77, !llvm.loop !14

118:                                              ; preds = %84
  br label %119

119:                                              ; preds = %118
  %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 %54, !llvm.loop !15

122:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %263, %122
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = load i32, ptr @mx, align 4, !tbaa !5
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %266

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

129:                                              ; preds = %178, %128
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = icmp slt i32 %130, 3
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %181

133:                                              ; preds = %129
  %134 = load i32, ptr @sz, align 4, !tbaa !5
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 %136
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [2049 x [2049 x i32]], ptr %137, i64 0, i64 %139
  %141 = getelementptr inbounds [2049 x i32], ptr %140, i64 0, i64 0
  call void @_Z3FWTIiEviPT_i(i32 noundef %134, ptr noundef %141, i32 noundef 1)
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %177

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

145:                                              ; preds = %173, %144
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = load i32, ptr @sz, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %176

150:                                              ; preds = %145
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 %152
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [2049 x [2049 x i32]], ptr %153, i64 0, i64 %156
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2049 x i32], ptr %157, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 %163
  %165 = load i32, ptr %10, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2049 x [2049 x i32]], ptr %164, i64 0, i64 %166
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [2049 x i32], ptr %167, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add nsw i32 %171, %161
  store i32 %172, ptr %170, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %150
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %12, align 4, !tbaa !5
  br label %145, !llvm.loop !18

176:                                              ; preds = %149
  br label %177

177:                                              ; preds = %176, %133
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %11, align 4, !tbaa !5
  br label %129, !llvm.loop !19

181:                                              ; preds = %132
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @cur, ptr noundef nonnull align 4 dereferenceable(4) @pre) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %182

182:                                              ; preds = %220, %181
  %183 = load i32, ptr %13, align 4, !tbaa !5
  %184 = load i32, ptr @sz, align 4, !tbaa !5
  %185 = icmp slt i32 %183, %184
  br i1 %185, label %187, label %186

186:                                              ; preds = %182
  store i32 32, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %223

187:                                              ; preds = %182
  %188 = load i32, ptr %10, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [2049 x [2049 x i32]], ptr @f, i64 0, i64 %189
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [2049 x i32], ptr %190, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = load i32, ptr %10, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds ([3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1), i64 0, i64 %197
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [2049 x i32], ptr %198, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = mul nsw i64 %195, %203
  %205 = load i32, ptr %10, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds ([3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2), i64 0, i64 %206
  %208 = load i32, ptr %13, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [2049 x i32], ptr %207, i64 0, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = mul nsw i64 %204, %212
  %214 = load i32, ptr @cur, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %215
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [2049 x i64], ptr %216, i64 0, i64 %218
  store i64 %213, ptr %219, align 8, !tbaa !16
  br label %220

220:                                              ; preds = %187
  %221 = load i32, ptr %13, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %13, align 4, !tbaa !5
  br label %182, !llvm.loop !20

223:                                              ; preds = %186
  %224 = load i32, ptr @sz, align 4, !tbaa !5
  %225 = load i32, ptr @cur, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %226
  %228 = getelementptr inbounds [2049 x i64], ptr %227, i64 0, i64 0
  call void @_Z3FWTIxEviPT_i(i32 noundef %224, ptr noundef %228, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %229 = load i32, ptr @sz, align 4, !tbaa !5
  %230 = sub nsw i32 %229, 1
  store i32 %230, ptr %15, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %259, %223
  %232 = load i32, ptr %15, align 4, !tbaa !5
  %233 = icmp sgt i32 %232, 0
  br i1 %233, label %235, label %234

234:                                              ; preds = %231
  store i32 35, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %262

235:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %236 = load i32, ptr %10, align 4, !tbaa !5
  %237 = load i32, ptr %15, align 4, !tbaa !5
  %238 = xor i32 %236, %237
  store i32 %238, ptr %16, align 4, !tbaa !5
  %239 = load i32, ptr @cur, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %240
  %242 = load i32, ptr %16, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [2049 x i64], ptr %241, i64 0, i64 %243
  %245 = load i64, ptr %244, align 8, !tbaa !16
  %246 = load i32, ptr @pre, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %247
  %249 = load i32, ptr %16, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [2049 x i64], ptr %248, i64 0, i64 %250
  %252 = load i64, ptr %251, align 8, !tbaa !16
  %253 = sub nsw i64 %245, %252
  %254 = load i64, ptr %14, align 8, !tbaa !16
  %255 = add nsw i64 %254, %253
  store i64 %255, ptr %14, align 8, !tbaa !16
  %256 = load i64, ptr %14, align 8, !tbaa !16
  %257 = load i64, ptr %9, align 8, !tbaa !16
  %258 = add nsw i64 %257, %256
  store i64 %258, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %259

259:                                              ; preds = %235
  %260 = load i32, ptr %15, align 4, !tbaa !5
  %261 = add nsw i32 %260, -1
  store i32 %261, ptr %15, align 4, !tbaa !5
  br label %231, !llvm.loop !21

262:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %10, align 4, !tbaa !5
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %10, align 4, !tbaa !5
  br label %123, !llvm.loop !22

266:                                              ; preds = %127
  %267 = load i32, ptr %2, align 4, !tbaa !5
  %268 = load i64, ptr %9, align 8, !tbaa !16
  %269 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %267, i64 noundef %268)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %270

270:                                              ; preds = %266
  %271 = load i32, ptr %2, align 4, !tbaa !5
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !23

273:                                              ; preds = %22
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3FWTIiEviPT_i(i32 noundef, ptr noundef, i32 noundef) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3FWTIxEviPT_i(i32 noundef, ptr noundef, i32 noundef) #6

declare i32 @printf(ptr noundef, ...) #1

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

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

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


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

@t = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@sz = external dso_local local_unnamed_addr global i32, align 4
@lft = external dso_local global [3 x i32], align 4
@rht = external dso_local global [3 x i32], align 4
@f = external dso_local global [3 x [2049 x [2049 x i32]]], align 16
@cur = external dso_local global i32, align 4
@pre = external dso_local global i32, align 4
@g = external dso_local global [2 x [2049 x i64]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %.not112 = icmp slt i32 %2, 1
  br i1 %.not112, label %._crit_edge116, label %.lr.ph115

._crit_edge116:                                   ; preds = %._crit_edge111, %0
  ret i32 0

.lr.ph115:                                        ; preds = %0, %._crit_edge111
  %.0113 = phi i32 [ %150, %._crit_edge111 ], [ 1, %0 ]
  store i32 0, ptr @mx, align 4, !tbaa !5
  store i32 1, ptr @sz, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(50380812) @f, i8 0, i64 50380812, i1 false)
  %3 = load i32, ptr @cur, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  %5 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16392) %5, i8 0, i64 16392, i1 false)
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @lft)
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @lft, i64 4))
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @lft, i64 8))
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @rht)
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @rht, i64 4))
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @rht, i64 8))
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @lft, ptr noundef nonnull align 4 dereferenceable(4) @rht)
  %13 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %14, ptr @mx, align 4, !tbaa !5
  %sz.promoted = load i32, ptr @sz, align 4, !tbaa !5
  %.not7485 = icmp sgt i32 %sz.promoted, %14
  br i1 %.not7485, label %.preheader79, label %.lr.ph

..preheader79_crit_edge:                          ; preds = %.lr.ph
  store i32 %21, ptr @sz, align 4, !tbaa !5
  br label %.preheader79

.preheader79:                                     ; preds = %..preheader79_crit_edge, %.lr.ph115
  %15 = load i32, ptr @lft, align 4, !tbaa !5
  %.not7590 = icmp slt i32 %15, 0
  br i1 %.not7590, label %._crit_edge92, label %.preheader77.lr.ph

.preheader77.lr.ph:                               ; preds = %.preheader79
  %16 = load i32, ptr @rht, align 4, !tbaa !5
  %.not7687 = icmp slt i32 %16, 0
  br i1 %.not7687, label %._crit_edge92, label %.preheader77.preheader

.preheader77.preheader:                           ; preds = %.preheader77.lr.ph
  %17 = add nuw i32 %16, 1
  %18 = icmp eq i32 %16, 0
  %unroll_iter = and i32 %17, -2
  %19 = and i32 %16, 1
  %lcmp.mod.not.not = icmp eq i32 %19, 0
  br label %.preheader77

.lr.ph:                                           ; preds = %.lr.ph115, %.lr.ph
  %20 = phi i32 [ %21, %.lr.ph ], [ %sz.promoted, %.lr.ph115 ]
  %21 = shl i32 %20, 1
  %.not74 = icmp sgt i32 %21, %14
  br i1 %.not74, label %..preheader79_crit_edge, label %.lr.ph, !llvm.loop !9

.preheader77:                                     ; preds = %.preheader77.preheader, %._crit_edge
  %.06691 = phi i32 [ %105, %._crit_edge ], [ 0, %.preheader77.preheader ]
  br i1 %18, label %._crit_edge.unr-lcssa, label %.preheader77.new

._crit_edge92:                                    ; preds = %._crit_edge, %.preheader77.lr.ph, %.preheader79
  %22 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @lft, i64 4), ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rht, i64 4))
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %24 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %24, ptr @mx, align 4, !tbaa !5
  %sz.promoted.1 = load i32, ptr @sz, align 4, !tbaa !5
  %.not7485.1 = icmp sgt i32 %sz.promoted.1, %24
  br i1 %.not7485.1, label %.preheader79.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge92, %.lr.ph.1
  %25 = phi i32 [ %26, %.lr.ph.1 ], [ %sz.promoted.1, %._crit_edge92 ]
  %26 = shl i32 %25, 1
  %.not74.1 = icmp sgt i32 %26, %24
  br i1 %.not74.1, label %..preheader79_crit_edge.1, label %.lr.ph.1, !llvm.loop !9

..preheader79_crit_edge.1:                        ; preds = %.lr.ph.1
  store i32 %26, ptr @sz, align 4, !tbaa !5
  br label %.preheader79.1

.preheader79.1:                                   ; preds = %..preheader79_crit_edge.1, %._crit_edge92
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @lft, i64 4), align 4, !tbaa !5
  %.not7590.1 = icmp slt i32 %27, 0
  br i1 %.not7590.1, label %._crit_edge92.1, label %.preheader77.lr.ph.1

.preheader77.lr.ph.1:                             ; preds = %.preheader79.1
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @rht, i64 4), align 4, !tbaa !5
  %.not7687.1 = icmp slt i32 %28, 0
  br i1 %.not7687.1, label %._crit_edge92.1, label %.preheader77.1.preheader

.preheader77.1.preheader:                         ; preds = %.preheader77.lr.ph.1
  %29 = add nuw i32 %28, 1
  %30 = icmp eq i32 %28, 0
  %unroll_iter207 = and i32 %29, -2
  %31 = and i32 %28, 1
  %lcmp.mod206.not.not = icmp eq i32 %31, 0
  br label %.preheader77.1

.preheader77.1:                                   ; preds = %.preheader77.1.preheader, %._crit_edge.1
  %.06691.1 = phi i32 [ %58, %._crit_edge.1 ], [ 0, %.preheader77.1.preheader ]
  br i1 %30, label %._crit_edge.1.unr-lcssa, label %.preheader77.1.new

.preheader77.1.new:                               ; preds = %.preheader77.1, %.preheader77.1.new
  %.06588.1 = phi i32 [ %49, %.preheader77.1.new ], [ 0, %.preheader77.1 ]
  %niter208 = phi i32 [ %niter208.next.1, %.preheader77.1.new ], [ 0, %.preheader77.1 ]
  %32 = sub nsw i32 %.06691.1, %.06588.1
  %33 = tail call i32 @llvm.abs.i32(i32 %32, i1 true)
  %34 = zext nneg i32 %33 to i64
  %35 = xor i32 %.06588.1, %.06691.1
  %36 = zext nneg i32 %35 to i64
  %37 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %34, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  %40 = or disjoint i32 %.06588.1, 1
  %41 = sub nsw i32 %.06691.1, %40
  %42 = tail call i32 @llvm.abs.i32(i32 %41, i1 true)
  %43 = zext nneg i32 %42 to i64
  %44 = xor i32 %40, %.06691.1
  %45 = zext nneg i32 %44 to i64
  %46 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %43, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !5
  %49 = add nuw i32 %.06588.1, 2
  %niter208.next.1 = add i32 %niter208, 2
  %niter208.ncmp.1 = icmp eq i32 %niter208.next.1, %unroll_iter207
  br i1 %niter208.ncmp.1, label %._crit_edge.1.unr-lcssa, label %.preheader77.1.new, !llvm.loop !11

._crit_edge.1.unr-lcssa:                          ; preds = %.preheader77.1.new, %.preheader77.1
  %.06588.1.unr = phi i32 [ 0, %.preheader77.1 ], [ %49, %.preheader77.1.new ]
  br i1 %lcmp.mod206.not.not, label %._crit_edge.1.epilog-lcssa, label %._crit_edge.1

._crit_edge.1.epilog-lcssa:                       ; preds = %._crit_edge.1.unr-lcssa
  %50 = sub nsw i32 %.06691.1, %.06588.1.unr
  %51 = tail call i32 @llvm.abs.i32(i32 %50, i1 true)
  %52 = zext nneg i32 %51 to i64
  %53 = xor i32 %.06588.1.unr, %.06691.1
  %54 = zext nneg i32 %53 to i64
  %55 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %52, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  br label %._crit_edge.1

._crit_edge.1:                                    ; preds = %._crit_edge.1.unr-lcssa, %._crit_edge.1.epilog-lcssa
  %58 = add nuw i32 %.06691.1, 1
  %exitcond122.1.not = icmp eq i32 %.06691.1, %27
  br i1 %exitcond122.1.not, label %._crit_edge92.1, label %.preheader77.1, !llvm.loop !12

._crit_edge92.1:                                  ; preds = %._crit_edge.1, %.preheader77.lr.ph.1, %.preheader79.1
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @lft, i64 8), ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rht, i64 8))
  %60 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %59)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr @mx, align 4, !tbaa !5
  %sz.promoted.2 = load i32, ptr @sz, align 4, !tbaa !5
  %.not7485.2 = icmp sgt i32 %sz.promoted.2, %61
  br i1 %.not7485.2, label %.preheader79.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge92.1, %.lr.ph.2
  %62 = phi i32 [ %63, %.lr.ph.2 ], [ %sz.promoted.2, %._crit_edge92.1 ]
  %63 = shl i32 %62, 1
  %.not74.2 = icmp sgt i32 %63, %61
  br i1 %.not74.2, label %..preheader79_crit_edge.2, label %.lr.ph.2, !llvm.loop !9

..preheader79_crit_edge.2:                        ; preds = %.lr.ph.2
  store i32 %63, ptr @sz, align 4, !tbaa !5
  br label %.preheader79.2

.preheader79.2:                                   ; preds = %..preheader79_crit_edge.2, %._crit_edge92.1
  %64 = phi i32 [ %63, %..preheader79_crit_edge.2 ], [ %sz.promoted.2, %._crit_edge92.1 ]
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @lft, i64 8), align 4, !tbaa !5
  %.not7590.2 = icmp slt i32 %65, 0
  br i1 %.not7590.2, label %._crit_edge92.2, label %.preheader77.lr.ph.2

.preheader77.lr.ph.2:                             ; preds = %.preheader79.2
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @rht, i64 8), align 4, !tbaa !5
  %.not7687.2 = icmp slt i32 %66, 0
  br i1 %.not7687.2, label %._crit_edge92.2, label %.preheader77.2.preheader

.preheader77.2.preheader:                         ; preds = %.preheader77.lr.ph.2
  %67 = add nuw i32 %66, 1
  %68 = icmp eq i32 %66, 0
  %unroll_iter212 = and i32 %67, -2
  %69 = and i32 %66, 1
  %lcmp.mod211.not.not = icmp eq i32 %69, 0
  br label %.preheader77.2

.preheader77.2:                                   ; preds = %.preheader77.2.preheader, %._crit_edge.2
  %.06691.2 = phi i32 [ %96, %._crit_edge.2 ], [ 0, %.preheader77.2.preheader ]
  br i1 %68, label %._crit_edge.2.unr-lcssa, label %.preheader77.2.new

.preheader77.2.new:                               ; preds = %.preheader77.2, %.preheader77.2.new
  %.06588.2 = phi i32 [ %87, %.preheader77.2.new ], [ 0, %.preheader77.2 ]
  %niter213 = phi i32 [ %niter213.next.1, %.preheader77.2.new ], [ 0, %.preheader77.2 ]
  %70 = sub nsw i32 %.06691.2, %.06588.2
  %71 = tail call i32 @llvm.abs.i32(i32 %70, i1 true)
  %72 = zext nneg i32 %71 to i64
  %73 = xor i32 %.06588.2, %.06691.2
  %74 = zext nneg i32 %73 to i64
  %75 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %72, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !5
  %78 = or disjoint i32 %.06588.2, 1
  %79 = sub nsw i32 %.06691.2, %78
  %80 = tail call i32 @llvm.abs.i32(i32 %79, i1 true)
  %81 = zext nneg i32 %80 to i64
  %82 = xor i32 %78, %.06691.2
  %83 = zext nneg i32 %82 to i64
  %84 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %81, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %84, align 4, !tbaa !5
  %87 = add nuw i32 %.06588.2, 2
  %niter213.next.1 = add i32 %niter213, 2
  %niter213.ncmp.1 = icmp eq i32 %niter213.next.1, %unroll_iter212
  br i1 %niter213.ncmp.1, label %._crit_edge.2.unr-lcssa, label %.preheader77.2.new, !llvm.loop !11

._crit_edge.2.unr-lcssa:                          ; preds = %.preheader77.2.new, %.preheader77.2
  %.06588.2.unr = phi i32 [ 0, %.preheader77.2 ], [ %87, %.preheader77.2.new ]
  br i1 %lcmp.mod211.not.not, label %._crit_edge.2.epilog-lcssa, label %._crit_edge.2

._crit_edge.2.epilog-lcssa:                       ; preds = %._crit_edge.2.unr-lcssa
  %88 = sub nsw i32 %.06691.2, %.06588.2.unr
  %89 = tail call i32 @llvm.abs.i32(i32 %88, i1 true)
  %90 = zext nneg i32 %89 to i64
  %91 = xor i32 %.06588.2.unr, %.06691.2
  %92 = zext nneg i32 %91 to i64
  %93 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %90, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %93, align 4, !tbaa !5
  br label %._crit_edge.2

._crit_edge.2:                                    ; preds = %._crit_edge.2.unr-lcssa, %._crit_edge.2.epilog-lcssa
  %96 = add nuw i32 %.06691.2, 1
  %exitcond122.2.not = icmp eq i32 %.06691.2, %65
  br i1 %exitcond122.2.not, label %._crit_edge92.2, label %.preheader77.2, !llvm.loop !12

._crit_edge92.2:                                  ; preds = %._crit_edge.2, %.preheader77.lr.ph.2, %.preheader79.2
  %.not72108 = icmp slt i32 %61, 0
  br i1 %.not72108, label %._crit_edge111, label %.preheader78

._crit_edge.unr-lcssa:                            ; preds = %.preheader77.new, %.preheader77
  %.06588.unr = phi i32 [ 0, %.preheader77 ], [ %123, %.preheader77.new ]
  br i1 %lcmp.mod.not.not, label %._crit_edge.epilog-lcssa, label %._crit_edge

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %97 = sub nsw i32 %.06691, %.06588.unr
  %98 = tail call i32 @llvm.abs.i32(i32 %97, i1 true)
  %99 = zext nneg i32 %98 to i64
  %100 = xor i32 %.06588.unr, %.06691
  %101 = zext nneg i32 %100 to i64
  %102 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %105 = add nuw i32 %.06691, 1
  %exitcond122.not = icmp eq i32 %.06691, %15
  br i1 %exitcond122.not, label %._crit_edge92, label %.preheader77, !llvm.loop !12

.preheader77.new:                                 ; preds = %.preheader77, %.preheader77.new
  %.06588 = phi i32 [ %123, %.preheader77.new ], [ 0, %.preheader77 ]
  %niter = phi i32 [ %niter.next.1, %.preheader77.new ], [ 0, %.preheader77 ]
  %106 = sub nsw i32 %.06691, %.06588
  %107 = tail call i32 @llvm.abs.i32(i32 %106, i1 true)
  %108 = zext nneg i32 %107 to i64
  %109 = xor i32 %.06588, %.06691
  %110 = zext nneg i32 %109 to i64
  %111 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %108, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %111, align 4, !tbaa !5
  %114 = or disjoint i32 %.06588, 1
  %115 = sub nsw i32 %.06691, %114
  %116 = tail call i32 @llvm.abs.i32(i32 %115, i1 true)
  %117 = zext nneg i32 %116 to i64
  %118 = xor i32 %114, %.06691
  %119 = zext nneg i32 %118 to i64
  %120 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %120, align 4, !tbaa !5
  %123 = add nuw i32 %.06588, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.preheader77.new, !llvm.loop !11

.preheader78:                                     ; preds = %._crit_edge92.2, %._crit_edge106
  %124 = phi i32 [ %256, %._crit_edge106 ], [ %64, %._crit_edge92.2 ]
  %.063110 = phi i32 [ %298, %._crit_edge106 ], [ 0, %._crit_edge92.2 ]
  %.064109 = phi i64 [ %.1.lcssa, %._crit_edge106 ], [ 0, %._crit_edge92.2 ]
  %125 = zext i32 %.063110 to i64
  %126 = mul nuw nsw i64 %125, 8196
  %scevgep177 = getelementptr i8, ptr @f, i64 %126
  %127 = add i32 %.063110, -1
  %128 = zext i32 %127 to i64
  %129 = mul nuw nsw i64 %128, 8196
  %scevgep179 = getelementptr i8, ptr @f, i64 %129
  %130 = zext i32 %.063110 to i64
  %131 = mul nuw nsw i64 %130, 8196
  %scevgep154 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 %131
  %132 = add i32 %.063110, -1
  %133 = zext i32 %132 to i64
  %134 = mul nuw nsw i64 %133, 8196
  %scevgep156 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 %134
  %135 = zext i32 %.063110 to i64
  %136 = mul nuw nsw i64 %135, 8196
  %scevgep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 %136
  %137 = add i32 %.063110, -1
  %138 = zext i32 %137 to i64
  %139 = mul nuw nsw i64 %138, 8196
  %scevgep148 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 %139
  %140 = zext nneg i32 %.063110 to i64
  %.not73 = icmp eq i32 %.063110, 0
  %141 = add nsw i32 %.063110, -1
  %142 = zext nneg i32 %141 to i64
  %143 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %140
  tail call void @_Z3FWTIiEviPT_i(i32 noundef %124, ptr noundef nonnull %143, i32 noundef 1)
  %144 = load i32, ptr @sz, align 4, !tbaa !5
  br i1 %.not73, label %.preheader78.split.us.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader78
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %.lr.ph95.preheader, label %.loopexit

.preheader78.split.us.preheader:                  ; preds = %.preheader78
  %146 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140
  tail call void @_Z3FWTIiEviPT_i(i32 noundef %144, ptr noundef nonnull %146, i32 noundef 1)
  %147 = load i32, ptr @sz, align 4, !tbaa !5
  %148 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140
  tail call void @_Z3FWTIiEviPT_i(i32 noundef %147, ptr noundef nonnull %148, i32 noundef 1)
  br label %.split.us

._crit_edge111:                                   ; preds = %._crit_edge106, %._crit_edge92.2
  %.064.lcssa = phi i64 [ 0, %._crit_edge92.2 ], [ %.1.lcssa, %._crit_edge106 ]
  %149 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.0113, i64 noundef %.064.lcssa)
  %150 = add nuw nsw i32 %.0113, 1
  %151 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.0113, %151
  br i1 %.not.not, label %.lr.ph115, label %._crit_edge116, !llvm.loop !13

.split.us:                                        ; preds = %.lr.ph95.2.prol.loopexit, %.lr.ph95.2, %middle.block, %.loopexit.1, %.preheader78.split.us.preheader
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @cur, ptr noundef nonnull align 4 dereferenceable(4) @pre) #6
  %152 = load i32, ptr @sz, align 4, !tbaa !5
  %153 = icmp sgt i32 %152, 0
  %.pre = load i32, ptr @cur, align 4, !tbaa !5
  %154 = sext i32 %.pre to i64
  br i1 %153, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %.split.us
  %wide.trip.count138 = zext nneg i32 %152 to i64
  %xtraiter224 = and i64 %wide.trip.count138, 1
  %155 = icmp eq i32 %152, 1
  br i1 %155, label %._crit_edge100.loopexit.unr-lcssa, label %.lr.ph99.new

.lr.ph99.new:                                     ; preds = %.lr.ph99
  %unroll_iter226 = and i64 %wide.trip.count138, 2147483646
  br label %264

.lr.ph95.preheader:                               ; preds = %.preheader.preheader
  %wide.trip.count = zext nneg i32 %144 to i64
  %min.iters.check186 = icmp ult i32 %144, 8
  br i1 %min.iters.check186, label %.lr.ph95.preheader199, label %vector.memcheck176

vector.memcheck176:                               ; preds = %.lr.ph95.preheader
  %156 = shl nuw nsw i64 %wide.trip.count, 2
  %157 = getelementptr i8, ptr @f, i64 %126
  %scevgep178 = getelementptr i8, ptr %157, i64 %156
  %158 = getelementptr i8, ptr @f, i64 %129
  %scevgep180 = getelementptr i8, ptr %158, i64 %156
  %bound0181 = icmp ult ptr %scevgep177, %scevgep180
  %bound1182 = icmp ult ptr %scevgep179, %scevgep178
  %found.conflict183 = and i1 %bound0181, %bound1182
  br i1 %found.conflict183, label %.lr.ph95.preheader199, label %vector.ph187

vector.ph187:                                     ; preds = %vector.memcheck176
  %n.vec189 = and i64 %wide.trip.count, 2147483640
  br label %vector.body191

vector.body191:                                   ; preds = %vector.body191, %vector.ph187
  %index192 = phi i64 [ 0, %vector.ph187 ], [ %index.next197, %vector.body191 ]
  %159 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %142, i64 %index192
  %160 = getelementptr inbounds i8, ptr %159, i64 16
  %wide.load193 = load <4 x i32>, ptr %159, align 4, !tbaa !5, !alias.scope !14
  %wide.load194 = load <4 x i32>, ptr %160, align 4, !tbaa !5, !alias.scope !14
  %161 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %140, i64 %index192
  %162 = getelementptr inbounds i8, ptr %161, i64 16
  %wide.load195 = load <4 x i32>, ptr %161, align 4, !tbaa !5, !alias.scope !17, !noalias !14
  %wide.load196 = load <4 x i32>, ptr %162, align 4, !tbaa !5, !alias.scope !17, !noalias !14
  %163 = add nsw <4 x i32> %wide.load195, %wide.load193
  %164 = add nsw <4 x i32> %wide.load196, %wide.load194
  store <4 x i32> %163, ptr %161, align 4, !tbaa !5, !alias.scope !17, !noalias !14
  store <4 x i32> %164, ptr %162, align 4, !tbaa !5, !alias.scope !17, !noalias !14
  %index.next197 = add nuw i64 %index192, 8
  %165 = icmp eq i64 %index.next197, %n.vec189
  br i1 %165, label %middle.block184, label %vector.body191, !llvm.loop !19

middle.block184:                                  ; preds = %vector.body191
  %cmp.n198 = icmp eq i64 %n.vec189, %wide.trip.count
  br i1 %cmp.n198, label %.loopexit, label %.lr.ph95.preheader199

.lr.ph95.preheader199:                            ; preds = %middle.block184, %vector.memcheck176, %.lr.ph95.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck176 ], [ 0, %.lr.ph95.preheader ], [ %n.vec189, %middle.block184 ]
  %xtraiter214 = and i64 %wide.trip.count, 1
  %lcmp.mod215.not = icmp eq i64 %xtraiter214, 0
  br i1 %lcmp.mod215.not, label %.lr.ph95.prol.loopexit, label %.lr.ph95.prol

.lr.ph95.prol:                                    ; preds = %.lr.ph95.preheader199
  %166 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %142, i64 %indvars.iv.ph
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %140, i64 %indvars.iv.ph
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = add nsw i32 %169, %167
  store i32 %170, ptr %168, align 4, !tbaa !5
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph95.prol.loopexit

.lr.ph95.prol.loopexit:                           ; preds = %.lr.ph95.prol, %.lr.ph95.preheader199
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph95.preheader199 ], [ %indvars.iv.next.prol, %.lr.ph95.prol ]
  %171 = add nsw i64 %wide.trip.count, -1
  %172 = icmp eq i64 %indvars.iv.ph, %171
  br i1 %172, label %.loopexit, label %.lr.ph95

.lr.ph95:                                         ; preds = %.lr.ph95.prol.loopexit, %.lr.ph95
  %indvars.iv = phi i64 [ %indvars.iv.next.1217, %.lr.ph95 ], [ %indvars.iv.unr, %.lr.ph95.prol.loopexit ]
  %173 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %142, i64 %indvars.iv
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %140, i64 %indvars.iv
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = add nsw i32 %176, %174
  store i32 %177, ptr %175, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %178 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %142, i64 %indvars.iv.next
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 0, i64 %140, i64 %indvars.iv.next
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = add nsw i32 %181, %179
  store i32 %182, ptr %180, align 4, !tbaa !5
  %indvars.iv.next.1217 = add nuw nsw i64 %indvars.iv, 2
  %exitcond126.not.1 = icmp eq i64 %indvars.iv.next.1217, %wide.trip.count
  br i1 %exitcond126.not.1, label %.loopexit, label %.lr.ph95, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph95.prol.loopexit, %.lr.ph95, %middle.block184, %.preheader.preheader
  %183 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140
  tail call void @_Z3FWTIiEviPT_i(i32 noundef %144, ptr noundef nonnull %183, i32 noundef 1)
  %184 = load i32, ptr @sz, align 4, !tbaa !5
  %185 = icmp sgt i32 %184, 0
  br i1 %185, label %.lr.ph95.preheader.1, label %.loopexit.1

.lr.ph95.preheader.1:                             ; preds = %.loopexit
  %wide.trip.count.1 = zext nneg i32 %184 to i64
  %min.iters.check163 = icmp ult i32 %184, 8
  br i1 %min.iters.check163, label %.lr.ph95.1.preheader, label %vector.memcheck153

vector.memcheck153:                               ; preds = %.lr.ph95.preheader.1
  %186 = shl nuw nsw i64 %wide.trip.count.1, 2
  %187 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 %131
  %scevgep155 = getelementptr i8, ptr %187, i64 %186
  %188 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 %134
  %scevgep157 = getelementptr i8, ptr %188, i64 %186
  %bound0158 = icmp ult ptr %scevgep154, %scevgep157
  %bound1159 = icmp ult ptr %scevgep156, %scevgep155
  %found.conflict160 = and i1 %bound0158, %bound1159
  br i1 %found.conflict160, label %.lr.ph95.1.preheader, label %vector.ph164

vector.ph164:                                     ; preds = %vector.memcheck153
  %n.vec166 = and i64 %wide.trip.count.1, 2147483640
  br label %vector.body168

vector.body168:                                   ; preds = %vector.body168, %vector.ph164
  %index169 = phi i64 [ 0, %vector.ph164 ], [ %index.next174, %vector.body168 ]
  %189 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %142, i64 %index169
  %190 = getelementptr inbounds i8, ptr %189, i64 16
  %wide.load170 = load <4 x i32>, ptr %189, align 4, !tbaa !5, !alias.scope !23
  %wide.load171 = load <4 x i32>, ptr %190, align 4, !tbaa !5, !alias.scope !23
  %191 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140, i64 %index169
  %192 = getelementptr inbounds i8, ptr %191, i64 16
  %wide.load172 = load <4 x i32>, ptr %191, align 4, !tbaa !5, !alias.scope !26, !noalias !23
  %wide.load173 = load <4 x i32>, ptr %192, align 4, !tbaa !5, !alias.scope !26, !noalias !23
  %193 = add nsw <4 x i32> %wide.load172, %wide.load170
  %194 = add nsw <4 x i32> %wide.load173, %wide.load171
  store <4 x i32> %193, ptr %191, align 4, !tbaa !5, !alias.scope !26, !noalias !23
  store <4 x i32> %194, ptr %192, align 4, !tbaa !5, !alias.scope !26, !noalias !23
  %index.next174 = add nuw i64 %index169, 8
  %195 = icmp eq i64 %index.next174, %n.vec166
  br i1 %195, label %middle.block161, label %vector.body168, !llvm.loop !28

middle.block161:                                  ; preds = %vector.body168
  %cmp.n175 = icmp eq i64 %n.vec166, %wide.trip.count.1
  br i1 %cmp.n175, label %.loopexit.1, label %.lr.ph95.1.preheader

.lr.ph95.1.preheader:                             ; preds = %middle.block161, %vector.memcheck153, %.lr.ph95.preheader.1
  %indvars.iv.1.ph = phi i64 [ 0, %vector.memcheck153 ], [ 0, %.lr.ph95.preheader.1 ], [ %n.vec166, %middle.block161 ]
  %xtraiter219 = and i64 %wide.trip.count.1, 1
  %lcmp.mod220.not = icmp eq i64 %xtraiter219, 0
  br i1 %lcmp.mod220.not, label %.lr.ph95.1.prol.loopexit, label %.lr.ph95.1.prol

.lr.ph95.1.prol:                                  ; preds = %.lr.ph95.1.preheader
  %196 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %142, i64 %indvars.iv.1.ph
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140, i64 %indvars.iv.1.ph
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = add nsw i32 %199, %197
  store i32 %200, ptr %198, align 4, !tbaa !5
  %indvars.iv.next.1.prol = or disjoint i64 %indvars.iv.1.ph, 1
  br label %.lr.ph95.1.prol.loopexit

.lr.ph95.1.prol.loopexit:                         ; preds = %.lr.ph95.1.prol, %.lr.ph95.1.preheader
  %indvars.iv.1.unr = phi i64 [ %indvars.iv.1.ph, %.lr.ph95.1.preheader ], [ %indvars.iv.next.1.prol, %.lr.ph95.1.prol ]
  %201 = add nsw i64 %wide.trip.count.1, -1
  %202 = icmp eq i64 %indvars.iv.1.ph, %201
  br i1 %202, label %.loopexit.1, label %.lr.ph95.1

.lr.ph95.1:                                       ; preds = %.lr.ph95.1.prol.loopexit, %.lr.ph95.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1.1, %.lr.ph95.1 ], [ %indvars.iv.1.unr, %.lr.ph95.1.prol.loopexit ]
  %203 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %142, i64 %indvars.iv.1
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140, i64 %indvars.iv.1
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = add nsw i32 %206, %204
  store i32 %207, ptr %205, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %208 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %142, i64 %indvars.iv.next.1
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 1, i64 %140, i64 %indvars.iv.next.1
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = add nsw i32 %211, %209
  store i32 %212, ptr %210, align 4, !tbaa !5
  %indvars.iv.next.1.1 = add nuw nsw i64 %indvars.iv.1, 2
  %exitcond126.1.not.1 = icmp eq i64 %indvars.iv.next.1.1, %wide.trip.count.1
  br i1 %exitcond126.1.not.1, label %.loopexit.1, label %.lr.ph95.1, !llvm.loop !29

.loopexit.1:                                      ; preds = %.lr.ph95.1.prol.loopexit, %.lr.ph95.1, %middle.block161, %.loopexit
  %213 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140
  tail call void @_Z3FWTIiEviPT_i(i32 noundef %184, ptr noundef nonnull %213, i32 noundef 1)
  %214 = load i32, ptr @sz, align 4, !tbaa !5
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %.lr.ph95.preheader.2, label %.split.us

.lr.ph95.preheader.2:                             ; preds = %.loopexit.1
  %wide.trip.count.2 = zext nneg i32 %214 to i64
  %min.iters.check = icmp ult i32 %214, 8
  br i1 %min.iters.check, label %.lr.ph95.2.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph95.preheader.2
  %216 = shl nuw nsw i64 %wide.trip.count.2, 2
  %217 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 %136
  %scevgep147 = getelementptr i8, ptr %217, i64 %216
  %218 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 %139
  %scevgep149 = getelementptr i8, ptr %218, i64 %216
  %bound0 = icmp ult ptr %scevgep, %scevgep149
  %bound1 = icmp ult ptr %scevgep148, %scevgep147
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph95.2.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count.2, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %219 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %142, i64 %index
  %220 = getelementptr inbounds i8, ptr %219, i64 16
  %wide.load = load <4 x i32>, ptr %219, align 4, !tbaa !5, !alias.scope !30
  %wide.load150 = load <4 x i32>, ptr %220, align 4, !tbaa !5, !alias.scope !30
  %221 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140, i64 %index
  %222 = getelementptr inbounds i8, ptr %221, i64 16
  %wide.load151 = load <4 x i32>, ptr %221, align 4, !tbaa !5, !alias.scope !33, !noalias !30
  %wide.load152 = load <4 x i32>, ptr %222, align 4, !tbaa !5, !alias.scope !33, !noalias !30
  %223 = add nsw <4 x i32> %wide.load151, %wide.load
  %224 = add nsw <4 x i32> %wide.load152, %wide.load150
  store <4 x i32> %223, ptr %221, align 4, !tbaa !5, !alias.scope !33, !noalias !30
  store <4 x i32> %224, ptr %222, align 4, !tbaa !5, !alias.scope !33, !noalias !30
  %index.next = add nuw i64 %index, 8
  %225 = icmp eq i64 %index.next, %n.vec
  br i1 %225, label %middle.block, label %vector.body, !llvm.loop !35

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count.2
  br i1 %cmp.n, label %.split.us, label %.lr.ph95.2.preheader

.lr.ph95.2.preheader:                             ; preds = %middle.block, %vector.memcheck, %.lr.ph95.preheader.2
  %indvars.iv.2.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph95.preheader.2 ], [ %n.vec, %middle.block ]
  %xtraiter221 = and i64 %wide.trip.count.2, 1
  %lcmp.mod222.not = icmp eq i64 %xtraiter221, 0
  br i1 %lcmp.mod222.not, label %.lr.ph95.2.prol.loopexit, label %.lr.ph95.2.prol

.lr.ph95.2.prol:                                  ; preds = %.lr.ph95.2.preheader
  %226 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %142, i64 %indvars.iv.2.ph
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140, i64 %indvars.iv.2.ph
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = add nsw i32 %229, %227
  store i32 %230, ptr %228, align 4, !tbaa !5
  %indvars.iv.next.2.prol = or disjoint i64 %indvars.iv.2.ph, 1
  br label %.lr.ph95.2.prol.loopexit

.lr.ph95.2.prol.loopexit:                         ; preds = %.lr.ph95.2.prol, %.lr.ph95.2.preheader
  %indvars.iv.2.unr = phi i64 [ %indvars.iv.2.ph, %.lr.ph95.2.preheader ], [ %indvars.iv.next.2.prol, %.lr.ph95.2.prol ]
  %231 = add nsw i64 %wide.trip.count.2, -1
  %232 = icmp eq i64 %indvars.iv.2.ph, %231
  br i1 %232, label %.split.us, label %.lr.ph95.2

.lr.ph95.2:                                       ; preds = %.lr.ph95.2.prol.loopexit, %.lr.ph95.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2.1, %.lr.ph95.2 ], [ %indvars.iv.2.unr, %.lr.ph95.2.prol.loopexit ]
  %233 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %142, i64 %indvars.iv.2
  %234 = load i32, ptr %233, align 4, !tbaa !5
  %235 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140, i64 %indvars.iv.2
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = add nsw i32 %236, %234
  store i32 %237, ptr %235, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %238 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %142, i64 %indvars.iv.next.2
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = getelementptr inbounds [3 x [2049 x [2049 x i32]]], ptr @f, i64 0, i64 2, i64 %140, i64 %indvars.iv.next.2
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = add nsw i32 %241, %239
  store i32 %242, ptr %240, align 4, !tbaa !5
  %indvars.iv.next.2.1 = add nuw nsw i64 %indvars.iv.2, 2
  %exitcond126.2.not.1 = icmp eq i64 %indvars.iv.next.2.1, %wide.trip.count.2
  br i1 %exitcond126.2.not.1, label %.split.us, label %.lr.ph95.2, !llvm.loop !36

._crit_edge100.loopexit.unr-lcssa:                ; preds = %264, %.lr.ph99
  %indvars.iv135.unr = phi i64 [ 0, %.lr.ph99 ], [ %indvars.iv.next136.1, %264 ]
  %lcmp.mod225.not = icmp eq i64 %xtraiter224, 0
  br i1 %lcmp.mod225.not, label %._crit_edge100, label %._crit_edge100.loopexit.epilog-lcssa

._crit_edge100.loopexit.epilog-lcssa:             ; preds = %._crit_edge100.loopexit.unr-lcssa
  %243 = getelementptr inbounds [2049 x [2049 x i32]], ptr @f, i64 0, i64 %140, i64 %indvars.iv135.unr
  %244 = load i32, ptr %243, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 0, i64 %140, i64 %indvars.iv135.unr
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = mul nsw i64 %248, %245
  %250 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 0, i64 %140, i64 %indvars.iv135.unr
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = mul nsw i64 %249, %252
  %254 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %154, i64 %indvars.iv135.unr
  store i64 %253, ptr %254, align 8, !tbaa !37
  br label %._crit_edge100

._crit_edge100:                                   ; preds = %._crit_edge100.loopexit.epilog-lcssa, %._crit_edge100.loopexit.unr-lcssa, %.split.us
  %255 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %154
  tail call void @_Z3FWTIxEviPT_i(i32 noundef %152, ptr noundef nonnull %255, i32 noundef -1)
  %256 = load i32, ptr @sz, align 4, !tbaa !5
  %257 = icmp sgt i32 %256, 1
  br i1 %257, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %._crit_edge100
  %258 = load i32, ptr @cur, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = load i32, ptr @pre, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = add nsw i32 %256, -1
  %xtraiter229 = and i32 %262, 1
  %263 = icmp eq i32 %256, 2
  br i1 %263, label %._crit_edge106.loopexit.unr-lcssa, label %.lr.ph105.new

.lr.ph105.new:                                    ; preds = %.lr.ph105
  %unroll_iter232 = and i32 %262, -2
  br label %300

264:                                              ; preds = %264, %.lr.ph99.new
  %indvars.iv135 = phi i64 [ 0, %.lr.ph99.new ], [ %indvars.iv.next136.1, %264 ]
  %niter227 = phi i64 [ 0, %.lr.ph99.new ], [ %niter227.next.1, %264 ]
  %265 = getelementptr inbounds [2049 x [2049 x i32]], ptr @f, i64 0, i64 %140, i64 %indvars.iv135
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 0, i64 %140, i64 %indvars.iv135
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = mul nsw i64 %270, %267
  %272 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 0, i64 %140, i64 %indvars.iv135
  %273 = load i32, ptr %272, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = mul nsw i64 %271, %274
  %276 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %154, i64 %indvars.iv135
  store i64 %275, ptr %276, align 8, !tbaa !37
  %indvars.iv.next136 = or disjoint i64 %indvars.iv135, 1
  %277 = getelementptr inbounds [2049 x [2049 x i32]], ptr @f, i64 0, i64 %140, i64 %indvars.iv.next136
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 16793604), i64 0, i64 %140, i64 %indvars.iv.next136
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = mul nsw i64 %282, %279
  %284 = getelementptr inbounds [2049 x [2049 x i32]], ptr getelementptr inbounds (i8, ptr @f, i64 33587208), i64 0, i64 %140, i64 %indvars.iv.next136
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = mul nsw i64 %283, %286
  %288 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %154, i64 %indvars.iv.next136
  store i64 %287, ptr %288, align 8, !tbaa !37
  %indvars.iv.next136.1 = add nuw nsw i64 %indvars.iv135, 2
  %niter227.next.1 = add i64 %niter227, 2
  %niter227.ncmp.1 = icmp eq i64 %niter227.next.1, %unroll_iter226
  br i1 %niter227.ncmp.1, label %._crit_edge100.loopexit.unr-lcssa, label %264, !llvm.loop !39

._crit_edge106.loopexit.unr-lcssa:                ; preds = %300, %.lr.ph105
  %.lcssa202.ph = phi i64 [ poison, %.lr.ph105 ], [ %318, %300 ]
  %.058.in103.unr = phi i32 [ %256, %.lr.ph105 ], [ %.058.1, %300 ]
  %.059102.unr = phi i64 [ 0, %.lr.ph105 ], [ %317, %300 ]
  %.1101.unr = phi i64 [ %.064109, %.lr.ph105 ], [ %318, %300 ]
  %lcmp.mod230.not = icmp eq i32 %xtraiter229, 0
  br i1 %lcmp.mod230.not, label %._crit_edge106, label %._crit_edge106.loopexit.epilog-lcssa

._crit_edge106.loopexit.epilog-lcssa:             ; preds = %._crit_edge106.loopexit.unr-lcssa
  %.058.epil = add nsw i32 %.058.in103.unr, -1
  %289 = xor i32 %.058.epil, %.063110
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %259, i64 %290
  %292 = load i64, ptr %291, align 8, !tbaa !37
  %293 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %261, i64 %290
  %294 = load i64, ptr %293, align 8, !tbaa !37
  %295 = sub nsw i64 %292, %294
  %296 = add nsw i64 %295, %.059102.unr
  %297 = add nsw i64 %296, %.1101.unr
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %._crit_edge106.loopexit.epilog-lcssa, %._crit_edge106.loopexit.unr-lcssa, %._crit_edge100
  %.1.lcssa = phi i64 [ %.064109, %._crit_edge100 ], [ %.lcssa202.ph, %._crit_edge106.loopexit.unr-lcssa ], [ %297, %._crit_edge106.loopexit.epilog-lcssa ]
  %298 = add i32 %.063110, 1
  %299 = load i32, ptr @mx, align 4, !tbaa !5
  %.not72 = icmp sgt i32 %298, %299
  br i1 %.not72, label %._crit_edge111, label %.preheader78, !llvm.loop !40

300:                                              ; preds = %300, %.lr.ph105.new
  %.058.in103 = phi i32 [ %256, %.lr.ph105.new ], [ %.058.1, %300 ]
  %.059102 = phi i64 [ 0, %.lr.ph105.new ], [ %317, %300 ]
  %.1101 = phi i64 [ %.064109, %.lr.ph105.new ], [ %318, %300 ]
  %niter233 = phi i32 [ 0, %.lr.ph105.new ], [ %niter233.next.1, %300 ]
  %.058 = add nsw i32 %.058.in103, -1
  %301 = xor i32 %.058, %.063110
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %259, i64 %302
  %304 = load i64, ptr %303, align 8, !tbaa !37
  %305 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %261, i64 %302
  %306 = load i64, ptr %305, align 8, !tbaa !37
  %307 = sub nsw i64 %304, %306
  %308 = add nsw i64 %307, %.059102
  %309 = add nsw i64 %308, %.1101
  %.058.1 = add nsw i32 %.058.in103, -2
  %310 = xor i32 %.058.1, %.063110
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %259, i64 %311
  %313 = load i64, ptr %312, align 8, !tbaa !37
  %314 = getelementptr inbounds [2 x [2049 x i64]], ptr @g, i64 0, i64 %261, i64 %311
  %315 = load i64, ptr %314, align 8, !tbaa !37
  %316 = sub nsw i64 %313, %315
  %317 = add nsw i64 %316, %308
  %318 = add nsw i64 %317, %309
  %niter233.next.1 = add i32 %niter233, 2
  %niter233.ncmp.1.not = icmp eq i32 %niter233.next.1, %unroll_iter232
  br i1 %niter233.ncmp.1.not, label %._crit_edge106.loopexit.unr-lcssa, label %300, !llvm.loop !41
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3FWTIiEviPT_i(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3FWTIxEviPT_i(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 = { nofree 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15}
!15 = distinct !{!15, !16}
!16 = distinct !{!16, !"LVerDomain"}
!17 = !{!18}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !10, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !10, !20}
!23 = !{!24}
!24 = distinct !{!24, !25}
!25 = distinct !{!25, !"LVerDomain"}
!26 = !{!27}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !10, !20, !21}
!29 = distinct !{!29, !10, !20}
!30 = !{!31}
!31 = distinct !{!31, !32}
!32 = distinct !{!32, !"LVerDomain"}
!33 = !{!34}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !10, !20, !21}
!36 = distinct !{!36, !10, !20}
!37 = !{!38, !38, i64 0}
!38 = !{!"long long", !7, i64 0}
!39 = distinct !{!39, !10}
!40 = distinct !{!40, !10}
!41 = distinct !{!41, !10}


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