; LLVM IR from tangjz/acm-icpc :: self_training/2015-04-30 (E)

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

8:                                                ; preds = %87, %0
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = icmp sle i32 %9, 1
  br i1 %10, label %12, label %11

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

12:                                               ; preds = %8
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 %14
  %16 = getelementptr inbounds [233 x [233 x i64]], ptr %15, i64 0, i64 0
  %17 = getelementptr inbounds [233 x i64], ptr %16, i64 0, i64 0
  store i64 1, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %83, %12
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sub nsw i32 %20, %21
  %23 = icmp sle i32 %19, %22
  br i1 %23, label %25, label %24

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

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

26:                                               ; preds = %79, %25
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sub nsw i32 %28, 1
  %30 = or i32 %29, 1
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = add nsw i32 %30, %31
  %33 = icmp sle i32 %27, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %26
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 %37
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [233 x [233 x i64]], ptr %38, i64 0, i64 %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [233 x i64], ptr %42, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 %48
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [233 x [233 x i64]], ptr %49, i64 0, i64 %52
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [233 x i64], ptr %53, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = or i32 %60, 1
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = add nsw i32 %61, %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sub nsw i32 %63, %64
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = mul nsw i64 %58, %67
  %69 = add nsw i64 %46, %68
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 %71
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [233 x [233 x i64]], ptr %72, i64 0, i64 %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [233 x i64], ptr %75, i64 0, i64 %77
  store i64 %69, ptr %78, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %35
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %5, align 4, !tbaa !5
  br label %26, !llvm.loop !11

82:                                               ; preds = %34
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !13

86:                                               ; preds = %24
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %2, align 4, !tbaa !5
  br label %8, !llvm.loop !14

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

91:                                               ; preds = %117, %90
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = load i32, ptr @k, align 4, !tbaa !5
  %94 = icmp sle i32 %92, %93
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %91
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [233 x [233 x i64]], ptr @f, i64 0, i64 %98
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [233 x i64], ptr %99, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [233 x [233 x i64]], ptr getelementptr inbounds ([2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1), i64 0, i64 %106
  %108 = load i32, ptr @k, align 4, !tbaa !5
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = sub nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [233 x i64], ptr %107, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = mul nsw i64 %103, %113
  %115 = load i64, ptr @ans, align 8, !tbaa !9
  %116 = add nsw i64 %115, %114
  store i64 %116, ptr @ans, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %96
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %6, align 4, !tbaa !5
  br label %91, !llvm.loop !15

120:                                              ; preds = %95
  %121 = load i64, ptr @ans, align 8, !tbaa !9
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %121)
  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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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 = { nounwind }

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

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


; 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
@k = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [2 x [233 x [233 x i64]]], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nofree 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 @n, ptr noundef nonnull @k)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = sext i32 %2 to i64
  store i64 1, ptr @f, align 16, !tbaa !9
  %.not3136 = icmp slt i32 %2, 1
  br i1 %.not3136, label %._crit_edge38.thread, label %.preheader33.preheader

._crit_edge38.thread:                             ; preds = %0
  store i64 1, ptr getelementptr inbounds (i8, ptr @f, i64 434312), align 8, !tbaa !9
  br label %._crit_edge38.1

.lr.ph42:                                         ; preds = %._crit_edge38.1
  %4 = add nsw i32 %2, -1
  %5 = sext i32 %4 to i64
  %6 = zext nneg i32 %55 to i64
  %7 = add nuw i32 %55, 1
  %wide.trip.count60 = zext i32 %7 to i64
  %min.iters.check88 = icmp ult i32 %55, 3
  br i1 %min.iters.check88, label %scalar.ph87.preheader, label %vector.ph89

scalar.ph87.preheader:                            ; preds = %middle.block86, %.lr.ph42
  %indvars.iv57.ph = phi i64 [ 0, %.lr.ph42 ], [ %n.vec91, %middle.block86 ]
  %.ph = phi i64 [ %.pre64, %.lr.ph42 ], [ %20, %middle.block86 ]
  br label %scalar.ph87

vector.ph89:                                      ; preds = %.lr.ph42
  %n.vec91 = and i64 %wide.trip.count60, 4294967292
  %8 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.pre64, i64 0
  br label %vector.body93

vector.body93:                                    ; preds = %vector.body93, %vector.ph89
  %index94 = phi i64 [ 0, %vector.ph89 ], [ %index.next101, %vector.body93 ]
  %vec.phi = phi <2 x i64> [ %8, %vector.ph89 ], [ %17, %vector.body93 ]
  %vec.phi95 = phi <2 x i64> [ zeroinitializer, %vector.ph89 ], [ %18, %vector.body93 ]
  %9 = getelementptr inbounds [233 x [233 x i64]], ptr @f, i64 0, i64 %3, i64 %index94
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %wide.load96 = load <2 x i64>, ptr %9, align 8, !tbaa !9
  %wide.load97 = load <2 x i64>, ptr %10, align 8, !tbaa !9
  %11 = sub nsw i64 %6, %index94
  %12 = getelementptr inbounds [233 x [233 x i64]], ptr getelementptr inbounds (i8, ptr @f, i64 434312), i64 0, i64 %5, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 -8
  %14 = getelementptr inbounds i8, ptr %12, i64 -24
  %wide.load98 = load <2 x i64>, ptr %13, align 8, !tbaa !9
  %reverse = shufflevector <2 x i64> %wide.load98, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %wide.load99 = load <2 x i64>, ptr %14, align 8, !tbaa !9
  %reverse100 = shufflevector <2 x i64> %wide.load99, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %15 = mul nsw <2 x i64> %reverse, %wide.load96
  %16 = mul nsw <2 x i64> %reverse100, %wide.load97
  %17 = add <2 x i64> %vec.phi, %15
  %18 = add <2 x i64> %vec.phi95, %16
  %index.next101 = add nuw i64 %index94, 4
  %19 = icmp eq i64 %index.next101, %n.vec91
  br i1 %19, label %middle.block86, label %vector.body93, !llvm.loop !11

middle.block86:                                   ; preds = %vector.body93
  %bin.rdx = add <2 x i64> %18, %17
  %20 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n102 = icmp eq i64 %n.vec91, %wide.trip.count60
  br i1 %cmp.n102, label %._crit_edge43, label %scalar.ph87.preheader

.preheader33.preheader:                           ; preds = %0
  %21 = add nuw i32 %2, 1
  %wide.trip.count52 = zext i32 %21 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge, %.preheader33.preheader
  %indvars.iv47 = phi i64 [ 1, %.preheader33.preheader ], [ %indvars.iv.next48, %._crit_edge ]
  %22 = add nsw i64 %indvars.iv47, -1
  %23 = trunc nuw nsw i64 %22 to i32
  %24 = or i32 %23, 1
  %25 = add i32 %24, 1
  %wide.trip.count = zext i32 %25 to i64
  %.phi.trans.insert = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 0, i64 %22, i64 -1
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !9
  %min.iters.check = icmp eq i32 %25, 0
  br i1 %min.iters.check, label %scalar.ph, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %vector.recur.init = insertelement <2 x i64> poison, i64 %.pre, i64 1
  %broadcast.splatinsert = insertelement <2 x i32> poison, i32 %25, i64 0
  %broadcast.splat = shufflevector <2 x i32> %broadcast.splatinsert, <2 x i32> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x i64> [ %vector.recur.init, %vector.ph ], [ %wide.load, %vector.body ]
  %vec.ind = phi <2 x i32> [ <i32 0, i32 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %26 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 0, i64 %22, i64 %index
  %wide.load = load <2 x i64>, ptr %26, align 8, !tbaa !9
  %27 = shufflevector <2 x i64> %vector.recur, <2 x i64> %wide.load, <2 x i32> <i32 1, i32 2>
  %28 = sub <2 x i32> %broadcast.splat, %vec.ind
  %29 = sext <2 x i32> %28 to <2 x i64>
  %30 = mul nsw <2 x i64> %27, %29
  %31 = add nsw <2 x i64> %30, %wide.load
  %32 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 0, i64 %indvars.iv47, i64 %index
  store <2 x i64> %31, ptr %32, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %vec.ind.next = add <2 x i32> %vec.ind, <i32 2, i32 2>
  %33 = icmp eq i64 %index.next, %wide.trip.count
  br i1 %33, label %._crit_edge, label %vector.body, !llvm.loop !15

._crit_edge38:                                    ; preds = %._crit_edge
  store i64 1, ptr getelementptr inbounds (i8, ptr @f, i64 434312), align 8, !tbaa !9
  %.not3136.1 = icmp eq i32 %2, 1
  br i1 %.not3136.1, label %._crit_edge38.1, label %.preheader33.preheader.1

.preheader33.preheader.1:                         ; preds = %._crit_edge38
  %wide.trip.count52.1 = zext nneg i32 %2 to i64
  br label %.preheader33.1

.preheader33.1:                                   ; preds = %._crit_edge.1, %.preheader33.preheader.1
  %indvars.iv47.1 = phi i64 [ 1, %.preheader33.preheader.1 ], [ %indvars.iv.next48.1, %._crit_edge.1 ]
  %34 = add nsw i64 %indvars.iv47.1, -1
  %35 = trunc nuw nsw i64 %34 to i32
  %36 = or i32 %35, 1
  %.not3234.1 = icmp slt i32 %36, -1
  br i1 %.not3234.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.preheader33.1
  %37 = add i32 %36, 2
  %wide.trip.count.1 = zext i32 %37 to i64
  %.phi.trans.insert62 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1, i64 %34, i64 -1
  %.pre63 = load i64, ptr %.phi.trans.insert62, align 8, !tbaa !9
  %min.iters.check68 = icmp eq i32 %37, 1
  br i1 %min.iters.check68, label %scalar.ph67.preheader, label %vector.ph69

vector.ph69:                                      ; preds = %.lr.ph.1
  %n.vec71 = add nsw i64 %wide.trip.count.1, -1
  %vector.recur.init75 = insertelement <2 x i64> poison, i64 %.pre63, i64 1
  %broadcast.splatinsert80 = insertelement <2 x i32> poison, i32 %37, i64 0
  %broadcast.splat81 = shufflevector <2 x i32> %broadcast.splatinsert80, <2 x i32> poison, <2 x i32> zeroinitializer
  br label %vector.body73

vector.body73:                                    ; preds = %vector.body73, %vector.ph69
  %index74 = phi i64 [ 0, %vector.ph69 ], [ %index.next82, %vector.body73 ]
  %vector.recur76 = phi <2 x i64> [ %vector.recur.init75, %vector.ph69 ], [ %wide.load79, %vector.body73 ]
  %vec.ind77 = phi <2 x i32> [ <i32 0, i32 1>, %vector.ph69 ], [ %vec.ind.next78, %vector.body73 ]
  %38 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1, i64 %34, i64 %index74
  %wide.load79 = load <2 x i64>, ptr %38, align 8, !tbaa !9
  %39 = shufflevector <2 x i64> %vector.recur76, <2 x i64> %wide.load79, <2 x i32> <i32 1, i32 2>
  %40 = sub <2 x i32> %broadcast.splat81, %vec.ind77
  %41 = sext <2 x i32> %40 to <2 x i64>
  %42 = mul nsw <2 x i64> %39, %41
  %43 = add nsw <2 x i64> %42, %wide.load79
  %44 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1, i64 %indvars.iv47.1, i64 %index74
  store <2 x i64> %43, ptr %44, align 8, !tbaa !9
  %index.next82 = add nuw i64 %index74, 2
  %vec.ind.next78 = add <2 x i32> %vec.ind77, <i32 2, i32 2>
  %45 = icmp eq i64 %index.next82, %n.vec71
  br i1 %45, label %middle.block66, label %vector.body73, !llvm.loop !16

middle.block66:                                   ; preds = %vector.body73
  %vector.recur.extract83 = extractelement <2 x i64> %wide.load79, i64 1
  br label %scalar.ph67.preheader

scalar.ph67.preheader:                            ; preds = %middle.block66, %.lr.ph.1
  %.ph106 = phi i64 [ %.pre63, %.lr.ph.1 ], [ %vector.recur.extract83, %middle.block66 ]
  %indvars.iv.1.ph = phi i64 [ 0, %.lr.ph.1 ], [ %n.vec71, %middle.block66 ]
  br label %scalar.ph67

scalar.ph67:                                      ; preds = %scalar.ph67.preheader, %scalar.ph67
  %46 = phi i64 [ %48, %scalar.ph67 ], [ %.ph106, %scalar.ph67.preheader ]
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %scalar.ph67 ], [ %indvars.iv.1.ph, %scalar.ph67.preheader ]
  %47 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1, i64 %34, i64 %indvars.iv.1
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = trunc nuw nsw i64 %indvars.iv.1 to i32
  %50 = sub i32 %37, %49
  %51 = sext i32 %50 to i64
  %52 = mul nsw i64 %46, %51
  %53 = add nsw i64 %52, %48
  %54 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 1, i64 %indvars.iv47.1, i64 %indvars.iv.1
  store i64 %53, ptr %54, align 8, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count.1
  br i1 %exitcond.1.not, label %._crit_edge.1, label %scalar.ph67, !llvm.loop !17

._crit_edge.1:                                    ; preds = %scalar.ph67, %.preheader33.1
  %indvars.iv.next48.1 = add nuw nsw i64 %indvars.iv47.1, 1
  %exitcond53.1.not = icmp eq i64 %indvars.iv.next48.1, %wide.trip.count52.1
  br i1 %exitcond53.1.not, label %._crit_edge38.1, label %.preheader33.1, !llvm.loop !18

._crit_edge38.1:                                  ; preds = %._crit_edge.1, %._crit_edge38.thread, %._crit_edge38
  %55 = load i32, ptr @k, align 4, !tbaa !5
  %.not40 = icmp slt i32 %55, 0
  %.pre64 = load i64, ptr @ans, align 8, !tbaa !9
  br i1 %.not40, label %._crit_edge38.1._crit_edge, label %.lr.ph42

._crit_edge:                                      ; preds = %vector.body, %scalar.ph
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count52
  br i1 %exitcond53.not, label %._crit_edge38, label %.lr.ph, !llvm.loop !18

scalar.ph:                                        ; preds = %.lr.ph, %scalar.ph
  %56 = phi i64 [ %58, %scalar.ph ], [ %.pre, %.lr.ph ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ 0, %.lr.ph ]
  %57 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 0, i64 %22, i64 %indvars.iv
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = trunc nuw nsw i64 %indvars.iv to i32
  %60 = sub i32 %25, %59
  %61 = sext i32 %60 to i64
  %62 = mul nsw i64 %56, %61
  %63 = add nsw i64 %62, %58
  %64 = getelementptr inbounds [2 x [233 x [233 x i64]]], ptr @f, i64 0, i64 0, i64 %indvars.iv47, i64 %indvars.iv
  store i64 %63, ptr %64, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !19

._crit_edge43:                                    ; preds = %scalar.ph87, %middle.block86
  %.lcssa = phi i64 [ %20, %middle.block86 ], [ %74, %scalar.ph87 ]
  store i64 %.lcssa, ptr @ans, align 8, !tbaa !9
  br label %._crit_edge38.1._crit_edge

._crit_edge38.1._crit_edge:                       ; preds = %._crit_edge38.1, %._crit_edge43
  %65 = phi i64 [ %.lcssa, %._crit_edge43 ], [ %.pre64, %._crit_edge38.1 ]
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %65)
  ret i32 0

scalar.ph87:                                      ; preds = %scalar.ph87.preheader, %scalar.ph87
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %scalar.ph87 ], [ %indvars.iv57.ph, %scalar.ph87.preheader ]
  %67 = phi i64 [ %74, %scalar.ph87 ], [ %.ph, %scalar.ph87.preheader ]
  %68 = getelementptr inbounds [233 x [233 x i64]], ptr @f, i64 0, i64 %3, i64 %indvars.iv57
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = sub nsw i64 %6, %indvars.iv57
  %71 = getelementptr inbounds [233 x [233 x i64]], ptr getelementptr inbounds (i8, ptr @f, i64 434312), i64 0, i64 %5, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = mul nsw i64 %72, %69
  %74 = add nsw i64 %67, %73
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count60
  br i1 %exitcond61.not, label %._crit_edge43, label %scalar.ph87, !llvm.loop !20
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #2

attributes #0 = { mustprogress nofree 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !13, !14}
!16 = distinct !{!16, !12, !13, !14}
!17 = distinct !{!17, !12, !14, !13}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !14, !13}
!20 = distinct !{!20, !12, !14, !13}


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