; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/SQBR (sqbr)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 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 [39 x i32], align 16
  %7 = alloca [39 x [39 x i32]], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 156, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 6084, ptr %7) #3
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %14

14:                                               ; preds = %143, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr %2, align 4, !tbaa !5
  %17 = icmp ne i32 %15, 0
  br i1 %17, label %18, label %151

18:                                               ; preds = %14
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %28, %18
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 39
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %31

24:                                               ; preds = %20
  %25 = load i32, ptr %8, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [39 x i32], ptr %6, i64 0, i64 %26
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %28

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

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

32:                                               ; preds = %42, %31
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %45

37:                                               ; preds = %32
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [39 x i32], ptr %6, i64 0, i64 %40
  store i32 1, ptr %41, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !5
  br label %32, !llvm.loop !11

45:                                               ; preds = %36
  %46 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 1
  %47 = getelementptr inbounds [39 x i32], ptr %46, i64 0, i64 1
  store i32 1, ptr %47, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %140, %45
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = mul nsw i32 2, %50
  %52 = icmp sle i32 %49, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %143

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

55:                                               ; preds = %136, %54
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %139

60:                                               ; preds = %55
  %61 = load i32, ptr %10, align 4, !tbaa !5
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %74

63:                                               ; preds = %60
  %64 = load i32, ptr %12, align 4, !tbaa !5
  %65 = icmp eq i32 %64, 1
  %66 = zext i1 %65 to i64
  %67 = select i1 %65, i32 1, i32 0
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %69
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [39 x i32], ptr %70, i64 0, i64 %72
  store i32 %67, ptr %73, align 4, !tbaa !5
  br label %135

74:                                               ; preds = %60
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [39 x i32], ptr %6, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %102

80:                                               ; preds = %74
  %81 = load i32, ptr %12, align 4, !tbaa !5
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  br label %94

84:                                               ; preds = %80
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %87
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [39 x i32], ptr %88, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %84, %83
  %95 = phi i32 [ 0, %83 ], [ %93, %84 ]
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %97
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [39 x i32], ptr %98, i64 0, i64 %100
  store i32 %95, ptr %101, align 4, !tbaa !5
  br label %134

102:                                              ; preds = %74
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %105
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [39 x i32], ptr %106, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %102
  br label %125

115:                                              ; preds = %102
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sub nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [39 x i32], ptr %119, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %115, %114
  %126 = phi i32 [ 0, %114 ], [ %124, %115 ]
  %127 = add nsw i32 %111, %126
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %129
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [39 x i32], ptr %130, i64 0, i64 %132
  store i32 %127, ptr %133, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %125, %94
  br label %135

135:                                              ; preds = %134, %63
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %12, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %12, align 4, !tbaa !5
  br label %55, !llvm.loop !12

139:                                              ; preds = %59
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %10, align 4, !tbaa !5
  br label %48, !llvm.loop !13

143:                                              ; preds = %53
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = mul nsw i32 2, %144
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [39 x [39 x i32]], ptr %7, i64 0, i64 %146
  %148 = getelementptr inbounds [39 x i32], ptr %147, i64 0, i64 0
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %149)
  br label %14, !llvm.loop !14

151:                                              ; preds = %14
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 6084, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 156, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %152 = load i32, ptr %1, align 4
  ret i32 %152
}

; 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

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

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

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


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [39 x i32], align 16
  %6 = alloca [39 x [39 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 156, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 6084, ptr nonnull %6) #5
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr %1, align 4, !tbaa !5
  %.not44 = icmp eq i32 %8, 0
  br i1 %.not44, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %0
  %10 = getelementptr inbounds i8, ptr %6, i64 160
  %11 = getelementptr inbounds i8, ptr %6, i64 156
  %scevgep = getelementptr inbounds i8, ptr %5, i64 4
  br label %.preheader34

.preheader34:                                     ; preds = %.lr.ph46, %._crit_edge43
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(152) %scevgep, i8 0, i64 152, i1 false), !tbaa !5
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader34
  store i32 1, ptr %10, align 16, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = shl i32 %15, 1
  %.not3240 = icmp slt i32 %15, 1
  br i1 %.not3240, label %._crit_edge43, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge
  %smax = call i32 @llvm.smax.i32(i32 %16, i32 1)
  %17 = add nuw nsw i32 %smax, 1
  %wide.trip.count73 = zext nneg i32 %17 to i64
  br label %.preheader

.lr.ph:                                           ; preds = %.preheader34, %.lr.ph
  %.02936 = phi i32 [ %22, %.lr.ph ], [ 0, %.preheader34 ]
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [39 x i32], ptr %5, i64 0, i64 %20
  store i32 1, ptr %21, align 4, !tbaa !5
  %22 = add nuw nsw i32 %.02936, 1
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.preheader, %.split.us
  %indvars.iv68 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next69, %.split.us ]
  %indvars.iv66 = phi i64 [ 2, %.preheader.preheader ], [ %indvars.iv.next67, %.split.us ]
  %25 = icmp eq i64 %indvars.iv68, 1
  %26 = add nsw i64 %indvars.iv68, -1
  br i1 %25, label %.preheader.split.us.preheader, label %.preheader.split

.preheader.split.us.preheader:                    ; preds = %.preheader
  %min.iters.check = icmp ult i64 %indvars.iv66, 8
  br i1 %min.iters.check, label %.preheader.split.us.preheader106, label %vector.ph

vector.ph:                                        ; preds = %.preheader.split.us.preheader
  %n.vec = and i64 %indvars.iv66, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %27 = icmp eq <4 x i64> %vec.ind, <i64 1, i64 1, i64 1, i64 1>
  %28 = icmp eq <4 x i64> %vec.ind, <i64 -3, i64 -3, i64 -3, i64 -3>
  %29 = zext <4 x i1> %27 to <4 x i32>
  %30 = zext <4 x i1> %28 to <4 x i32>
  %31 = getelementptr inbounds [39 x i32], ptr %11, i64 0, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <4 x i32> %29, ptr %31, align 4, !tbaa !5
  store <4 x i32> %30, ptr %32, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %indvars.iv66, %n.vec
  br i1 %cmp.n, label %.split.us, label %.preheader.split.us.preheader106

.preheader.split.us.preheader106:                 ; preds = %middle.block, %.preheader.split.us.preheader
  %indvars.iv61.ph = phi i64 [ 0, %.preheader.split.us.preheader ], [ %n.vec, %middle.block ]
  br label %.preheader.split.us

.preheader.split.us:                              ; preds = %.preheader.split.us.preheader106, %.preheader.split.us
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.preheader.split.us ], [ %indvars.iv61.ph, %.preheader.split.us.preheader106 ]
  %34 = icmp eq i64 %indvars.iv61, 1
  %35 = zext i1 %34 to i32
  %36 = getelementptr inbounds [39 x i32], ptr %11, i64 0, i64 %indvars.iv61
  store i32 %35, ptr %36, align 4, !tbaa !5
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %indvars.iv66
  br i1 %exitcond65.not, label %.split.us, label %.preheader.split.us, !llvm.loop !14

.preheader.split:                                 ; preds = %.preheader
  %37 = getelementptr inbounds [39 x i32], ptr %5, i64 0, i64 %indvars.iv68
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %.preheader.split.split.us.peel.next, label %.preheader.split.split.peel.next

.preheader.split.split.peel.next:                 ; preds = %.preheader.split
  %40 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 1
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 0
  store i32 %41, ptr %42, align 4, !tbaa !5
  %n.vec96 = and i64 %indvars.iv68, 9223372036854775806
  %ind.end97 = or i64 %indvars.iv68, 1
  br label %vector.body99

vector.body99:                                    ; preds = %vector.body99, %.preheader.split.split.peel.next
  %index100 = phi i64 [ 0, %.preheader.split.split.peel.next ], [ %index.next104, %vector.body99 ]
  %offset.idx101 = or disjoint i64 %index100, 1
  %43 = add nuw nsw i64 %index100, 2
  %44 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %43
  %wide.load102 = load <2 x i32>, ptr %44, align 4, !tbaa !5
  %45 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %index100
  %wide.load103 = load <2 x i32>, ptr %45, align 4, !tbaa !5
  %46 = add nsw <2 x i32> %wide.load103, %wide.load102
  %47 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 %offset.idx101
  store <2 x i32> %46, ptr %47, align 4, !tbaa !5
  %index.next104 = add nuw i64 %index100, 2
  %48 = icmp eq i64 %index.next104, %n.vec96
  br i1 %48, label %middle.block91, label %vector.body99, !llvm.loop !15

middle.block91:                                   ; preds = %vector.body99
  %cmp.n105 = icmp eq i64 %indvars.iv68, %n.vec96
  br i1 %cmp.n105, label %.split.us, label %scalar.ph92

.preheader.split.split.us.peel.next:              ; preds = %.preheader.split
  %49 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 0
  store i32 0, ptr %49, align 4, !tbaa !5
  %min.iters.check82 = icmp ult i64 %indvars.iv68, 4
  br i1 %min.iters.check82, label %scalar.ph81.preheader, label %vector.ph83

vector.ph83:                                      ; preds = %.preheader.split.split.us.peel.next
  %n.vec85 = and i64 %indvars.iv68, 9223372036854775804
  %ind.end = or disjoint i64 %n.vec85, 1
  br label %vector.body87

vector.body87:                                    ; preds = %vector.body87, %vector.ph83
  %index88 = phi i64 [ 0, %vector.ph83 ], [ %index.next89, %vector.body87 ]
  %offset.idx = or disjoint i64 %index88, 1
  %50 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %index88
  %wide.load = load <4 x i32>, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 %offset.idx
  store <4 x i32> %wide.load, ptr %51, align 4, !tbaa !5
  %index.next89 = add nuw i64 %index88, 4
  %52 = icmp eq i64 %index.next89, %n.vec85
  br i1 %52, label %middle.block80, label %vector.body87, !llvm.loop !17

middle.block80:                                   ; preds = %vector.body87
  %cmp.n90 = icmp eq i64 %indvars.iv68, %n.vec85
  br i1 %cmp.n90, label %.split.us, label %scalar.ph81.preheader

scalar.ph81.preheader:                            ; preds = %middle.block80, %.preheader.split.split.us.peel.next
  %indvars.iv55.ph = phi i64 [ 1, %.preheader.split.split.us.peel.next ], [ %ind.end, %middle.block80 ]
  br label %scalar.ph81

scalar.ph81:                                      ; preds = %scalar.ph81.preheader, %scalar.ph81
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %scalar.ph81 ], [ %indvars.iv55.ph, %scalar.ph81.preheader ]
  %53 = add nsw i64 %indvars.iv55, -1
  %54 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 %indvars.iv55
  store i32 %55, ptr %56, align 4, !tbaa !5
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %indvars.iv66
  br i1 %exitcond59.not, label %.split.us, label %scalar.ph81, !llvm.loop !18

._crit_edge43:                                    ; preds = %.split.us, %._crit_edge
  %57 = sext i32 %16 to i64
  %58 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %57
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %59)
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %61, 0
  br i1 %.not, label %._crit_edge47, label %.preheader34, !llvm.loop !19

.split.us:                                        ; preds = %scalar.ph92, %scalar.ph81, %.preheader.split.us, %middle.block91, %middle.block80, %middle.block
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count73
  br i1 %exitcond74.not, label %._crit_edge43, label %.preheader, !llvm.loop !20

scalar.ph92:                                      ; preds = %middle.block91, %scalar.ph92
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph92 ], [ %ind.end97, %middle.block91 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %indvars.iv.next
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i64 %indvars.iv, -1
  %66 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %26, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, %64
  %69 = getelementptr inbounds [39 x [39 x i32]], ptr %6, i64 0, i64 %indvars.iv68, i64 %indvars.iv
  store i32 %68, ptr %69, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv66
  br i1 %exitcond.not, label %.split.us, label %scalar.ph92, !llvm.loop !21

._crit_edge47:                                    ; preds = %._crit_edge43, %0
  call void @llvm.lifetime.end.p0(i64 6084, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 156, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = distinct !{!15, !10, !16, !12, !13}
!16 = !{!"llvm.loop.peeled.count", i32 1}
!17 = distinct !{!17, !10, !16, !12, !13}
!18 = distinct !{!18, !10, !16, !13, !12}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !16, !13, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass