; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (349B-ColorTheFence)

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

15:                                               ; preds = %39, %0
  %16 = load i32, ptr %8, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 10
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %42

19:                                               ; preds = %15
  %20 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 0
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i64, ptr %20, i64 %22
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %23)
  %25 = load i32, ptr %8, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = load i64, ptr %6, align 8, !tbaa !9
  %30 = icmp sle i64 %28, %29
  br i1 %30, label %31, label %38

31:                                               ; preds = %19
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !9
  store i64 %35, ptr %6, align 8, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  store i64 %37, ptr %7, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %31, %19
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %8, align 4, !tbaa !5
  br label %15, !llvm.loop !11

42:                                               ; preds = %18
  %43 = load i64, ptr %5, align 8, !tbaa !9
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = icmp sgt i64 %43, %44
  br i1 %45, label %46, label %127

46:                                               ; preds = %42
  %47 = load i64, ptr %5, align 8, !tbaa !9
  %48 = load i64, ptr %7, align 8, !tbaa !9
  %49 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = sdiv i64 %47, %50
  %52 = load i64, ptr %7, align 8, !tbaa !9
  %53 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 %52
  store i64 %51, ptr %53, align 8, !tbaa !9
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = load i64, ptr %5, align 8, !tbaa !9
  %58 = srem i64 %57, %56
  store i64 %58, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 9, ptr %9, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %69, %46
  %60 = load i64, ptr %5, align 8, !tbaa !9
  %61 = icmp sgt i64 %60, 0
  br i1 %61, label %62, label %67

62:                                               ; preds = %59
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = load i64, ptr %7, align 8, !tbaa !9
  %66 = icmp sgt i64 %64, %65
  br label %67

67:                                               ; preds = %62, %59
  %68 = phi i1 [ false, %59 ], [ %66, %62 ]
  br i1 %68, label %69, label %98

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = load i64, ptr %7, align 8, !tbaa !9
  %75 = getelementptr inbounds [10 x i64], ptr %3, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = sub nsw i64 %73, %76
  store i64 %77, ptr %10, align 8, !tbaa !9
  %78 = load i64, ptr %5, align 8, !tbaa !9
  %79 = load i64, ptr %10, align 8, !tbaa !9
  %80 = sdiv i64 %78, %79
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = add nsw i64 %84, %80
  store i64 %85, ptr %83, align 8, !tbaa !9
  %86 = load i64, ptr %5, align 8, !tbaa !9
  %87 = load i64, ptr %10, align 8, !tbaa !9
  %88 = sdiv i64 %86, %87
  %89 = load i64, ptr %7, align 8, !tbaa !9
  %90 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = sub nsw i64 %91, %88
  store i64 %92, ptr %90, align 8, !tbaa !9
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = load i64, ptr %5, align 8, !tbaa !9
  %95 = srem i64 %94, %93
  store i64 %95, ptr %5, align 8, !tbaa !9
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = add nsw i32 %96, -1
  store i32 %97, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %59, !llvm.loop !13

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

99:                                               ; preds = %122, %98
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = load i64, ptr %7, align 8, !tbaa !9
  %103 = icmp sge i64 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %99
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %125

105:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %118, %105
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [10 x i64], ptr %4, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = icmp slt i64 %108, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %106
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %121

115:                                              ; preds = %106
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %116)
  br label %118

118:                                              ; preds = %115
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %13, align 4, !tbaa !5
  br label %106, !llvm.loop !14

121:                                              ; preds = %114
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %11, align 4, !tbaa !5
  br label %99, !llvm.loop !15

125:                                              ; preds = %104
  %126 = call i32 @puts(ptr noundef @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %129

127:                                              ; preds = %42
  %128 = call i32 @puts(ptr noundef @.str.3)
  br label %129

129:                                              ; preds = %127, %125
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %130 = load i32, ptr %1, align 4
  ret i32 %130
}

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

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #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, ...) #3

declare i32 @puts(ptr noundef) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

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

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [10 x i64], align 16
  %2 = alloca [10 x i64], align 16
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %1, i8 0, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %2, i8 0, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %7 = load i64, ptr %5, align 8, !tbaa !5
  %.not40 = icmp slt i64 %7, 1000001
  %spec.select = call i64 @llvm.smin.i64(i64 %7, i64 1000000)
  %spec.select41 = zext i1 %.not40 to i64
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8)
  %10 = load i64, ptr %8, align 16, !tbaa !5
  %.not40.1 = icmp sgt i64 %10, %spec.select
  %spec.select.1 = call i64 @llvm.smin.i64(i64 %10, i64 %spec.select)
  %spec.select41.1 = select i1 %.not40.1, i64 %spec.select41, i64 2
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %13 = load i64, ptr %11, align 8, !tbaa !5
  %.not40.2 = icmp sgt i64 %13, %spec.select.1
  %spec.select.2 = call i64 @llvm.smin.i64(i64 %13, i64 %spec.select.1)
  %spec.select41.2 = select i1 %.not40.2, i64 %spec.select41.1, i64 3
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %14)
  %16 = load i64, ptr %14, align 16, !tbaa !5
  %.not40.3 = icmp sgt i64 %16, %spec.select.2
  %spec.select.3 = call i64 @llvm.smin.i64(i64 %16, i64 %spec.select.2)
  %spec.select41.3 = select i1 %.not40.3, i64 %spec.select41.2, i64 4
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %17)
  %19 = load i64, ptr %17, align 8, !tbaa !5
  %.not40.4 = icmp sgt i64 %19, %spec.select.3
  %spec.select.4 = call i64 @llvm.smin.i64(i64 %19, i64 %spec.select.3)
  %spec.select41.4 = select i1 %.not40.4, i64 %spec.select41.3, i64 5
  %20 = getelementptr inbounds i8, ptr %1, i64 48
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %20)
  %22 = load i64, ptr %20, align 16, !tbaa !5
  %.not40.5 = icmp sgt i64 %22, %spec.select.4
  %spec.select.5 = call i64 @llvm.smin.i64(i64 %22, i64 %spec.select.4)
  %spec.select41.5 = select i1 %.not40.5, i64 %spec.select41.4, i64 6
  %23 = getelementptr inbounds i8, ptr %1, i64 56
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %23)
  %25 = load i64, ptr %23, align 8, !tbaa !5
  %.not40.6 = icmp sgt i64 %25, %spec.select.5
  %spec.select.6 = call i64 @llvm.smin.i64(i64 %25, i64 %spec.select.5)
  %spec.select41.6 = select i1 %.not40.6, i64 %spec.select41.5, i64 7
  %26 = getelementptr inbounds i8, ptr %1, i64 64
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %26)
  %28 = load i64, ptr %26, align 16, !tbaa !5
  %.not40.7 = icmp sgt i64 %28, %spec.select.6
  %spec.select.7 = call i64 @llvm.smin.i64(i64 %28, i64 %spec.select.6)
  %spec.select41.7 = select i1 %.not40.7, i64 %spec.select41.6, i64 8
  %29 = getelementptr inbounds i8, ptr %1, i64 72
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %29)
  %31 = load i64, ptr %29, align 8, !tbaa !5
  %.not40.8 = icmp sgt i64 %31, %spec.select.7
  %spec.select.8 = call i64 @llvm.smin.i64(i64 %31, i64 %spec.select.7)
  %spec.select41.8 = select i1 %.not40.8, i64 %spec.select41.7, i64 9
  %32 = load i64, ptr %3, align 8, !tbaa !5
  %33 = icmp sgt i64 %32, %spec.select.8
  br i1 %33, label %34, label %._crit_edge51

34:                                               ; preds = %0
  %35 = getelementptr inbounds [10 x i64], ptr %1, i64 0, i64 %spec.select41.8
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = sdiv i64 %32, %36
  %38 = getelementptr inbounds [10 x i64], ptr %2, i64 0, i64 %spec.select41.8
  store i64 %37, ptr %38, align 8, !tbaa !5
  %39 = srem i64 %32, %36
  store i64 %39, ptr %3, align 8, !tbaa !5
  %40 = icmp sgt i64 %39, 0
  %41 = icmp ult i64 %spec.select41.8, 9
  %42 = select i1 %40, i1 %41, i1 false
  br i1 %42, label %.lr.ph, label %.preheader.preheader

..preheader42_crit_edge:                          ; preds = %.lr.ph
  store i64 %53, ptr %3, align 8, !tbaa !5
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %34, %..preheader42_crit_edge
  br label %.preheader

.lr.ph:                                           ; preds = %34, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 9, %34 ]
  %43 = phi i64 [ %53, %.lr.ph ], [ %39, %34 ]
  %44 = getelementptr inbounds [10 x i64], ptr %1, i64 0, i64 %indvars.iv
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = sub nsw i64 %45, %36
  %47 = sdiv i64 %43, %46
  %48 = getelementptr inbounds [10 x i64], ptr %2, i64 0, i64 %indvars.iv
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = add nsw i64 %49, %47
  store i64 %50, ptr %48, align 8, !tbaa !5
  %51 = load i64, ptr %38, align 8, !tbaa !5
  %52 = sub nsw i64 %51, %47
  store i64 %52, ptr %38, align 8, !tbaa !5
  %53 = srem i64 %43, %46
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %54 = icmp ne i64 %53, 0
  %55 = icmp slt i64 %spec.select41.8, %indvars.iv.next
  %56 = select i1 %54, i1 %55, i1 false
  br i1 %56, label %.lr.ph, label %..preheader42_crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %._crit_edge ], [ 9, %.preheader.preheader ]
  %57 = getelementptr inbounds [10 x i64], ptr %2, i64 0, i64 %indvars.iv57
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = icmp sgt i64 %58, 0
  br i1 %59, label %.lr.ph48.preheader, label %._crit_edge

.lr.ph48.preheader:                               ; preds = %.preheader
  %60 = trunc nsw i64 %indvars.iv57 to i32
  br label %.lr.ph48

._crit_edge:                                      ; preds = %.lr.ph48, %.preheader
  %indvars.iv.next58 = add nsw i64 %indvars.iv57, -1
  %.not.not = icmp slt i64 %spec.select41.8, %indvars.iv57
  br i1 %.not.not, label %.preheader, label %._crit_edge51, !llvm.loop !11

.lr.ph48:                                         ; preds = %.lr.ph48.preheader, %.lr.ph48
  %indvars.iv54 = phi i64 [ 0, %.lr.ph48.preheader ], [ %indvars.iv.next55, %.lr.ph48 ]
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %60)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next55, %58
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph48, !llvm.loop !12

._crit_edge51:                                    ; preds = %._crit_edge, %0
  %.str.3.sink = phi ptr [ @.str.3, %0 ], [ @.str.2, %._crit_edge ]
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 80, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 #3

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = !{!"long", !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}


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