; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/321 Division 2/Problem E (E)

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

@MOD = external dso_local global i64, align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@base = external dso_local global i32, align 4
@p = external dso_local global [262144 x i64], align 16
@sum = external dso_local global [262144 x i64], align 16
@s = external dso_local global [262144 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildiii(i32 noundef, i32 noundef, i32 noundef) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateiiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5queryiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @k)
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @s)
  store i64 1, ptr @p, align 16, !tbaa !5
  store i64 1, ptr @sum, align 16, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !9
  call void @_Z5buildiii(i32 noundef 1, i32 noundef 0, i32 noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %46, %0
  %13 = load i32, ptr %2, align 4, !tbaa !9
  %14 = load i32, ptr @n, align 4, !tbaa !9
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %49

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !9
  %19 = sub nsw i32 %18, 1
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = load i32, ptr @base, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = mul nsw i64 %22, %24
  %26 = load i64, ptr @MOD, align 8, !tbaa !5
  %27 = srem i64 %25, %26
  %28 = load i32, ptr %2, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %29
  store i64 %27, ptr %30, align 8, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !9
  %32 = sub nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [262144 x i64], ptr @sum, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = load i32, ptr %2, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = add nsw i64 %35, %39
  %41 = load i64, ptr @MOD, align 8, !tbaa !5
  %42 = srem i64 %40, %41
  %43 = load i32, ptr %2, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [262144 x i64], ptr @sum, i64 0, i64 %44
  store i64 %42, ptr %45, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %17
  %47 = load i32, ptr %2, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %2, align 4, !tbaa !9
  br label %12, !llvm.loop !11

49:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %66, %49
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = load i32, ptr @n, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %69

55:                                               ; preds = %50
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = load i32, ptr %3, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [262144 x i8], ptr @s, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !13
  %63 = sext i8 %62 to i32
  %64 = sub nsw i32 %63, 48
  %65 = load i32, ptr @n, align 4, !tbaa !9
  call void @_Z6updateiiiiii(i32 noundef %56, i32 noundef %58, i32 noundef %64, i32 noundef 1, i32 noundef 0, i32 noundef %65)
  br label %66

66:                                               ; preds = %55
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %3, align 4, !tbaa !9
  br label %50, !llvm.loop !14

69:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %70 = load i32, ptr @m, align 4, !tbaa !9
  %71 = load i32, ptr @k, align 4, !tbaa !9
  %72 = add nsw i32 %70, %71
  store i32 %72, ptr %4, align 4, !tbaa !9
  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 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  br label %73

73:                                               ; preds = %126, %96, %69
  %74 = load i32, ptr %4, align 4, !tbaa !9
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %4, align 4, !tbaa !9
  %76 = icmp ne i32 %74, 0
  br i1 %76, label %77, label %127

77:                                               ; preds = %73
  %78 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %5, ptr noundef %6)
  %79 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %7, ptr noundef %8)
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %82, label %89

82:                                               ; preds = %77
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %6, align 4, !tbaa !9
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = load i32, ptr @n, align 4, !tbaa !9
  call void @_Z6updateiiiiii(i32 noundef %85, i32 noundef %86, i32 noundef %87, i32 noundef 1, i32 noundef 0, i32 noundef %88)
  br label %126

89:                                               ; preds = %77
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sub nsw i32 %91, %92
  %94 = add nsw i32 %93, 1
  %95 = icmp eq i32 %90, %94
  br i1 %95, label %96, label %98

96:                                               ; preds = %89
  %97 = call i32 @puts(ptr noundef @.str.3)
  br label %73, !llvm.loop !15

98:                                               ; preds = %89
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = add nsw i32 %99, -1
  store i32 %100, ptr %6, align 4, !tbaa !9
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = sub nsw i32 %102, %103
  %105 = load i32, ptr @n, align 4, !tbaa !9
  %106 = call noundef i64 @_Z5queryiiiii(i32 noundef %101, i32 noundef %104, i32 noundef 1, i32 noundef 0, i32 noundef %105)
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !5
  %111 = mul nsw i64 %106, %110
  %112 = load i64, ptr @MOD, align 8, !tbaa !5
  %113 = srem i64 %111, %112
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = add nsw i32 %114, %115
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = load i32, ptr @n, align 4, !tbaa !9
  %119 = call noundef i64 @_Z5queryiiiii(i32 noundef %116, i32 noundef %117, i32 noundef 1, i32 noundef 0, i32 noundef %118)
  %120 = icmp eq i64 %113, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %98
  %122 = call i32 @puts(ptr noundef @.str.3)
  br label %125

123:                                              ; preds = %98
  %124 = call i32 @puts(ptr noundef @.str.4)
  br label %125

125:                                              ; preds = %123, %121
  br label %126

126:                                              ; preds = %125, %82
  br label %73, !llvm.loop !15

127:                                              ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  ret i32 0
}

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

declare i32 @puts(ptr noundef) #3

attributes #0 = { mustprogress 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 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!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"

@MOD = external dso_local local_unnamed_addr global i64, align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@base = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local local_unnamed_addr global [262144 x i64], align 16
@sum = external dso_local local_unnamed_addr global [262144 x i64], align 16
@s = external dso_local global [262144 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateiiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5queryiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @k)
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @s)
  store i64 1, ptr @p, align 16, !tbaa !5
  store i64 1, ptr @sum, align 16, !tbaa !5
  %7 = load i32, ptr @n, align 4, !tbaa !9
  tail call void @_Z5buildiii(i32 noundef 1, i32 noundef 0, i32 noundef %7)
  %8 = load i32, ptr @n, align 4, !tbaa !9
  %.not17 = icmp slt i32 %8, 1
  br i1 %.not17, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %9 = load i32, ptr @base, align 4, !tbaa !9
  %10 = sext i32 %9 to i64
  %11 = load i64, ptr @MOD, align 8, !tbaa !5
  %12 = add nuw i32 %8, 1
  %wide.trip.count = zext i32 %12 to i64
  %.pre = load i64, ptr @p, align 16, !tbaa !5
  %.pre29 = load i64, ptr @sum, align 16, !tbaa !5
  br label %13

13:                                               ; preds = %.lr.ph, %13
  %14 = phi i64 [ %.pre29, %.lr.ph ], [ %20, %13 ]
  %15 = phi i64 [ %.pre, %.lr.ph ], [ %17, %13 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %13 ]
  %16 = mul nsw i64 %15, %10
  %17 = srem i64 %16, %11
  %18 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %indvars.iv
  store i64 %17, ptr %18, align 8, !tbaa !5
  %19 = add nsw i64 %14, %17
  %20 = srem i64 %19, %11
  %21 = getelementptr inbounds [262144 x i64], ptr @sum, i64 0, i64 %indvars.iv
  store i64 %20, ptr %21, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.lr.ph20, label %13, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph20, %0
  %22 = load i32, ptr @m, align 4, !tbaa !9
  %23 = load i32, ptr @k, align 4, !tbaa !9
  %24 = add nsw i32 %23, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  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 4, ptr nonnull %4) #4
  %.not1621 = icmp eq i32 %24, 0
  br i1 %.not1621, label %._crit_edge24, label %.lr.ph23

.lr.ph20:                                         ; preds = %13, %.lr.ph20
  %indvars.iv26 = phi i64 [ %indvars.iv.next27, %.lr.ph20 ], [ 0, %13 ]
  %25 = phi i32 [ %31, %.lr.ph20 ], [ %8, %13 ]
  %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1
  %indvars = trunc i64 %indvars.iv.next27 to i32
  %26 = getelementptr inbounds [262144 x i8], ptr @s, i64 0, i64 %indvars.iv26
  %27 = load i8, ptr %26, align 1, !tbaa !13
  %28 = sext i8 %27 to i32
  %29 = add nsw i32 %28, -48
  %30 = trunc nuw nsw i64 %indvars.iv26 to i32
  tail call void @_Z6updateiiiiii(i32 noundef %30, i32 noundef %indvars, i32 noundef %29, i32 noundef 1, i32 noundef 0, i32 noundef %25)
  %31 = load i32, ptr @n, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next27, %32
  br i1 %33, label %.lr.ph20, label %._crit_edge, !llvm.loop !14

.lr.ph23:                                         ; preds = %._crit_edge, %.backedge
  %.in = phi i32 [ %34, %.backedge ], [ %24, %._crit_edge ]
  %34 = add nsw i32 %.in, -1
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %37 = load i32, ptr %1, align 4, !tbaa !9
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %45

39:                                               ; preds = %.lr.ph23
  %40 = load i32, ptr %2, align 4, !tbaa !9
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr %2, align 4, !tbaa !9
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = load i32, ptr @n, align 4, !tbaa !9
  call void @_Z6updateiiiiii(i32 noundef %41, i32 noundef %42, i32 noundef %43, i32 noundef 1, i32 noundef 0, i32 noundef %44)
  br label %.backedge

45:                                               ; preds = %.lr.ph23
  %46 = load i32, ptr %4, align 4, !tbaa !9
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = load i32, ptr %2, align 4, !tbaa !9
  %49 = add i32 %47, 1
  %50 = sub i32 %49, %48
  %51 = icmp eq i32 %46, %50
  br i1 %51, label %52, label %54

52:                                               ; preds = %45
  %53 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.backedge

.backedge:                                        ; preds = %39, %74, %72, %52
  %.not16 = icmp eq i32 %34, 0
  br i1 %.not16, label %._crit_edge24, label %.lr.ph23, !llvm.loop !15

54:                                               ; preds = %45
  %55 = add nsw i32 %48, -1
  store i32 %55, ptr %2, align 4, !tbaa !9
  %56 = sub nsw i32 %47, %46
  %57 = load i32, ptr @n, align 4, !tbaa !9
  %58 = call noundef i64 @_Z5queryiiiii(i32 noundef %55, i32 noundef %56, i32 noundef 1, i32 noundef 0, i32 noundef %57)
  %59 = load i32, ptr %4, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [262144 x i64], ptr @p, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = mul nsw i64 %62, %58
  %64 = load i64, ptr @MOD, align 8, !tbaa !5
  %65 = srem i64 %63, %64
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = add nsw i32 %66, %59
  %68 = load i32, ptr %3, align 4, !tbaa !9
  %69 = load i32, ptr @n, align 4, !tbaa !9
  %70 = call noundef i64 @_Z5queryiiiii(i32 noundef %67, i32 noundef %68, i32 noundef 1, i32 noundef 0, i32 noundef %69)
  %71 = icmp eq i64 %65, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %54
  %73 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.backedge

74:                                               ; preds = %54
  %75 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %.backedge

._crit_edge24:                                    ; preds = %.backedge, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

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

attributes #0 = { mustprogress 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 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 #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 = { 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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass