; LLVM IR from tangjz/acm-icpc :: self_training/2015-04-17 (B)

; 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
@w = external dso_local global [3 x [3 x i32]], align 16
@f = external dso_local global [41 x [3 x [3 x i64]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 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 i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %32, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 3
  br i1 %13, label %15, label %14

14:                                               ; preds = %11
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %35

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

16:                                               ; preds = %28, %15
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 3
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %16
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [3 x [3 x i32]], ptr @w, i64 0, i64 %22
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 %25
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %26)
  br label %28

28:                                               ; preds = %20
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %4, align 4, !tbaa !5
  br label %16, !llvm.loop !9

31:                                               ; preds = %19
  br label %32

32:                                               ; preds = %31
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

35:                                               ; preds = %14
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %166, %35
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

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

43:                                               ; preds = %162, %42
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 3
  br i1 %45, label %47, label %46

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

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

48:                                               ; preds = %158, %47
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 3
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %161

52:                                               ; preds = %48
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = icmp ne i32 %53, %54
  br i1 %55, label %56, label %157

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sub nsw i32 3, %57
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sub nsw i32 %58, %59
  store i32 %60, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [3 x [3 x i64]], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [3 x i64], ptr %67, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !12
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [3 x [3 x i32]], ptr @w, i64 0, i64 %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [3 x i32], ptr %74, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = add nsw i64 %71, %79
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %83
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [3 x [3 x i64]], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [3 x i64], ptr %87, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !12
  %92 = add nsw i64 %80, %91
  store i64 %92, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %95
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [3 x [3 x i64]], ptr %96, i64 0, i64 %98
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [3 x i64], ptr %99, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !12
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [3 x [3 x i32]], ptr @w, i64 0, i64 %105
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [3 x i32], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = add nsw i64 %103, %111
  %113 = load i32, ptr %5, align 4, !tbaa !5
  %114 = sub nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [3 x [3 x i64]], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [3 x i64], ptr %119, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !12
  %124 = add nsw i64 %112, %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [3 x [3 x i32]], ptr @w, i64 0, i64 %126
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [3 x i32], ptr %127, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = add nsw i64 %124, %132
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %136
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [3 x [3 x i64]], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [3 x i64], ptr %140, i64 0, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !12
  %145 = add nsw i64 %133, %144
  store i64 %145, ptr %10, align 8, !tbaa !12
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %147 = load i64, ptr %146, align 8, !tbaa !12
  %148 = load i32, ptr %5, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %149
  %151 = load i32, ptr %6, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [3 x [3 x i64]], ptr %150, i64 0, i64 %152
  %154 = load i32, ptr %7, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [3 x i64], ptr %153, i64 0, i64 %155
  store i64 %147, ptr %156, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %157

157:                                              ; preds = %56, %52
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %7, align 4, !tbaa !5
  br label %48, !llvm.loop !14

161:                                              ; preds = %51
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %6, align 4, !tbaa !5
  br label %43, !llvm.loop !15

165:                                              ; preds = %46
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %5, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %5, align 4, !tbaa !5
  br label %37, !llvm.loop !16

169:                                              ; preds = %41
  %170 = load i32, ptr @n, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %171
  %173 = getelementptr inbounds [3 x [3 x i64]], ptr %172, i64 0, i64 0
  %174 = getelementptr inbounds [3 x i64], ptr %173, i64 0, i64 2
  %175 = load i64, ptr %174, align 8, !tbaa !12
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %175)
  ret i32 0
}

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

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

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

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

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

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

@n = external dso_local global i32, align 4
@w = external dso_local global [3 x [3 x i32]], align 16
@f = external dso_local local_unnamed_addr global [41 x [3 x [3 x i64]]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader47:
  %0 = alloca i64, align 8
  %1 = alloca i64, align 8
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w)
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 4))
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 8))
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 12))
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 16))
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 20))
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 24))
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 28))
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 32))
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %.not52 = icmp slt i32 %12, 1
  br i1 %.not52, label %.preheader47.._crit_edge_crit_edge, label %.preheader.peel.next

.preheader47.._crit_edge_crit_edge:               ; preds = %.preheader47
  %.pre = sext i32 %12 to i64
  br label %._crit_edge

.preheader.peel.next:                             ; preds = %.preheader47, %.preheader.peel.next
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %.preheader.peel.next ], [ 1, %.preheader47 ]
  %13 = add nsw i64 %indvars.iv60, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %14 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 2
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = add nsw i64 %15, %17
  %19 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 1
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = add nsw i64 %18, %20
  store i64 %21, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %22 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 1
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 0
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %factor.1.peel = shl i64 %23, 1
  %30 = add i64 %factor.1.peel, %25
  %31 = add i64 %30, %27
  %32 = add i64 %31, %29
  store i64 %32, ptr %1, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 0, i64 1
  store i64 %34, ptr %35, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %36 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 1
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = add nsw i64 %37, %39
  %41 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 2
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = add nsw i64 %40, %42
  store i64 %43, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %44 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 2
  %45 = load i64, ptr %44, align 8, !tbaa !9
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 0
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %factor.2.peel = shl i64 %45, 1
  %52 = add i64 %factor.2.peel, %47
  %53 = add i64 %52, %49
  %54 = add i64 %53, %51
  store i64 %54, ptr %1, align 8, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 0, i64 2
  store i64 %56, ptr %57, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %58 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 2
  %59 = load i64, ptr %58, align 8, !tbaa !9
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = add nsw i64 %59, %61
  %63 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 0
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = add nsw i64 %62, %64
  store i64 %65, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %66 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 0
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 1
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !5
  %73 = sext i32 %72 to i64
  %factor.peel = shl i64 %67, 1
  %74 = add i64 %factor.peel, %69
  %75 = add i64 %74, %71
  %76 = add i64 %75, %73
  store i64 %76, ptr %1, align 8, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %78 = load i64, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 1, i64 0
  store i64 %78, ptr %79, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %80 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 0
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = add nsw i64 %81, %83
  %85 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 2
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = add nsw i64 %84, %86
  store i64 %87, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %88 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 2
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 1
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !5
  %95 = sext i32 %94 to i64
  %factor.2.peel71 = shl i64 %89, 1
  %96 = add i64 %factor.2.peel71, %91
  %97 = add i64 %96, %93
  %98 = add i64 %97, %95
  store i64 %98, ptr %1, align 8, !tbaa !9
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 1, i64 2
  store i64 %100, ptr %101, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %102 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 1
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = add nsw i64 %103, %105
  %107 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 0
  %108 = load i64, ptr %107, align 8, !tbaa !9
  %109 = add nsw i64 %106, %108
  store i64 %109, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %110 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 0
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 2
  %115 = load i64, ptr %114, align 8, !tbaa !9
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %factor.peel73 = shl i64 %111, 1
  %118 = add i64 %factor.peel73, %113
  %119 = add i64 %118, %115
  %120 = add i64 %119, %117
  store i64 %120, ptr %1, align 8, !tbaa !9
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 2, i64 0
  store i64 %122, ptr %123, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %124 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 0
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = add nsw i64 %125, %127
  %129 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 0, i64 1
  %130 = load i64, ptr %129, align 8, !tbaa !9
  %131 = add nsw i64 %128, %130
  store i64 %131, ptr %0, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %132 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 2, i64 1
  %133 = load i64, ptr %132, align 8, !tbaa !9
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %13, i64 1, i64 2
  %137 = load i64, ptr %136, align 8, !tbaa !9
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %factor.1.peel75 = shl i64 %133, 1
  %140 = add i64 %factor.1.peel75, %135
  %141 = add i64 %140, %137
  %142 = add i64 %141, %139
  store i64 %142, ptr %1, align 8, !tbaa !9
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %144 = load i64, ptr %143, align 8, !tbaa !9
  %145 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %indvars.iv60, i64 2, i64 1
  store i64 %144, ptr %145, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %.not.not = icmp slt i64 %indvars.iv60, %147
  br i1 %.not.not, label %.preheader.peel.next, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.preheader.peel.next, %.preheader47.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader47.._crit_edge_crit_edge ], [ %147, %.preheader.peel.next ]
  %148 = getelementptr inbounds [41 x [3 x [3 x i64]]], ptr @f, i64 0, i64 %.pre-phi, i64 0, i64 2
  %149 = load i64, ptr %148, align 8, !tbaa !9
  %150 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %149)
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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) #1

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass