; LLVM IR from chirag-singhal/Coding-Interview-101 :: Miscellaneous/Codechef/junecook (3)

; 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 [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local 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 [100000 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca [100000 x i32], align 16
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %18 = 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 %19

19:                                               ; preds = %143, %0
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 400000, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 400000, ptr %9) #4
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 400000, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !9
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %37, %24
  %28 = load i32, ptr %13, align 4, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %13, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %34
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %35)
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %13, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %13, align 4, !tbaa !5
  br label %27, !llvm.loop !11

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

41:                                               ; preds = %75, %40
  %42 = load i32, ptr %14, align 4, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %78

46:                                               ; preds = %41
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %10)
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %11)
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %70

56:                                               ; preds = %46
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100000 x i32], ptr %7, 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
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = load i64, ptr %12, align 8, !tbaa !9
  %65 = add nsw i64 %64, %63
  store i64 %65, ptr %12, align 8, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = load i32, ptr %14, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100000 x i32], ptr %9, i64 0, i64 %68
  store i32 %66, ptr %69, align 4, !tbaa !5
  br label %74

70:                                               ; preds = %46
  %71 = load i64, ptr %11, align 8, !tbaa !9
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = add nsw i64 %72, %71
  store i64 %73, ptr %12, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %70, %56
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %14, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %14, align 4, !tbaa !5
  br label %41, !llvm.loop !13

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

79:                                               ; preds = %121, %78
  %80 = load i32, ptr %15, align 4, !tbaa !5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %124

84:                                               ; preds = %79
  %85 = load i32, ptr %15, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100000 x i32], ptr %9, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %84
  br label %121

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

92:                                               ; preds = %115, %91
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 14, ptr %4, align 4
  br label %118

97:                                               ; preds = %92
  %98 = load i32, ptr %16, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %103, label %114

103:                                              ; preds = %97
  %104 = load i32, ptr %16, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  %106 = load i32, ptr %15, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100000 x i32], ptr %9, i64 0, i64 %107
  store i32 %105, ptr %108, align 4, !tbaa !5
  %109 = load i32, ptr %16, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100000 x i32], ptr %7, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %111, align 4, !tbaa !5
  store i32 14, ptr %4, align 4
  br label %118

114:                                              ; preds = %97
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %16, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %16, align 4, !tbaa !5
  br label %92, !llvm.loop !14

118:                                              ; preds = %103, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %90
  %122 = load i32, ptr %15, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %15, align 4, !tbaa !5
  br label %79, !llvm.loop !15

124:                                              ; preds = %83
  %125 = load i64, ptr %12, align 8, !tbaa !9
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %125)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %138, %124
  %128 = load i32, ptr %17, align 4, !tbaa !5
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %141

132:                                              ; preds = %127
  %133 = load i32, ptr %17, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100000 x i32], ptr %9, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %136)
  br label %138

138:                                              ; preds = %132
  %139 = load i32, ptr %17, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %17, align 4, !tbaa !5
  br label %127, !llvm.loop !16

141:                                              ; preds = %131
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 400000, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 400000, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %143

143:                                              ; preds = %141
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %3, align 4, !tbaa !5
  br label %19, !llvm.loop !17

146:                                              ; preds = %23
  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
  %147 = load i32, ptr %1, align 4
  ret i32 %147
}

; 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 = { 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 = { 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/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}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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"

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

; Function Attrs: nofree 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 [100000 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca [100000 x i32], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph51, label %._crit_edge

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

.lr.ph51:                                         ; preds = %0, %._crit_edge49
  %.02950 = phi i32 [ %58, %._crit_edge49 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %6) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) %6, i8 0, i64 400000, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %.preheader32

.preheader32:                                     ; preds = %.lr.ph, %.lr.ph51
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph39, label %._crit_edge.split.us

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

.preheader31:                                     ; preds = %50
  %23 = icmp sgt i32 %51, 0
  br i1 %23, label %.lr.ph45.preheader, label %._crit_edge.split.us

.lr.ph45.preheader:                               ; preds = %.preheader31
  %wide.trip.count68 = zext nneg i32 %51 to i64
  br label %.lr.ph45

.lr.ph45:                                         ; preds = %.lr.ph45.preheader, %..loopexit_crit_edge.us
  %indvars.iv65 = phi i64 [ 0, %.lr.ph45.preheader ], [ %indvars.iv.next66, %..loopexit_crit_edge.us ]
  %24 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv65
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %.not.us = icmp eq i32 %25, 0
  br i1 %.not.us, label %.preheader.us, label %..loopexit_crit_edge.us

.preheader.us:                                    ; preds = %.lr.ph45, %29
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %29 ], [ 0, %.lr.ph45 ]
  %26 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv62
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %30, label %29

29:                                               ; preds = %.preheader.us
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count68
  br i1 %exitcond.not, label %..loopexit_crit_edge.us, label %.preheader.us, !llvm.loop !11

30:                                               ; preds = %.preheader.us
  %31 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv62
  %32 = trunc nuw nsw i64 %indvars.iv62 to i32
  %33 = add nuw nsw i32 %32, 1
  store i32 %33, ptr %24, align 4, !tbaa !5
  %34 = add nsw i32 %27, -1
  store i32 %34, ptr %31, align 4, !tbaa !5
  br label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %29, %30, %.lr.ph45
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %._crit_edge.split.us, label %.lr.ph45, !llvm.loop !12

.lr.ph39:                                         ; preds = %.preheader32, %50
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %50 ], [ 0, %.preheader32 ]
  %.02837 = phi i64 [ %.1, %50 ], [ 0, %.preheader32 ]
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %7)
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %8)
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %44, label %48

44:                                               ; preds = %.lr.ph39
  %45 = add nsw i32 %42, -1
  store i32 %45, ptr %41, align 4, !tbaa !5
  %46 = load i64, ptr %7, align 8, !tbaa !13
  %47 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv59
  store i32 %38, ptr %47, align 4, !tbaa !5
  br label %50

48:                                               ; preds = %.lr.ph39
  %49 = load i64, ptr %8, align 8, !tbaa !13
  br label %50

50:                                               ; preds = %44, %48
  %.pn = phi i64 [ %46, %44 ], [ %49, %48 ]
  %.1 = add nsw i64 %.pn, %.02837
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next60, %52
  br i1 %53, label %.lr.ph39, label %.preheader31, !llvm.loop !15

._crit_edge.split.us:                             ; preds = %..loopexit_crit_edge.us, %.preheader32, %.preheader31
  %.028.lcssa75 = phi i64 [ %.1, %.preheader31 ], [ 0, %.preheader32 ], [ %.1, %..loopexit_crit_edge.us ]
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.028.lcssa75)
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph48, label %._crit_edge49

._crit_edge49:                                    ; preds = %.lr.ph48, %._crit_edge.split.us
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %58 = add nuw nsw i32 %.02950, 1
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %.lr.ph51, label %._crit_edge, !llvm.loop !16

.lr.ph48:                                         ; preds = %._crit_edge.split.us, %.lr.ph48
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph48 ], [ 0, %._crit_edge.split.us ]
  %61 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %indvars.iv70
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %62)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next71, %65
  br i1 %66, label %.lr.ph48, label %._crit_edge49, !llvm.loop !17
}

; 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 = { nofree 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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