; LLVM IR from reyadussalahin/problem-solving :: brute_force/loop/codeforces/F1362B (Solution)

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

@a = external dso_local global [2048 x i32], align 16
@c = external dso_local global [2048 x i32], align 16
@d = external dso_local global [2048 x i32], align 16
@.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 i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %103, %0
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %13
  call void @llvm.memset.p0.i64(ptr align 16 @c, i8 0, i64 4128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %20

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

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

25:                                               ; preds = %20
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %27
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %28)
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !5
  br label %38

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

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

42:                                               ; preds = %96, %41
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = icmp sle i32 %43, 1024
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 8, ptr %4, align 4
  br label %99

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 1, ptr %9, align 1, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 16 @d, i8 0, i64 4128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %47

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

51:                                               ; preds = %47
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %66

52:                                               ; preds = %47
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = xor i32 %56, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %52
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %10, align 4, !tbaa !5
  br label %47, !llvm.loop !13

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

67:                                               ; preds = %83, %66
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = icmp slt i32 %68, 1024
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  store i32 14, ptr %4, align 4
  br label %86

71:                                               ; preds = %67
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp ne i32 %75, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %71
  store i8 0, ptr %9, align 1, !tbaa !11
  store i32 14, ptr %4, align 4
  br label %86

82:                                               ; preds = %71
  br label %83

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

86:                                               ; preds = %81, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %87

87:                                               ; preds = %86
  %88 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %91, ptr %7, align 4, !tbaa !5
  store i32 8, ptr %4, align 4
  br label %93

92:                                               ; preds = %87
  store i32 0, ptr %4, align 4
  br label %93

93:                                               ; preds = %92, %90
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  %94 = load i32, ptr %4, align 4
  switch i32 %94, label %99 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %8, align 4, !tbaa !5
  br label %42, !llvm.loop !17

99:                                               ; preds = %93, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %101)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %3, align 4, !tbaa !5
  br label %13, !llvm.loop !18

106:                                              ; preds = %17
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %107 = load i32, ptr %1, align 4
  ret i32 %107
}

; 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 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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{i8 0, i8 2}
!16 = !{}
!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"

@a = external dso_local global [2048 x i32], align 16
@c = external dso_local local_unnamed_addr global [2048 x i32], align 16
@d = external dso_local local_unnamed_addr global [2048 x i32], align 16
@.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 nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph39, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

.lr.ph39:                                         ; preds = %0, %.loopexit
  %.02738 = phi i32 [ %85, %.loopexit ], [ 0, %0 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4128) @c, i8 0, i64 4128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.preheader.preheader

.preheader30:                                     ; preds = %.lr.ph
  %9 = icmp sgt i32 %58, 0
  br i1 %9, label %.lr.ph35.us.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.lr.ph39, %.preheader30
  br label %.preheader

.lr.ph35.us.preheader:                            ; preds = %.preheader30
  %wide.trip.count = zext nneg i32 %58 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %10 = icmp eq i32 %58, 1
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph35.us

.lr.ph35.us:                                      ; preds = %.lr.ph35.us.preheader, %28
  %.02337.us = phi i32 [ %29, %28 ], [ 1, %.lr.ph35.us.preheader ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4128) @d, i8 0, i64 4128, i1 false)
  br i1 %10, label %..preheader_crit_edge.us.preheader.unr-lcssa, label %.lr.ph35.us.new

..preheader_crit_edge.us.1:                       ; preds = %..preheader_crit_edge.us
  %indvars.iv.next56 = or disjoint i64 %indvars.iv55, 1
  %11 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next56
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next56
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %.not.us.1 = icmp eq i32 %12, %14
  br i1 %.not.us.1, label %..preheader_crit_edge.us.2, label %28

..preheader_crit_edge.us.2:                       ; preds = %..preheader_crit_edge.us.1
  %indvars.iv.next56.1 = or disjoint i64 %indvars.iv55, 2
  %15 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next56.1
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next56.1
  %18 = load i32, ptr %17, align 8, !tbaa !5
  %.not.us.2 = icmp eq i32 %16, %18
  br i1 %.not.us.2, label %..preheader_crit_edge.us.3, label %28

..preheader_crit_edge.us.3:                       ; preds = %..preheader_crit_edge.us.2
  %indvars.iv.next56.2 = or disjoint i64 %indvars.iv55, 3
  %19 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next56.2
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next56.2
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %.not.us.3 = icmp eq i32 %20, %22
  br i1 %.not.us.3, label %23, label %28

23:                                               ; preds = %..preheader_crit_edge.us.3
  %indvars.iv.next56.3 = add nuw nsw i64 %indvars.iv55, 4
  %exitcond58.not.3 = icmp eq i64 %indvars.iv.next56.3, 1024
  br i1 %exitcond58.not.3, label %.loopexit, label %..preheader_crit_edge.us, !llvm.loop !9

..preheader_crit_edge.us:                         ; preds = %23, %..preheader_crit_edge.us.preheader
  %indvars.iv55 = phi i64 [ 0, %..preheader_crit_edge.us.preheader ], [ %indvars.iv.next56.3, %23 ]
  %24 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv55
  %25 = load i32, ptr %24, align 16, !tbaa !5
  %26 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv55
  %27 = load i32, ptr %26, align 16, !tbaa !5
  %.not.us = icmp eq i32 %25, %27
  br i1 %.not.us, label %..preheader_crit_edge.us.1, label %28

28:                                               ; preds = %..preheader_crit_edge.us.3, %..preheader_crit_edge.us.2, %..preheader_crit_edge.us.1, %..preheader_crit_edge.us
  %29 = add nuw nsw i32 %.02337.us, 1
  %exitcond59.not = icmp eq i32 %29, 1025
  br i1 %exitcond59.not, label %.loopexit, label %.lr.ph35.us, !llvm.loop !11

.lr.ph35.us.new:                                  ; preds = %.lr.ph35.us, %.lr.ph35.us.new
  %indvars.iv51 = phi i64 [ %indvars.iv.next52.1, %.lr.ph35.us.new ], [ 0, %.lr.ph35.us ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph35.us.new ], [ 0, %.lr.ph35.us ]
  %30 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %indvars.iv51
  %31 = load i32, ptr %30, align 8, !tbaa !5
  %32 = xor i32 %31, %.02337.us
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %34, align 4, !tbaa !5
  %indvars.iv.next52 = or disjoint i64 %indvars.iv51, 1
  %37 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %indvars.iv.next52
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = xor i32 %38, %.02337.us
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %41, align 4, !tbaa !5
  %indvars.iv.next52.1 = add nuw nsw i64 %indvars.iv51, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %..preheader_crit_edge.us.preheader.unr-lcssa, label %.lr.ph35.us.new, !llvm.loop !12

..preheader_crit_edge.us.preheader.unr-lcssa:     ; preds = %.lr.ph35.us.new, %.lr.ph35.us
  %indvars.iv51.unr = phi i64 [ 0, %.lr.ph35.us ], [ %indvars.iv.next52.1, %.lr.ph35.us.new ]
  br i1 %lcmp.mod.not, label %..preheader_crit_edge.us.preheader, label %..preheader_crit_edge.us.preheader.epilog-lcssa

..preheader_crit_edge.us.preheader.epilog-lcssa:  ; preds = %..preheader_crit_edge.us.preheader.unr-lcssa
  %44 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %indvars.iv51.unr
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = xor i32 %45, %.02337.us
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  br label %..preheader_crit_edge.us.preheader

..preheader_crit_edge.us.preheader:               ; preds = %..preheader_crit_edge.us.preheader.unr-lcssa, %..preheader_crit_edge.us.preheader.epilog-lcssa
  br label %..preheader_crit_edge.us

.lr.ph:                                           ; preds = %.lr.ph39, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph39 ]
  %51 = getelementptr inbounds [2048 x i32], ptr @a, i64 0, i64 %indvars.iv
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %51)
  %53 = load i32, ptr %51, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next, %59
  br i1 %60, label %.lr.ph, label %.preheader30, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %82
  %.02337 = phi i32 [ %83, %82 ], [ 1, %.preheader.preheader ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4128) @d, i8 0, i64 4128, i1 false)
  br label %77

61:                                               ; preds = %77
  %indvars.iv.next48 = or disjoint i64 %indvars.iv47, 1
  %62 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next48
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next48
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %63, %65
  br i1 %.not.1, label %66, label %82

66:                                               ; preds = %61
  %indvars.iv.next48.1 = or disjoint i64 %indvars.iv47, 2
  %67 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next48.1
  %68 = load i32, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next48.1
  %70 = load i32, ptr %69, align 8, !tbaa !5
  %.not.2 = icmp eq i32 %68, %70
  br i1 %.not.2, label %71, label %82

71:                                               ; preds = %66
  %indvars.iv.next48.2 = or disjoint i64 %indvars.iv47, 3
  %72 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv.next48.2
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv.next48.2
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %.not.3 = icmp eq i32 %73, %75
  br i1 %.not.3, label %76, label %82

76:                                               ; preds = %71
  %indvars.iv.next48.3 = add nuw nsw i64 %indvars.iv47, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next48.3, 1024
  br i1 %exitcond.not.3, label %.loopexit, label %77, !llvm.loop !9

77:                                               ; preds = %76, %.preheader
  %indvars.iv47 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next48.3, %76 ]
  %78 = getelementptr inbounds [2048 x i32], ptr @c, i64 0, i64 %indvars.iv47
  %79 = load i32, ptr %78, align 16, !tbaa !5
  %80 = getelementptr inbounds [2048 x i32], ptr @d, i64 0, i64 %indvars.iv47
  %81 = load i32, ptr %80, align 16, !tbaa !5
  %.not = icmp eq i32 %79, %81
  br i1 %.not, label %61, label %82

82:                                               ; preds = %71, %66, %61, %77
  %83 = add nuw nsw i32 %.02337, 1
  %exitcond50.not = icmp eq i32 %83, 1025
  br i1 %exitcond50.not, label %.loopexit, label %.preheader, !llvm.loop !11

.loopexit:                                        ; preds = %82, %28, %76, %23
  %.2 = phi i32 [ %.02337.us, %23 ], [ %.02337, %76 ], [ -1, %28 ], [ -1, %82 ]
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %85 = add nuw nsw i32 %.02738, 1
  %86 = load i32, ptr %1, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %.lr.ph39, label %._crit_edge, !llvm.loop !14
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass