; LLVM IR from reyadussalahin/problem-solving :: greedy/basic/codeforces/F1506B (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"

@s = external dso_local global [64 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca 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
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %15

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

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

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5, ptr noundef %6, ptr noundef @s)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 -1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %58, %20
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !9
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 42
  br i1 %33, label %34, label %39

34:                                               ; preds = %27
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = icmp eq i32 %35, -1
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %38, ptr %7, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %37, %34, %27
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = sub nsw i32 %40, %41
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 42
  br i1 %48, label %49, label %57

49:                                               ; preds = %39
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = icmp eq i32 %50, -1
  br i1 %51, label %52, label %57

52:                                               ; preds = %49
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  %56 = sub nsw i32 %55, 1
  store i32 %56, ptr %8, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %52, %49, %39
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %9, align 4, !tbaa !5
  br label %22, !llvm.loop !10

61:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = icmp ne i32 %62, %63
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %10, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %65, %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %69 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %69, ptr %11, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %115, %68
  %71 = load i32, ptr %11, align 4, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %116

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  store i8 0, ptr %12, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %75 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %75, ptr %13, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %104, %74
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 10, ptr %4, align 4
  br label %107

80:                                               ; preds = %76
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = add nsw i32 %81, %82
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %86, label %102

86:                                               ; preds = %80
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = add nsw i32 %87, %88
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !9
  %93 = sext i8 %92 to i32
  %94 = icmp eq i32 %93, 42
  br i1 %94, label %95, label %101

95:                                               ; preds = %86
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %10, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = add nsw i32 %98, %99
  store i32 %100, ptr %11, align 4, !tbaa !5
  store i32 10, ptr %4, align 4
  br label %107

101:                                              ; preds = %86
  br label %103

102:                                              ; preds = %80
  store i8 1, ptr %12, align 1, !tbaa !12
  store i32 10, ptr %4, align 4
  br label %107

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %13, align 4, !tbaa !5
  br label %76, !llvm.loop !14

107:                                              ; preds = %102, %95, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %108

108:                                              ; preds = %107
  %109 = load i8, ptr %12, align 1, !tbaa !12, !range !15, !noundef !16
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  store i32 9, ptr %4, align 4
  br label %113

112:                                              ; preds = %108
  store i32 0, ptr %4, align 4
  br label %113

113:                                              ; preds = %112, %111
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  %114 = load i32, ptr %4, align 4
  switch i32 %114, label %124 [
    i32 0, label %115
    i32 9, label %116
  ]

115:                                              ; preds = %113
  br label %70, !llvm.loop !17

116:                                              ; preds = %113, %70
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %117)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %119

119:                                              ; preds = %116
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %3, align 4, !tbaa !5
  br label %15, !llvm.loop !18

122:                                              ; preds = %19
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %123 = load i32, ptr %1, align 4
  ret i32 %123

124:                                              ; preds = %113
  unreachable
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

declare i32 @printf(ptr noundef, ...) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

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


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

@s = external dso_local global [64 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph68, label %._crit_edge69

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

.lr.ph68:                                         ; preds = %0, %.thread
  %.04366 = phi i32 [ %68, %.thread ], [ 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
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull @s)
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph.preheader, label %.thread

.lr.ph.preheader:                                 ; preds = %.lr.ph68
  %10 = zext nneg i32 %8 to i64
  %xtraiter = and i64 %10, 1
  %11 = icmp eq i32 %8, 1
  br i1 %11, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %10, 2147483646
  br label %.lr.ph

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %spec.select45.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %spec.select45.1, %.lr.ph ]
  %.139.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %.139.1, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %.03854.unr = phi i32 [ -1, %.lr.ph.preheader ], [ %.139.1, %.lr.ph ]
  %.04053.unr = phi i32 [ -1, %.lr.ph.preheader ], [ %spec.select45.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa
  %12 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %indvars.iv.unr
  %13 = load i8, ptr %12, align 1, !tbaa !9
  %14 = icmp eq i8 %13, 42
  %15 = icmp eq i32 %.04053.unr, -1
  %or.cond.epil = select i1 %14, i1 %15, i1 false
  %16 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %spec.select45.epil = select i1 %or.cond.epil, i32 %16, i32 %.04053.unr
  %17 = xor i64 %indvars.iv.unr, -1
  %18 = add nsw i64 %10, %17
  %19 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = icmp eq i8 %20, 42
  %22 = icmp eq i32 %.03854.unr, -1
  %or.cond3.epil = select i1 %21, i1 %22, i1 false
  %23 = trunc nsw i64 %18 to i32
  %.139.epil = select i1 %or.cond3.epil, i32 %23, i32 %.03854.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %spec.select45.lcssa = phi i32 [ %spec.select45.lcssa.ph, %._crit_edge.unr-lcssa ], [ %spec.select45.epil, %.lr.ph.epil ]
  %.139.lcssa = phi i32 [ %.139.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.139.epil, %.lr.ph.epil ]
  %.not = icmp eq i32 %spec.select45.lcssa, %.139.lcssa
  %spec.select = select i1 %.not, i32 1, i32 2
  %24 = icmp slt i32 %spec.select45.lcssa, %.139.lcssa
  br i1 %24, label %.lr.ph63, label %.thread

.lr.ph63:                                         ; preds = %._crit_edge
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  call void @llvm.assume(i1 %26)
  %27 = zext nneg i32 %25 to i64
  br label %.lr.ph59.us

.lr.ph59.us:                                      ; preds = %.lr.ph63, %..loopexit_crit_edge.us
  %.03461.us = phi i32 [ %.1.us, %..loopexit_crit_edge.us ], [ %spec.select45.lcssa, %.lr.ph63 ]
  %.13660.us = phi i32 [ %.2.us, %..loopexit_crit_edge.us ], [ %spec.select, %.lr.ph63 ]
  %28 = add nsw i32 %25, %.03461.us
  %29 = sext i32 %.03461.us to i64
  %30 = icmp slt i32 %28, %.139.lcssa
  br label %33

31:                                               ; preds = %34
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, -1
  %32 = icmp sgt i64 %indvars.iv75, 1
  br i1 %32, label %33, label %..loopexit_crit_edge.us, !llvm.loop !10

33:                                               ; preds = %.lr.ph59.us, %31
  %indvars.iv75 = phi i64 [ %27, %.lr.ph59.us ], [ %indvars.iv.next76, %31 ]
  br i1 %30, label %34, label %.thread

34:                                               ; preds = %33
  %35 = add nsw i64 %indvars.iv75, %29
  %36 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !9
  %38 = icmp eq i8 %37, 42
  br i1 %38, label %39, label %31

39:                                               ; preds = %34
  %40 = trunc nsw i64 %35 to i32
  %41 = add nsw i32 %.13660.us, 1
  br label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %31, %39
  %.2.us = phi i32 [ %41, %39 ], [ %.13660.us, %31 ]
  %.1.us = phi i32 [ %40, %39 ], [ %.03461.us, %31 ]
  %42 = icmp slt i32 %.1.us, %.139.lcssa
  br i1 %42, label %.lr.ph59.us, label %.thread

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %.03854 = phi i32 [ -1, %.lr.ph.preheader.new ], [ %.139.1, %.lr.ph ]
  %.04053 = phi i32 [ -1, %.lr.ph.preheader.new ], [ %spec.select45.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %43 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %indvars.iv
  %44 = load i8, ptr %43, align 2, !tbaa !9
  %45 = icmp eq i8 %44, 42
  %46 = icmp eq i32 %.04053, -1
  %or.cond = select i1 %45, i1 %46, i1 false
  %47 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select45 = select i1 %or.cond, i32 %47, i32 %.04053
  %48 = xor i64 %indvars.iv, -1
  %49 = add nsw i64 %10, %48
  %50 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = icmp eq i8 %51, 42
  %53 = icmp eq i32 %.03854, -1
  %or.cond3 = select i1 %52, i1 %53, i1 false
  %54 = trunc nsw i64 %49 to i32
  %.139 = select i1 %or.cond3, i32 %54, i32 %.03854
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %55 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %indvars.iv.next
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = icmp eq i8 %56, 42
  %58 = icmp eq i32 %spec.select45, -1
  %or.cond.1 = select i1 %57, i1 %58, i1 false
  %59 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select45.1 = select i1 %or.cond.1, i32 %59, i32 %spec.select45
  %60 = xor i64 %indvars.iv, -2
  %61 = add nsw i64 %60, %10
  %62 = getelementptr inbounds [64 x i8], ptr @s, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !9
  %64 = icmp eq i8 %63, 42
  %65 = icmp eq i32 %.139, -1
  %or.cond3.1 = select i1 %64, i1 %65, i1 false
  %66 = trunc nsw i64 %61 to i32
  %.139.1 = select i1 %or.cond3.1, i32 %66, i32 %.139
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 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 %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !12

.thread:                                          ; preds = %..loopexit_crit_edge.us, %33, %.lr.ph68, %._crit_edge
  %.13652 = phi i32 [ %spec.select, %._crit_edge ], [ 1, %.lr.ph68 ], [ %.13660.us, %33 ], [ %.2.us, %..loopexit_crit_edge.us ]
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.13652)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %68 = add nuw nsw i32 %.04366, 1
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %.lr.ph68, label %._crit_edge69, !llvm.loop !13
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #3

attributes #0 = { mustprogress nofree norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


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