; LLVM IR from tangjz/acm-icpc :: 51nod (1254)

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

@n = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@pre = external dso_local global i32, align 4
@f = external dso_local global [2 x [2 x [2 x [3 x i64]]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 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 i64, align 8
  store i32 0, ptr %1, align 4
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %6 = load i32, ptr @cur, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %7
  %9 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %8, i64 0, i64 0
  call void @_Z5clearPA2_A3_x(ptr noundef %9)
  %10 = load i32, ptr @cur, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %11
  %13 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %12, i64 0, i64 0
  %14 = getelementptr inbounds [2 x [3 x i64]], ptr %13, i64 0, i64 0
  %15 = getelementptr inbounds [3 x i64], ptr %14, i64 0, i64 0
  store i64 0, ptr %15, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %389, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr @pre, align 4, !tbaa !5
  %23 = xor i32 %22, 1
  store i32 %23, ptr @pre, align 4, !tbaa !5
  %24 = load i32, ptr @cur, align 4, !tbaa !5
  %25 = xor i32 %24, 1
  store i32 %25, ptr @cur, align 4, !tbaa !5
  %26 = load i32, ptr @cur, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %27
  %29 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %28, i64 0, i64 0
  call void @_Z5clearPA2_A3_x(ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  %31 = load i32, ptr @cur, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %32
  %34 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %33, i64 0, i64 0
  %35 = getelementptr inbounds [2 x [3 x i64]], ptr %34, i64 0, i64 0
  %36 = getelementptr inbounds [3 x i64], ptr %35, i64 0, i64 0
  %37 = load i32, ptr @pre, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %38
  %40 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %39, i64 0, i64 0
  %41 = getelementptr inbounds [2 x [3 x i64]], ptr %40, i64 0, i64 0
  %42 = getelementptr inbounds [3 x i64], ptr %41, i64 0, i64 0
  %43 = load i64, ptr %42, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %36, i64 noundef %43)
  %44 = load i32, ptr @cur, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %45
  %47 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %46, i64 0, i64 1
  %48 = getelementptr inbounds [2 x [3 x i64]], ptr %47, i64 0, i64 0
  %49 = getelementptr inbounds [3 x i64], ptr %48, i64 0, i64 0
  %50 = load i32, ptr @pre, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %51
  %53 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %52, i64 0, i64 0
  %54 = getelementptr inbounds [2 x [3 x i64]], ptr %53, i64 0, i64 0
  %55 = getelementptr inbounds [3 x i64], ptr %54, i64 0, i64 0
  %56 = load i64, ptr %55, align 16, !tbaa !9
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = add nsw i64 %56, %58
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %49, i64 noundef %59)
  %60 = load i32, ptr @cur, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %61
  %63 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %62, i64 0, i64 1
  %64 = getelementptr inbounds [2 x [3 x i64]], ptr %63, i64 0, i64 0
  %65 = getelementptr inbounds [3 x i64], ptr %64, i64 0, i64 0
  %66 = load i32, ptr @pre, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %67
  %69 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %68, i64 0, i64 1
  %70 = getelementptr inbounds [2 x [3 x i64]], ptr %69, i64 0, i64 0
  %71 = getelementptr inbounds [3 x i64], ptr %70, i64 0, i64 0
  %72 = load i64, ptr %71, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %65, i64 noundef %72)
  %73 = load i32, ptr @cur, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %74
  %76 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %75, i64 0, i64 0
  %77 = getelementptr inbounds [2 x [3 x i64]], ptr %76, i64 0, i64 0
  %78 = getelementptr inbounds [3 x i64], ptr %77, i64 0, i64 1
  %79 = load i32, ptr @pre, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %80
  %82 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %81, i64 0, i64 0
  %83 = getelementptr inbounds [2 x [3 x i64]], ptr %82, i64 0, i64 0
  %84 = getelementptr inbounds [3 x i64], ptr %83, i64 0, i64 0
  %85 = load i64, ptr %84, align 16, !tbaa !9
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = add nsw i64 %85, %87
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %78, i64 noundef %88)
  %89 = load i32, ptr @cur, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %90
  %92 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %91, i64 0, i64 0
  %93 = getelementptr inbounds [2 x [3 x i64]], ptr %92, i64 0, i64 0
  %94 = getelementptr inbounds [3 x i64], ptr %93, i64 0, i64 1
  %95 = load i32, ptr @pre, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %96
  %98 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %97, i64 0, i64 0
  %99 = getelementptr inbounds [2 x [3 x i64]], ptr %98, i64 0, i64 0
  %100 = getelementptr inbounds [3 x i64], ptr %99, i64 0, i64 1
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = add nsw i64 %101, %103
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %94, i64 noundef %104)
  %105 = load i32, ptr @cur, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %106
  %108 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %107, i64 0, i64 0
  %109 = getelementptr inbounds [2 x [3 x i64]], ptr %108, i64 0, i64 1
  %110 = getelementptr inbounds [3 x i64], ptr %109, i64 0, i64 1
  %111 = load i32, ptr @pre, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %112
  %114 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %113, i64 0, i64 0
  %115 = getelementptr inbounds [2 x [3 x i64]], ptr %114, i64 0, i64 0
  %116 = getelementptr inbounds [3 x i64], ptr %115, i64 0, i64 0
  %117 = load i64, ptr %116, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %110, i64 noundef %117)
  %118 = load i32, ptr @cur, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %119
  %121 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %120, i64 0, i64 0
  %122 = getelementptr inbounds [2 x [3 x i64]], ptr %121, i64 0, i64 1
  %123 = getelementptr inbounds [3 x i64], ptr %122, i64 0, i64 1
  %124 = load i32, ptr @pre, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %125
  %127 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %126, i64 0, i64 0
  %128 = getelementptr inbounds [2 x [3 x i64]], ptr %127, i64 0, i64 0
  %129 = getelementptr inbounds [3 x i64], ptr %128, i64 0, i64 1
  %130 = load i64, ptr %129, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %123, i64 noundef %130)
  %131 = load i32, ptr @cur, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %132
  %134 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %133, i64 0, i64 0
  %135 = getelementptr inbounds [2 x [3 x i64]], ptr %134, i64 0, i64 1
  %136 = getelementptr inbounds [3 x i64], ptr %135, i64 0, i64 1
  %137 = load i32, ptr @pre, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %138
  %140 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %139, i64 0, i64 0
  %141 = getelementptr inbounds [2 x [3 x i64]], ptr %140, i64 0, i64 1
  %142 = getelementptr inbounds [3 x i64], ptr %141, i64 0, i64 1
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = add nsw i64 %143, %145
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %136, i64 noundef %146)
  %147 = load i32, ptr @cur, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %148
  %150 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %149, i64 0, i64 1
  %151 = getelementptr inbounds [2 x [3 x i64]], ptr %150, i64 0, i64 0
  %152 = getelementptr inbounds [3 x i64], ptr %151, i64 0, i64 1
  %153 = load i32, ptr @pre, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %154
  %156 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %155, i64 0, i64 1
  %157 = getelementptr inbounds [2 x [3 x i64]], ptr %156, i64 0, i64 0
  %158 = getelementptr inbounds [3 x i64], ptr %157, i64 0, i64 0
  %159 = load i64, ptr %158, align 16, !tbaa !9
  %160 = load i32, ptr %3, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = add nsw i64 %159, %161
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %152, i64 noundef %162)
  %163 = load i32, ptr @cur, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %164
  %166 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %165, i64 0, i64 1
  %167 = getelementptr inbounds [2 x [3 x i64]], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds [3 x i64], ptr %167, i64 0, i64 1
  %169 = load i32, ptr @pre, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %170
  %172 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %171, i64 0, i64 1
  %173 = getelementptr inbounds [2 x [3 x i64]], ptr %172, i64 0, i64 0
  %174 = getelementptr inbounds [3 x i64], ptr %173, i64 0, i64 1
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = load i32, ptr %3, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = add nsw i64 %175, %177
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %168, i64 noundef %178)
  %179 = load i32, ptr @cur, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %180
  %182 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %181, i64 0, i64 1
  %183 = getelementptr inbounds [2 x [3 x i64]], ptr %182, i64 0, i64 1
  %184 = getelementptr inbounds [3 x i64], ptr %183, i64 0, i64 1
  %185 = load i32, ptr @pre, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %186
  %188 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %187, i64 0, i64 1
  %189 = getelementptr inbounds [2 x [3 x i64]], ptr %188, i64 0, i64 0
  %190 = getelementptr inbounds [3 x i64], ptr %189, i64 0, i64 0
  %191 = load i64, ptr %190, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %184, i64 noundef %191)
  %192 = load i32, ptr @cur, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %193
  %195 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %194, i64 0, i64 1
  %196 = getelementptr inbounds [2 x [3 x i64]], ptr %195, i64 0, i64 1
  %197 = getelementptr inbounds [3 x i64], ptr %196, i64 0, i64 1
  %198 = load i32, ptr @pre, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %199
  %201 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %200, i64 0, i64 1
  %202 = getelementptr inbounds [2 x [3 x i64]], ptr %201, i64 0, i64 0
  %203 = getelementptr inbounds [3 x i64], ptr %202, i64 0, i64 1
  %204 = load i64, ptr %203, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %197, i64 noundef %204)
  %205 = load i32, ptr @cur, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %206
  %208 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %207, i64 0, i64 1
  %209 = getelementptr inbounds [2 x [3 x i64]], ptr %208, i64 0, i64 1
  %210 = getelementptr inbounds [3 x i64], ptr %209, i64 0, i64 1
  %211 = load i32, ptr @pre, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %212
  %214 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %213, i64 0, i64 1
  %215 = getelementptr inbounds [2 x [3 x i64]], ptr %214, i64 0, i64 1
  %216 = getelementptr inbounds [3 x i64], ptr %215, i64 0, i64 1
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = load i32, ptr %3, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = add nsw i64 %217, %219
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %210, i64 noundef %220)
  %221 = load i32, ptr @cur, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %222
  %224 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %223, i64 0, i64 0
  %225 = getelementptr inbounds [2 x [3 x i64]], ptr %224, i64 0, i64 0
  %226 = getelementptr inbounds [3 x i64], ptr %225, i64 0, i64 2
  %227 = load i32, ptr @pre, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %228
  %230 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %229, i64 0, i64 0
  %231 = getelementptr inbounds [2 x [3 x i64]], ptr %230, i64 0, i64 0
  %232 = getelementptr inbounds [3 x i64], ptr %231, i64 0, i64 1
  %233 = load i64, ptr %232, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %226, i64 noundef %233)
  %234 = load i32, ptr @cur, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %235
  %237 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %236, i64 0, i64 0
  %238 = getelementptr inbounds [2 x [3 x i64]], ptr %237, i64 0, i64 0
  %239 = getelementptr inbounds [3 x i64], ptr %238, i64 0, i64 2
  %240 = load i32, ptr @pre, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %241
  %243 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %242, i64 0, i64 0
  %244 = getelementptr inbounds [2 x [3 x i64]], ptr %243, i64 0, i64 0
  %245 = getelementptr inbounds [3 x i64], ptr %244, i64 0, i64 2
  %246 = load i64, ptr %245, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %239, i64 noundef %246)
  %247 = load i32, ptr @cur, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %248
  %250 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %249, i64 0, i64 1
  %251 = getelementptr inbounds [2 x [3 x i64]], ptr %250, i64 0, i64 0
  %252 = getelementptr inbounds [3 x i64], ptr %251, i64 0, i64 2
  %253 = load i32, ptr @pre, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %254
  %256 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %255, i64 0, i64 0
  %257 = getelementptr inbounds [2 x [3 x i64]], ptr %256, i64 0, i64 0
  %258 = getelementptr inbounds [3 x i64], ptr %257, i64 0, i64 1
  %259 = load i64, ptr %258, align 8, !tbaa !9
  %260 = load i32, ptr %3, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = add nsw i64 %259, %261
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %252, i64 noundef %262)
  %263 = load i32, ptr @cur, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %264
  %266 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %265, i64 0, i64 1
  %267 = getelementptr inbounds [2 x [3 x i64]], ptr %266, i64 0, i64 0
  %268 = getelementptr inbounds [3 x i64], ptr %267, i64 0, i64 2
  %269 = load i32, ptr @pre, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %270
  %272 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %271, i64 0, i64 0
  %273 = getelementptr inbounds [2 x [3 x i64]], ptr %272, i64 0, i64 0
  %274 = getelementptr inbounds [3 x i64], ptr %273, i64 0, i64 2
  %275 = load i64, ptr %274, align 16, !tbaa !9
  %276 = load i32, ptr %3, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = add nsw i64 %275, %277
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %268, i64 noundef %278)
  %279 = load i32, ptr @cur, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %280
  %282 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %281, i64 0, i64 1
  %283 = getelementptr inbounds [2 x [3 x i64]], ptr %282, i64 0, i64 0
  %284 = getelementptr inbounds [3 x i64], ptr %283, i64 0, i64 2
  %285 = load i32, ptr @pre, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %286
  %288 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %287, i64 0, i64 1
  %289 = getelementptr inbounds [2 x [3 x i64]], ptr %288, i64 0, i64 0
  %290 = getelementptr inbounds [3 x i64], ptr %289, i64 0, i64 1
  %291 = load i64, ptr %290, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %284, i64 noundef %291)
  %292 = load i32, ptr @cur, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %293
  %295 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %294, i64 0, i64 1
  %296 = getelementptr inbounds [2 x [3 x i64]], ptr %295, i64 0, i64 0
  %297 = getelementptr inbounds [3 x i64], ptr %296, i64 0, i64 2
  %298 = load i32, ptr @pre, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %299
  %301 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %300, i64 0, i64 1
  %302 = getelementptr inbounds [2 x [3 x i64]], ptr %301, i64 0, i64 0
  %303 = getelementptr inbounds [3 x i64], ptr %302, i64 0, i64 2
  %304 = load i64, ptr %303, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %297, i64 noundef %304)
  %305 = load i32, ptr @cur, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %306
  %308 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %307, i64 0, i64 0
  %309 = getelementptr inbounds [2 x [3 x i64]], ptr %308, i64 0, i64 1
  %310 = getelementptr inbounds [3 x i64], ptr %309, i64 0, i64 2
  %311 = load i32, ptr @pre, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %312
  %314 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %313, i64 0, i64 0
  %315 = getelementptr inbounds [2 x [3 x i64]], ptr %314, i64 0, i64 1
  %316 = getelementptr inbounds [3 x i64], ptr %315, i64 0, i64 1
  %317 = load i64, ptr %316, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %310, i64 noundef %317)
  %318 = load i32, ptr @cur, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %319
  %321 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %320, i64 0, i64 0
  %322 = getelementptr inbounds [2 x [3 x i64]], ptr %321, i64 0, i64 1
  %323 = getelementptr inbounds [3 x i64], ptr %322, i64 0, i64 2
  %324 = load i32, ptr @pre, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %325
  %327 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %326, i64 0, i64 0
  %328 = getelementptr inbounds [2 x [3 x i64]], ptr %327, i64 0, i64 1
  %329 = getelementptr inbounds [3 x i64], ptr %328, i64 0, i64 2
  %330 = load i64, ptr %329, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %323, i64 noundef %330)
  %331 = load i32, ptr @cur, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %332
  %334 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %333, i64 0, i64 1
  %335 = getelementptr inbounds [2 x [3 x i64]], ptr %334, i64 0, i64 1
  %336 = getelementptr inbounds [3 x i64], ptr %335, i64 0, i64 2
  %337 = load i32, ptr @pre, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %338
  %340 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %339, i64 0, i64 0
  %341 = getelementptr inbounds [2 x [3 x i64]], ptr %340, i64 0, i64 1
  %342 = getelementptr inbounds [3 x i64], ptr %341, i64 0, i64 1
  %343 = load i64, ptr %342, align 8, !tbaa !9
  %344 = load i32, ptr %3, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = add nsw i64 %343, %345
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %336, i64 noundef %346)
  %347 = load i32, ptr @cur, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %348
  %350 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %349, i64 0, i64 1
  %351 = getelementptr inbounds [2 x [3 x i64]], ptr %350, i64 0, i64 1
  %352 = getelementptr inbounds [3 x i64], ptr %351, i64 0, i64 2
  %353 = load i32, ptr @pre, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %354
  %356 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %355, i64 0, i64 0
  %357 = getelementptr inbounds [2 x [3 x i64]], ptr %356, i64 0, i64 1
  %358 = getelementptr inbounds [3 x i64], ptr %357, i64 0, i64 2
  %359 = load i64, ptr %358, align 8, !tbaa !9
  %360 = load i32, ptr %3, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = add nsw i64 %359, %361
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %352, i64 noundef %362)
  %363 = load i32, ptr @cur, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %364
  %366 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %365, i64 0, i64 1
  %367 = getelementptr inbounds [2 x [3 x i64]], ptr %366, i64 0, i64 1
  %368 = getelementptr inbounds [3 x i64], ptr %367, i64 0, i64 2
  %369 = load i32, ptr @pre, align 4, !tbaa !5
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %370
  %372 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %371, i64 0, i64 1
  %373 = getelementptr inbounds [2 x [3 x i64]], ptr %372, i64 0, i64 1
  %374 = getelementptr inbounds [3 x i64], ptr %373, i64 0, i64 1
  %375 = load i64, ptr %374, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %368, i64 noundef %375)
  %376 = load i32, ptr @cur, align 4, !tbaa !5
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %377
  %379 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %378, i64 0, i64 1
  %380 = getelementptr inbounds [2 x [3 x i64]], ptr %379, i64 0, i64 1
  %381 = getelementptr inbounds [3 x i64], ptr %380, i64 0, i64 2
  %382 = load i32, ptr @pre, align 4, !tbaa !5
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %383
  %385 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %384, i64 0, i64 1
  %386 = getelementptr inbounds [2 x [3 x i64]], ptr %385, i64 0, i64 1
  %387 = getelementptr inbounds [3 x i64], ptr %386, i64 0, i64 2
  %388 = load i64, ptr %387, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %381, i64 noundef %388)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %389

389:                                              ; preds = %21
  %390 = load i32, ptr %2, align 4, !tbaa !5
  %391 = add nsw i32 %390, 1
  store i32 %391, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !11

392:                                              ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 -4557430888798830399, ptr %4, align 8, !tbaa !9
  %393 = load i32, ptr @cur, align 4, !tbaa !5
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %394
  %396 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %395, i64 0, i64 0
  %397 = getelementptr inbounds [2 x [3 x i64]], ptr %396, i64 0, i64 0
  %398 = getelementptr inbounds [3 x i64], ptr %397, i64 0, i64 1
  %399 = load i64, ptr %398, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %399)
  %400 = load i32, ptr @cur, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %401
  %403 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %402, i64 0, i64 0
  %404 = getelementptr inbounds [2 x [3 x i64]], ptr %403, i64 0, i64 0
  %405 = getelementptr inbounds [3 x i64], ptr %404, i64 0, i64 2
  %406 = load i64, ptr %405, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %406)
  %407 = load i32, ptr @cur, align 4, !tbaa !5
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %408
  %410 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %409, i64 0, i64 1
  %411 = getelementptr inbounds [2 x [3 x i64]], ptr %410, i64 0, i64 1
  %412 = getelementptr inbounds [3 x i64], ptr %411, i64 0, i64 1
  %413 = load i64, ptr %412, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %413)
  %414 = load i32, ptr @cur, align 4, !tbaa !5
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %415
  %417 = getelementptr inbounds [2 x [2 x [3 x i64]]], ptr %416, i64 0, i64 1
  %418 = getelementptr inbounds [2 x [3 x i64]], ptr %417, i64 0, i64 1
  %419 = getelementptr inbounds [3 x i64], ptr %418, i64 0, i64 2
  %420 = load i64, ptr %419, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %420)
  %421 = load i64, ptr %4, align 8, !tbaa !9
  %422 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %421)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z5clearPA2_A3_x(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2

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

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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

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


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

@n = external dso_local global i32, align 4
@cur = external dso_local local_unnamed_addr global i32, align 4
@pre = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local global [2 x [2 x [2 x [3 x i64]]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = load i32, ptr @cur, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %5
  tail call void @_Z5clearPA2_A3_x(ptr noundef nonnull %6)
  %7 = load i32, ptr @cur, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %8
  store i64 0, ptr %9, align 16, !tbaa !9
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr @cur, align 4, !tbaa !5
  %.pre3 = sext i32 %.pre to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %.pre-phi = phi i64 [ %.pre3, %._crit_edge.loopexit ], [ %8, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store i64 -4557430888798830399, ptr %2, align 8, !tbaa !9
  %12 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %.pre-phi, i64 0, i64 0, i64 1
  %13 = load i64, ptr %12, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %13)
  %14 = load i32, ptr @cur, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %15, i64 0, i64 0, i64 2
  %17 = load i64, ptr %16, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %17)
  %18 = load i32, ptr @cur, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %19, i64 1, i64 1, i64 1
  %21 = load i64, ptr %20, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %21)
  %22 = load i32, ptr @cur, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %23, i64 1, i64 1, i64 2
  %25 = load i64, ptr %24, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %25)
  %26 = load i64, ptr %2, align 8, !tbaa !9
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  ret i32 0

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02 = phi i32 [ %243, %.lr.ph ], [ 0, %0 ]
  %28 = load i32, ptr @pre, align 4, !tbaa !5
  %29 = xor i32 %28, 1
  store i32 %29, ptr @pre, align 4, !tbaa !5
  %30 = load i32, ptr @cur, align 4, !tbaa !5
  %31 = xor i32 %30, 1
  store i32 %31, ptr @cur, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %32
  call void @_Z5clearPA2_A3_x(ptr noundef nonnull %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %35 = load i32, ptr @cur, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %36
  %38 = load i32, ptr @pre, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %39
  %41 = load i64, ptr %40, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %41)
  %42 = load i32, ptr @cur, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %43, i64 1
  %45 = load i32, ptr @pre, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %46
  %48 = load i64, ptr %47, align 16, !tbaa !9
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = add nsw i64 %48, %50
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %44, i64 noundef %51)
  %52 = load i32, ptr @cur, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %53, i64 1
  %55 = load i32, ptr @pre, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %56, i64 1
  %58 = load i64, ptr %57, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %54, i64 noundef %58)
  %59 = load i32, ptr @cur, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %60, i64 0, i64 0, i64 1
  %62 = load i32, ptr @pre, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %63
  %65 = load i64, ptr %64, align 16, !tbaa !9
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = add nsw i64 %65, %67
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %61, i64 noundef %68)
  %69 = load i32, ptr @cur, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %70, i64 0, i64 0, i64 1
  %72 = load i32, ptr @pre, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %73, i64 0, i64 0, i64 1
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = add nsw i64 %75, %77
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %71, i64 noundef %78)
  %79 = load i32, ptr @cur, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %80, i64 0, i64 1, i64 1
  %82 = load i32, ptr @pre, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %83
  %85 = load i64, ptr %84, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %81, i64 noundef %85)
  %86 = load i32, ptr @cur, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %87, i64 0, i64 1, i64 1
  %89 = load i32, ptr @pre, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %90, i64 0, i64 0, i64 1
  %92 = load i64, ptr %91, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %88, i64 noundef %92)
  %93 = load i32, ptr @cur, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %94, i64 0, i64 1, i64 1
  %96 = load i32, ptr @pre, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %97, i64 0, i64 1, i64 1
  %99 = load i64, ptr %98, align 16, !tbaa !9
  %100 = load i32, ptr %1, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = add nsw i64 %99, %101
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %95, i64 noundef %102)
  %103 = load i32, ptr @cur, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %104, i64 1, i64 0, i64 1
  %106 = load i32, ptr @pre, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %107, i64 1
  %109 = load i64, ptr %108, align 16, !tbaa !9
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = add nsw i64 %109, %111
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %105, i64 noundef %112)
  %113 = load i32, ptr @cur, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %114, i64 1, i64 0, i64 1
  %116 = load i32, ptr @pre, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %117, i64 1, i64 0, i64 1
  %119 = load i64, ptr %118, align 8, !tbaa !9
  %120 = load i32, ptr %1, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = add nsw i64 %119, %121
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %115, i64 noundef %122)
  %123 = load i32, ptr @cur, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %124, i64 1, i64 1, i64 1
  %126 = load i32, ptr @pre, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %127, i64 1
  %129 = load i64, ptr %128, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %125, i64 noundef %129)
  %130 = load i32, ptr @cur, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %131, i64 1, i64 1, i64 1
  %133 = load i32, ptr @pre, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %134, i64 1, i64 0, i64 1
  %136 = load i64, ptr %135, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %132, i64 noundef %136)
  %137 = load i32, ptr @cur, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %138, i64 1, i64 1, i64 1
  %140 = load i32, ptr @pre, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %141, i64 1, i64 1, i64 1
  %143 = load i64, ptr %142, align 16, !tbaa !9
  %144 = load i32, ptr %1, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = add nsw i64 %143, %145
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %139, i64 noundef %146)
  %147 = load i32, ptr @cur, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %148, i64 0, i64 0, i64 2
  %150 = load i32, ptr @pre, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %151, i64 0, i64 0, i64 1
  %153 = load i64, ptr %152, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %149, i64 noundef %153)
  %154 = load i32, ptr @cur, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %155, i64 0, i64 0, i64 2
  %157 = load i32, ptr @pre, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %158, i64 0, i64 0, i64 2
  %160 = load i64, ptr %159, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %156, i64 noundef %160)
  %161 = load i32, ptr @cur, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %162, i64 1, i64 0, i64 2
  %164 = load i32, ptr @pre, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %165, i64 0, i64 0, i64 1
  %167 = load i64, ptr %166, align 8, !tbaa !9
  %168 = load i32, ptr %1, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = add nsw i64 %167, %169
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %163, i64 noundef %170)
  %171 = load i32, ptr @cur, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %172, i64 1, i64 0, i64 2
  %174 = load i32, ptr @pre, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %175, i64 0, i64 0, i64 2
  %177 = load i64, ptr %176, align 16, !tbaa !9
  %178 = load i32, ptr %1, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = add nsw i64 %177, %179
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %173, i64 noundef %180)
  %181 = load i32, ptr @cur, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %182, i64 1, i64 0, i64 2
  %184 = load i32, ptr @pre, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %185, i64 1, i64 0, i64 1
  %187 = load i64, ptr %186, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %183, i64 noundef %187)
  %188 = load i32, ptr @cur, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %189, i64 1, i64 0, i64 2
  %191 = load i32, ptr @pre, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %192, i64 1, i64 0, i64 2
  %194 = load i64, ptr %193, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %190, i64 noundef %194)
  %195 = load i32, ptr @cur, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %196, i64 0, i64 1, i64 2
  %198 = load i32, ptr @pre, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %199, i64 0, i64 1, i64 1
  %201 = load i64, ptr %200, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %197, i64 noundef %201)
  %202 = load i32, ptr @cur, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %203, i64 0, i64 1, i64 2
  %205 = load i32, ptr @pre, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %206, i64 0, i64 1, i64 2
  %208 = load i64, ptr %207, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %204, i64 noundef %208)
  %209 = load i32, ptr @cur, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %210, i64 1, i64 1, i64 2
  %212 = load i32, ptr @pre, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %213, i64 0, i64 1, i64 1
  %215 = load i64, ptr %214, align 16, !tbaa !9
  %216 = load i32, ptr %1, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = add nsw i64 %215, %217
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %211, i64 noundef %218)
  %219 = load i32, ptr @cur, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %220, i64 1, i64 1, i64 2
  %222 = load i32, ptr @pre, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %223, i64 0, i64 1, i64 2
  %225 = load i64, ptr %224, align 8, !tbaa !9
  %226 = load i32, ptr %1, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = add nsw i64 %225, %227
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %221, i64 noundef %228)
  %229 = load i32, ptr @cur, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %230, i64 1, i64 1, i64 2
  %232 = load i32, ptr @pre, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %233, i64 1, i64 1, i64 1
  %235 = load i64, ptr %234, align 16, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %231, i64 noundef %235)
  %236 = load i32, ptr @cur, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %237, i64 1, i64 1, i64 2
  %239 = load i32, ptr @pre, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [2 x [2 x [2 x [3 x i64]]]], ptr @f, i64 0, i64 %240, i64 1, i64 1, i64 2
  %242 = load i64, ptr %241, align 8, !tbaa !9
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %238, i64 noundef %242)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %243 = add nuw nsw i32 %.02, 1
  %244 = load i32, ptr @n, align 4, !tbaa !5
  %245 = icmp slt i32 %243, %244
  br i1 %245, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !11
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z5clearPA2_A3_x(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2

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

; 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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass