; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/KNAPSACK (knap)

; 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 [6 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 [2001 x i32], align 16
  %5 = alloca [2001 x i32], align 16
  %6 = alloca [2 x [2001 x i32]], align 16
  %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 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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8004, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8004, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 16008, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %15

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

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %31

20:                                               ; preds = %15
  %21 = load i32, ptr %9, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [2001 x i32], ptr %4, i64 0, i64 %22
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2001 x i32], ptr %5, i64 0, i64 %25
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %23, ptr noundef %26)
  br label %28

28:                                               ; preds = %20
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %9, align 4, !tbaa !5
  br label %15, !llvm.loop !9

31:                                               ; preds = %19
  %32 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %32, i8 0, i64 16008, i1 false)
  store i32 0, ptr %7, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %125, %31
  %34 = load i32, ptr %10, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %128

38:                                               ; preds = %33
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sub nsw i32 1, %39
  store i32 %40, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %121, %38
  %42 = load i32, ptr %12, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  %47 = load i32, ptr %10, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2001 x i32], ptr %4, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = icmp sle i32 %50, %51
  br i1 %52, label %53, label %87

53:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = sub nsw i32 1, %54
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %56
  %58 = load i32, ptr %12, align 4, !tbaa !5
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [2001 x i32], ptr %4, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sub nsw i32 %58, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [2001 x i32], ptr %57, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [2001 x i32], ptr %5, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %66, %70
  store i32 %71, ptr %13, align 4, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sub nsw i32 1, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %74
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2001 x i32], ptr %75, i64 0, i64 %77
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %78)
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %82
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [2001 x i32], ptr %83, i64 0, i64 %85
  store i32 %80, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %102

87:                                               ; preds = %46
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = sub nsw i32 1, %88
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %90
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2001 x i32], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %97
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [2001 x i32], ptr %98, i64 0, i64 %100
  store i32 %95, ptr %101, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %87, %53
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %104
  %106 = load i32, ptr %12, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [2001 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = icmp sgt i32 %109, %110
  br i1 %111, label %112, label %120

112:                                              ; preds = %102
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2 x [2001 x i32]], ptr %6, i64 0, i64 %114
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [2001 x i32], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr %7, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %112, %102
  br label %121

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

124:                                              ; preds = %45
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %10, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %10, align 4, !tbaa !5
  br label %33, !llvm.loop !12

128:                                              ; preds = %37
  %129 = load i32, ptr %7, align 4, !tbaa !5
  %130 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %129)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16008, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8004, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8004, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %131 = load i32, ptr %1, align 4
  ret i32 %131
}

; 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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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 = { inlinehint mustprogress 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 #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 = !{!"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}


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

; Function Attrs: mustprogress 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 [2001 x i32], align 16
  %4 = alloca [2001 x i32], align 16
  %5 = alloca [2 x [2001 x i32]], align 16
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8004, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8004, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 16008, ptr nonnull %5) #6
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %.not38 = icmp slt i32 %8, 1
  br i1 %.not38, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16008) %5, i8 0, i64 16008, i1 false)
  br label %._crit_edge52

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16008) %5, i8 0, i64 16008, i1 false)
  %.not3546 = icmp slt i32 %14, 1
  %9 = load i32, ptr %1, align 4
  %10 = icmp slt i32 %9, 1
  %or.cond = select i1 %.not3546, i1 true, i1 %10
  br i1 %or.cond, label %._crit_edge52, label %.lr.ph51.split

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %11 = getelementptr inbounds [2001 x i32], ptr %3, i64 0, i64 %indvars.iv
  %12 = getelementptr inbounds [2001 x i32], ptr %4, i64 0, i64 %indvars.iv
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %.not.not = icmp slt i64 %indvars.iv, %15
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge52:                                    ; preds = %._crit_edge45, %._crit_edge.thread, %._crit_edge
  %.033.lcssa = phi i32 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %.1.lcssa, %._crit_edge45 ]
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.033.lcssa)
  call void @llvm.lifetime.end.p0(i64 16008, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8004, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8004, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph51.split:                                   ; preds = %._crit_edge, %._crit_edge45
  %17 = phi i32 [ %25, %._crit_edge45 ], [ %14, %._crit_edge ]
  %18 = phi i32 [ %26, %._crit_edge45 ], [ %9, %._crit_edge ]
  %19 = phi i32 [ %27, %._crit_edge45 ], [ %9, %._crit_edge ]
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge45 ], [ 1, %._crit_edge ]
  %.03248 = phi i32 [ %20, %._crit_edge45 ], [ 0, %._crit_edge ]
  %.03347 = phi i32 [ %.1.lcssa, %._crit_edge45 ], [ 0, %._crit_edge ]
  %20 = sub nuw nsw i32 1, %.03248
  %.not3640 = icmp slt i32 %19, 1
  br i1 %.not3640, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %.lr.ph51.split
  %21 = getelementptr inbounds [2001 x i32], ptr %3, i64 0, i64 %indvars.iv59
  %22 = zext nneg i32 %.03248 to i64
  %23 = getelementptr inbounds [2001 x i32], ptr %4, i64 0, i64 %indvars.iv59
  %24 = zext nneg i32 %20 to i64
  br label %29

._crit_edge45.loopexit:                           ; preds = %49
  %.pre62 = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge45

._crit_edge45:                                    ; preds = %._crit_edge45.loopexit, %.lr.ph51.split
  %25 = phi i32 [ %17, %.lr.ph51.split ], [ %.pre62, %._crit_edge45.loopexit ]
  %26 = phi i32 [ %18, %.lr.ph51.split ], [ %50, %._crit_edge45.loopexit ]
  %27 = phi i32 [ %19, %.lr.ph51.split ], [ %50, %._crit_edge45.loopexit ]
  %.1.lcssa = phi i32 [ %.03347, %.lr.ph51.split ], [ %spec.select, %._crit_edge45.loopexit ]
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %28 = sext i32 %25 to i64
  %.not35.not = icmp slt i64 %indvars.iv59, %28
  br i1 %.not35.not, label %.lr.ph51.split, label %._crit_edge52, !llvm.loop !11

29:                                               ; preds = %.lr.ph44, %49
  %30 = phi i32 [ %18, %.lr.ph44 ], [ %50, %49 ]
  %indvars.iv56 = phi i64 [ 1, %.lr.ph44 ], [ %indvars.iv.next57, %49 ]
  %.141 = phi i32 [ %.03347, %.lr.ph44 ], [ %spec.select, %49 ]
  %31 = load i32, ptr %21, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %.not37 = icmp slt i64 %indvars.iv56, %32
  br i1 %.not37, label %45, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %34 = trunc nuw nsw i64 %indvars.iv56 to i32
  %35 = sub nsw i32 %34, %31
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [2 x [2001 x i32]], ptr %5, i64 0, i64 %22, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %23, align 4, !tbaa !5
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %6, align 4, !tbaa !5
  %41 = getelementptr inbounds [2 x [2001 x i32]], ptr %5, i64 0, i64 %22, i64 %indvars.iv56
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = getelementptr inbounds [2 x [2001 x i32]], ptr %5, i64 0, i64 %24, i64 %indvars.iv56
  store i32 %43, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %49

45:                                               ; preds = %29
  %46 = getelementptr inbounds [2 x [2001 x i32]], ptr %5, i64 0, i64 %22, i64 %indvars.iv56
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = getelementptr inbounds [2 x [2001 x i32]], ptr %5, i64 0, i64 %24, i64 %indvars.iv56
  store i32 %47, ptr %48, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %45, %33
  %50 = phi i32 [ %30, %45 ], [ %.pre, %33 ]
  %51 = phi i32 [ %47, %45 ], [ %43, %33 ]
  %spec.select = call i32 @llvm.smax.i32(i32 %51, i32 %.141)
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %52 = sext i32 %50 to i64
  %.not36.not = icmp slt i64 %indvars.iv56, %52
  br i1 %.not36.not, label %29, label %._crit_edge45.loopexit, !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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10}


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