; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LTIME/LTIME25/Problem B (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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [71 x [71 x i32]], align 16
@x = external dso_local global [71 x [71 x i32]], align 16
@mx = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = 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 i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %13

13:                                               ; preds = %149, %0
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr @t, align 4, !tbaa !5
  %16 = icmp ne i32 %14, 0
  br i1 %16, label %17, label %152

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

19:                                               ; preds = %42, %17
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

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

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

25:                                               ; preds = %38, %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [71 x [71 x i32]], ptr @a, i64 0, i64 %32
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [71 x i32], ptr %33, i64 0, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
  br label %38

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

41:                                               ; preds = %29
  br label %42

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

45:                                               ; preds = %23
  store i32 0, ptr @mx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %84, %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = icmp sle i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %87

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %80, %51
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %83

57:                                               ; preds = %52
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [71 x i32], ptr %61, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [71 x [71 x i32]], ptr @a, i64 0, i64 %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [71 x i32], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = xor i32 %65, %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %75
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [71 x i32], ptr %76, i64 0, i64 %78
  store i32 %73, ptr %79, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %57
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %6, align 4, !tbaa !5
  br label %52, !llvm.loop !12

83:                                               ; preds = %56
  br label %84

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

87:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %146, %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %94 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %94, ptr %8, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %142, %93
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = icmp sle i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %145

100:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %138, %100
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = icmp sle i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %141

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %107 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %107, ptr %11, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %134, %106
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %137

113:                                              ; preds = %108
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %115
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [71 x i32], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = sub nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %123
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [71 x i32], ptr %124, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = xor i32 %120, %128
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = xor i32 %130, %129
  store i32 %131, ptr %10, align 4, !tbaa !5
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %133 = load i32, ptr %132, align 4, !tbaa !5
  store i32 %133, ptr @mx, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %113
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !5
  br label %108, !llvm.loop !14

137:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %9, align 4, !tbaa !5
  br label %101, !llvm.loop !15

141:                                              ; preds = %105
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %8, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %8, align 4, !tbaa !5
  br label %95, !llvm.loop !16

145:                                              ; preds = %99
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %7, align 4, !tbaa !5
  br label %88, !llvm.loop !17

149:                                              ; preds = %92
  %150 = load i32, ptr @mx, align 4, !tbaa !5
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %150)
  br label %13, !llvm.loop !18

152:                                              ; preds = %13
  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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [71 x [71 x i32]], align 16
@x = external dso_local local_unnamed_addr global [71 x [71 x i32]], align 16
@mx = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %3 = load i32, ptr @t, align 4, !tbaa !5
  %4 = add nsw i32 %3, -1
  store i32 %4, ptr @t, align 4, !tbaa !5
  %.not76 = icmp eq i32 %3, 0
  br i1 %.not76, label %._crit_edge79, label %.lr.ph78

.lr.ph78:                                         ; preds = %0, %._crit_edge75
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not3751 = icmp slt i32 %6, 1
  br i1 %.not3751, label %._crit_edge53.thread, label %.preheader47

._crit_edge53.thread:                             ; preds = %.lr.ph78
  store i32 0, ptr @mx, align 4, !tbaa !5
  br label %._crit_edge75

.preheader47:                                     ; preds = %.lr.ph78, %._crit_edge
  %7 = phi i32 [ %10, %._crit_edge ], [ %6, %.lr.ph78 ]
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %._crit_edge ], [ 1, %.lr.ph78 ]
  %.not4449 = icmp slt i32 %7, 1
  br i1 %.not4449, label %.preheader47.._crit_edge_crit_edge, label %.lr.ph

.preheader47.._crit_edge_crit_edge:               ; preds = %.preheader47
  %.pre107 = sext i32 %7 to i64
  br label %._crit_edge

._crit_edge53:                                    ; preds = %._crit_edge
  store i32 0, ptr @mx, align 4, !tbaa !5
  %.not3858 = icmp slt i32 %10, 1
  br i1 %.not3858, label %._crit_edge75, label %.preheader46.preheader

.preheader46.preheader:                           ; preds = %._crit_edge53
  %8 = add nuw i32 %10, 1
  %wide.trip.count93 = zext i32 %8 to i64
  %9 = zext nneg i32 %10 to i64
  %min.iters.check = icmp eq i32 %10, 1
  %n.vec = and i64 %9, 2147483646
  %ind.end = or i64 %9, 1
  %cmp.n = icmp eq i64 %n.vec, %9
  br label %.preheader46

._crit_edge:                                      ; preds = %.lr.ph, %.preheader47.._crit_edge_crit_edge
  %.pre-phi108 = phi i64 [ %.pre107, %.preheader47.._crit_edge_crit_edge ], [ %14, %.lr.ph ]
  %10 = phi i32 [ %7, %.preheader47.._crit_edge_crit_edge ], [ %13, %.lr.ph ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %.not37.not = icmp slt i64 %indvars.iv84, %.pre-phi108
  br i1 %.not37.not, label %.preheader47, label %._crit_edge53, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader47, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader47 ]
  %11 = getelementptr inbounds [71 x [71 x i32]], ptr @a, i64 0, i64 %indvars.iv84, i64 %indvars.iv
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %.not44.not = icmp slt i64 %indvars.iv, %14
  br i1 %.not44.not, label %.lr.ph, label %._crit_edge, !llvm.loop !12

.preheader46:                                     ; preds = %.preheader46.preheader, %._crit_edge57
  %indvars.iv90 = phi i64 [ 1, %.preheader46.preheader ], [ %indvars.iv.next91, %._crit_edge57 ]
  %15 = add nsw i64 %indvars.iv90, -1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader46
  %indvars.iv87.ph = phi i64 [ 1, %.preheader46 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %.preheader46, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader46 ]
  %offset.idx = or disjoint i64 %index, 1
  %16 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %15, i64 %offset.idx
  %wide.load = load <2 x i32>, ptr %16, align 4, !tbaa !5
  %17 = getelementptr inbounds [71 x [71 x i32]], ptr @a, i64 0, i64 %indvars.iv90, i64 %offset.idx
  %wide.load134 = load <2 x i32>, ptr %17, align 4, !tbaa !5
  %18 = xor <2 x i32> %wide.load134, %wide.load
  %19 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %indvars.iv90, i64 %offset.idx
  store <2 x i32> %18, ptr %19, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge57, label %scalar.ph.preheader

._crit_edge57:                                    ; preds = %scalar.ph, %middle.block
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %.preheader45, label %.preheader46, !llvm.loop !16

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %scalar.ph ], [ %indvars.iv87.ph, %scalar.ph.preheader ]
  %21 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %15, i64 %indvars.iv87
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = getelementptr inbounds [71 x [71 x i32]], ptr @a, i64 0, i64 %indvars.iv90, i64 %indvars.iv87
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = xor i32 %24, %22
  %26 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %indvars.iv90, i64 %indvars.iv87
  store i32 %25, ptr %26, align 4, !tbaa !5
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next88, %wide.trip.count93
  br i1 %exitcond.not, label %._crit_edge57, label %scalar.ph, !llvm.loop !17

.preheader45:                                     ; preds = %._crit_edge57, %._crit_edge71
  %27 = phi i32 [ %39, %._crit_edge71 ], [ 0, %._crit_edge57 ]
  %28 = phi i32 [ %40, %._crit_edge71 ], [ %10, %._crit_edge57 ]
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %._crit_edge71 ], [ 1, %._crit_edge57 ]
  %29 = sext i32 %28 to i64
  %.not4069 = icmp sgt i64 %indvars.iv101, %29
  br i1 %.not4069, label %._crit_edge71, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader45
  %30 = add nsw i64 %indvars.iv101, -1
  %31 = icmp slt i32 %28, 1
  br i1 %31, label %._crit_edge71, label %.preheader

._crit_edge75:                                    ; preds = %._crit_edge71, %._crit_edge53, %._crit_edge53.thread
  %32 = phi i32 [ 0, %._crit_edge53.thread ], [ 0, %._crit_edge53 ], [ %39, %._crit_edge71 ]
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %32)
  %34 = load i32, ptr @t, align 4, !tbaa !5
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %34, 0
  br i1 %.not, label %._crit_edge79, label %.lr.ph78, !llvm.loop !18

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge68
  %36 = phi i32 [ %41, %._crit_edge68 ], [ %27, %.preheader.lr.ph ]
  %37 = phi i32 [ %42, %._crit_edge68 ], [ %28, %.preheader.lr.ph ]
  %38 = phi i32 [ %43, %._crit_edge68 ], [ %28, %.preheader.lr.ph ]
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %._crit_edge68 ], [ %indvars.iv101, %.preheader.lr.ph ]
  %.not4165 = icmp slt i32 %38, 1
  br i1 %.not4165, label %._crit_edge68, label %.lr.ph67

._crit_edge71.loopexit80:                         ; preds = %._crit_edge68
  %.pre = sext i32 %42 to i64
  br label %._crit_edge71

._crit_edge71:                                    ; preds = %.preheader.lr.ph, %._crit_edge71.loopexit80, %.preheader45
  %.pre-phi = phi i64 [ %.pre, %._crit_edge71.loopexit80 ], [ %29, %.preheader45 ], [ %29, %.preheader.lr.ph ]
  %39 = phi i32 [ %41, %._crit_edge71.loopexit80 ], [ %27, %.preheader45 ], [ %27, %.preheader.lr.ph ]
  %40 = phi i32 [ %42, %._crit_edge71.loopexit80 ], [ %28, %.preheader45 ], [ %28, %.preheader.lr.ph ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %.not39.not = icmp slt i64 %indvars.iv101, %.pre-phi
  br i1 %.not39.not, label %.preheader45, label %._crit_edge75, !llvm.loop !19

._crit_edge68:                                    ; preds = %._crit_edge64, %.preheader
  %41 = phi i32 [ %36, %.preheader ], [ %49, %._crit_edge64 ]
  %42 = phi i32 [ %37, %.preheader ], [ %50, %._crit_edge64 ]
  %43 = phi i32 [ %38, %.preheader ], [ %51, %._crit_edge64 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %44 = sext i32 %43 to i64
  %.not40.not = icmp slt i64 %indvars.iv103, %44
  br i1 %.not40.not, label %.preheader, label %._crit_edge71.loopexit80, !llvm.loop !20

.lr.ph67:                                         ; preds = %.preheader, %._crit_edge64
  %45 = phi i32 [ %49, %._crit_edge64 ], [ %36, %.preheader ]
  %46 = phi i32 [ %50, %._crit_edge64 ], [ %37, %.preheader ]
  %47 = phi i32 [ %51, %._crit_edge64 ], [ %38, %.preheader ]
  %48 = phi i32 [ %52, %._crit_edge64 ], [ %38, %.preheader ]
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %._crit_edge64 ], [ 1, %.preheader ]
  %indvars100 = trunc i64 %indvars.iv95 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  %.not4260 = icmp slt i32 %48, %indvars100
  br i1 %.not4260, label %._crit_edge64, label %.lr.ph63

._crit_edge64:                                    ; preds = %.lr.ph63, %.lr.ph67
  %49 = phi i32 [ %45, %.lr.ph67 ], [ %61, %.lr.ph63 ]
  %50 = phi i32 [ %46, %.lr.ph67 ], [ %62, %.lr.ph63 ]
  %51 = phi i32 [ %47, %.lr.ph67 ], [ %62, %.lr.ph63 ]
  %52 = phi i32 [ %48, %.lr.ph67 ], [ %62, %.lr.ph63 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %.not41.not = icmp sgt i32 %52, %indvars100
  br i1 %.not41.not, label %.lr.ph67, label %._crit_edge68, !llvm.loop !21

.lr.ph63:                                         ; preds = %.lr.ph67, %.lr.ph63
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.lr.ph63 ], [ %indvars.iv95, %.lr.ph67 ]
  %53 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %indvars.iv103, i64 %indvars.iv97
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds [71 x [71 x i32]], ptr @x, i64 0, i64 %30, i64 %indvars.iv97
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = xor i32 %56, %54
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = xor i32 %57, %58
  store i32 %59, ptr %1, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr @mx, align 4, !tbaa !5
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %.not42.not = icmp slt i64 %indvars.iv97, %63
  br i1 %.not42.not, label %.lr.ph63, label %._crit_edge64, !llvm.loop !22

._crit_edge79:                                    ; preds = %._crit_edge75, %0
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !15, !14}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !11}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


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