; LLVM IR from tangjz/acm-icpc :: codeforces/gym/100827F.ll (Z5solvev)

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

%struct.Matrix = type { i32, i32, [257 x [257 x i32]] }

@tr = external dso_local global [5 x [31 x %struct.Matrix]], align 16
@vec = external dso_local global %struct.Matrix, align 4
@mx = external dso_local global [5 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = add nsw i32 %8, %9
  %11 = shl i32 1, %10
  store i32 %11, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN6Matrix5resetEii(ptr noundef nonnull align 4 dereferenceable(264204) @vec, i32 noundef 1, i32 noundef %12)
  %13 = load i32, ptr getelementptr inbounds (%struct.Matrix, ptr @vec, i32 0, i32 2), align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr getelementptr inbounds (%struct.Matrix, ptr @vec, i32 0, i32 2), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %15

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

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

19:                                               ; preds = %15
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = and i32 %20, 1
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  br label %74

24:                                               ; preds = %19
  br label %25

25:                                               ; preds = %61, %24
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %67

32:                                               ; preds = %25
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %34
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [31 x %struct.Matrix], ptr %35, i64 0, i64 %41
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %44
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [31 x %struct.Matrix], ptr %45, i64 0, i64 %50
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %53
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [31 x %struct.Matrix], ptr %54, i64 0, i64 %59
  call void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204) %42, ptr noundef nonnull align 4 dereferenceable(264204) %51, ptr noundef nonnull align 4 dereferenceable(264204) %60)
  br label %61

61:                                               ; preds = %32
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !5
  br label %25, !llvm.loop !9

67:                                               ; preds = %25
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %69
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [31 x %struct.Matrix], ptr %70, i64 0, i64 %72
  call void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204) @vec, ptr noundef nonnull align 4 dereferenceable(264204) @vec, ptr noundef nonnull align 4 dereferenceable(264204) %73)
  br label %74

74:                                               ; preds = %67, %23
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !5
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = ashr i32 %77, 1
  store i32 %78, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !11

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

80:                                               ; preds = %99, %79
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %102

85:                                               ; preds = %80
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (%struct.Matrix, ptr @vec, i32 0, i32 2), i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = add nsw i32 %90, %89
  store i32 %91, ptr %5, align 4, !tbaa !5
  %92 = icmp sge i32 %91, 1000000009
  br i1 %92, label %93, label %97

93:                                               ; preds = %85
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1000000009
  store i32 %95, ptr %5, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 0
  br label %97

97:                                               ; preds = %93, %85
  %98 = phi i1 [ false, %85 ], [ %96, %93 ]
  br label %99

99:                                               ; preds = %97
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %6, align 4, !tbaa !5
  br label %80, !llvm.loop !12

102:                                              ; preds = %84
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %103)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6Matrix5resetEii(ptr noundef nonnull align 4 dereferenceable(264204), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204), ptr noundef nonnull align 4 dereferenceable(264204), ptr noundef nonnull align 4 dereferenceable(264204)) #3 align 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 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 = { 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 #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 = 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"

%struct.Matrix = type { i32, i32, [257 x [257 x i32]] }

@tr = external dso_local global [5 x [31 x %struct.Matrix]], align 16
@vec = external dso_local global %struct.Matrix, align 4
@mx = external dso_local local_unnamed_addr global [5 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = shl nsw i32 %4, 1
  %6 = shl nuw i32 1, %5
  call void @_ZN6Matrix5resetEii(ptr noundef nonnull align 4 dereferenceable(264204) @vec, i32 noundef 1, i32 noundef %6)
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @vec, i64 8), align 4, !tbaa !5
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr getelementptr inbounds (i8, ptr @vec, i64 8), align 4, !tbaa !5
  %.pr = load i32, ptr %2, align 4, !tbaa !5
  %9 = icmp sgt i32 %.pr, 0
  br i1 %9, label %.lr.ph20, label %.preheader

.preheader:                                       ; preds = %34, %0
  %wide.trip.count = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %10 = icmp eq i32 %4, 0
  br i1 %10, label %.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader
  %unroll_iter = and i64 %wide.trip.count, 1431655764
  br label %44

.lr.ph20:                                         ; preds = %0, %34
  %indvars.iv = phi i64 [ %indvars.iv.next, %34 ], [ 0, %0 ]
  %11 = phi i32 [ %36, %34 ], [ %.pr, %0 ]
  %12 = and i32 %11, 1
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %34, label %.preheader17

.preheader17:                                     ; preds = %.lr.ph20
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp sgt i64 %indvars.iv, %17
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader17, %.lr.ph
  %19 = phi i32 [ %30, %.lr.ph ], [ %16, %.preheader17 ]
  %20 = phi i64 [ %27, %.lr.ph ], [ %14, %.preheader17 ]
  %21 = add nsw i32 %19, 1
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %20, i64 %22
  %24 = sext i32 %19 to i64
  %25 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %20, i64 %24
  call void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204) %23, ptr noundef nonnull align 4 dereferenceable(264204) %25, ptr noundef nonnull align 4 dereferenceable(264204) %25)
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [5 x i32], ptr @mx, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %28, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = icmp sgt i64 %indvars.iv, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %.preheader17
  %.lcssa = phi i64 [ %14, %.preheader17 ], [ %27, %.lr.ph ]
  %33 = getelementptr inbounds [5 x [31 x %struct.Matrix]], ptr @tr, i64 0, i64 %.lcssa, i64 %indvars.iv
  call void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204) @vec, ptr noundef nonnull align 4 dereferenceable(264204) @vec, ptr noundef nonnull align 4 dereferenceable(264204) %33)
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %.lr.ph20, %._crit_edge
  %35 = phi i32 [ %11, %.lr.ph20 ], [ %.pre, %._crit_edge ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = ashr i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph20, label %.preheader, !llvm.loop !11

.unr-lcssa:                                       ; preds = %44, %.preheader
  %spec.select.lcssa.ph = phi i32 [ poison, %.preheader ], [ %spec.select.3, %44 ]
  %indvars.iv25.unr = phi i64 [ 0, %.preheader ], [ %indvars.iv.next26.3, %44 ]
  %.01121.unr = phi i32 [ 0, %.preheader ], [ %spec.select.3, %44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %indvars.iv25.epil = phi i64 [ %indvars.iv.next26.epil, %.epil.preheader ], [ %indvars.iv25.unr, %.unr-lcssa ]
  %.01121.epil = phi i32 [ %spec.select.epil, %.epil.preheader ], [ %.01121.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %38 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (i8, ptr @vec, i64 8), i64 0, i64 %indvars.iv25.epil
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, %.01121.epil
  %41 = icmp sgt i32 %40, 1000000008
  %42 = add nsw i32 %40, -1000000009
  %spec.select.epil = select i1 %41, i32 %42, i32 %40
  %indvars.iv.next26.epil = add nuw nsw i64 %indvars.iv25.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !12

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %spec.select.lcssa = phi i32 [ %spec.select.lcssa.ph, %.unr-lcssa ], [ %spec.select.epil, %.epil.preheader ]
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  ret void

44:                                               ; preds = %44, %.preheader.new
  %indvars.iv25 = phi i64 [ 0, %.preheader.new ], [ %indvars.iv.next26.3, %44 ]
  %.01121 = phi i32 [ 0, %.preheader.new ], [ %spec.select.3, %44 ]
  %niter = phi i64 [ 0, %.preheader.new ], [ %niter.next.3, %44 ]
  %45 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (i8, ptr @vec, i64 8), i64 0, i64 %indvars.iv25
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %46, %.01121
  %48 = icmp sgt i32 %47, 1000000008
  %49 = add nsw i32 %47, -1000000009
  %spec.select = select i1 %48, i32 %49, i32 %47
  %indvars.iv.next26 = or disjoint i64 %indvars.iv25, 1
  %50 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (i8, ptr @vec, i64 8), i64 0, i64 %indvars.iv.next26
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, %spec.select
  %53 = icmp sgt i32 %52, 1000000008
  %54 = add nsw i32 %52, -1000000009
  %spec.select.1 = select i1 %53, i32 %54, i32 %52
  %indvars.iv.next26.1 = or disjoint i64 %indvars.iv25, 2
  %55 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (i8, ptr @vec, i64 8), i64 0, i64 %indvars.iv.next26.1
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, %spec.select.1
  %58 = icmp sgt i32 %57, 1000000008
  %59 = add nsw i32 %57, -1000000009
  %spec.select.2 = select i1 %58, i32 %59, i32 %57
  %indvars.iv.next26.2 = or disjoint i64 %indvars.iv25, 3
  %60 = getelementptr inbounds [257 x i32], ptr getelementptr inbounds (i8, ptr @vec, i64 8), i64 0, i64 %indvars.iv.next26.2
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %spec.select.2
  %63 = icmp sgt i32 %62, 1000000008
  %64 = add nsw i32 %62, -1000000009
  %spec.select.3 = select i1 %63, i32 %64, i32 %62
  %indvars.iv.next26.3 = add nuw nsw i64 %indvars.iv25, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.unr-lcssa, label %44, !llvm.loop !14
}

; 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 nounwind uwtable
declare dso_local void @_ZN6Matrix5resetEii(ptr noundef nonnull align 4 dereferenceable(264204), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Matrix9assignMulERKS_S1_(ptr noundef nonnull align 4 dereferenceable(264204), ptr noundef nonnull align 4 dereferenceable(264204), ptr noundef nonnull align 4 dereferenceable(264204)) local_unnamed_addr #0 align 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

attributes #0 = { 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 #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 = { 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, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}


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