; LLVM IR from lolosssss/leetcode :: c (349_intersection_of_two_arrays)

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

; Function Attrs: nounwind uwtable
define dso_local ptr @intersection(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [1000 x i32], align 16
  %12 = alloca [1000 x i32], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4000, ptr %11) #4
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 4000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4000, ptr %12) #4
  call void @llvm.memset.p0.i64(ptr align 16 %12, i8 0, i64 4000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = icmp sgt i32 %16, %17
  br i1 %18, label %19, label %21

19:                                               ; preds = %5
  %20 = load i32, ptr %9, align 4, !tbaa !9
  br label %23

21:                                               ; preds = %5
  %22 = load i32, ptr %7, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %21, %19
  %24 = phi i32 [ %20, %19 ], [ %22, %21 ]
  store i32 %24, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  %25 = load i32, ptr %14, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = mul i64 4, %26
  %28 = call noalias ptr @malloc(i64 noundef %27) #5
  store ptr %28, ptr %15, align 8, !tbaa !5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %41, %23
  %30 = load i32, ptr %13, align 4, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %44

33:                                               ; preds = %29
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr %34, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1000 x i32], ptr %11, i64 0, i64 %39
  store i32 1, ptr %40, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %33
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %13, align 4, !tbaa !9
  br label %29, !llvm.loop !11

44:                                               ; preds = %29
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %57, %44
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %60

49:                                               ; preds = %45
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %50, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1000 x i32], ptr %12, i64 0, i64 %55
  store i32 1, ptr %56, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %49
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %13, align 4, !tbaa !9
  br label %45, !llvm.loop !13

60:                                               ; preds = %45
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %85, %60
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = icmp slt i32 %62, 1000
  br i1 %63, label %64, label %88

64:                                               ; preds = %61
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1000 x i32], ptr %11, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %84

70:                                               ; preds = %64
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1000 x i32], ptr %12, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %84

76:                                               ; preds = %70
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %79, align 4, !tbaa !9
  %82 = sext i32 %80 to i64
  %83 = getelementptr inbounds i32, ptr %78, i64 %82
  store i32 %77, ptr %83, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %76, %70, %64
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %13, align 4, !tbaa !9
  br label %61, !llvm.loop !14

88:                                               ; preds = %61
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4000, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4000, ptr %11) #4
  ret ptr %89
}

; 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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind allocsize(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 }
attributes #5 = { nounwind allocsize(0) }

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

; Function Attrs: nofree nounwind memory(write, argmem: readwrite, inaccessiblemem: readwrite) uwtable
define dso_local noalias noundef ptr @intersection(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, ptr nocapture noundef %4) local_unnamed_addr #0 {
  %6 = alloca [1000 x i32], align 16
  %7 = alloca [1000 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %6) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) %6, i8 0, i64 4000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %7) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) %7, i8 0, i64 4000, i1 false)
  %8 = tail call i32 @llvm.smin.i32(i32 %1, i32 %3)
  %9 = sext i32 %8 to i64
  %10 = shl nsw i64 %9, 2
  %11 = tail call noalias ptr @malloc(i64 noundef %10) #6
  %12 = icmp sgt i32 %1, 0
  br i1 %12, label %.lr.ph.preheader, label %.preheader23

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext nneg i32 %1 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %13 = icmp ult i32 %1, 4
  br i1 %13, label %.preheader23.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.preheader23.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader23, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader23.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader23.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader23.loopexit.unr-lcssa ]
  %14 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.epil
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %16
  store i32 1, ptr %17, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 %.preheader23, label %.lr.ph.epil, !llvm.loop !9

.preheader23:                                     ; preds = %.preheader23.loopexit.unr-lcssa, %.lr.ph.epil, %5
  %18 = icmp sgt i32 %3, 0
  br i1 %18, label %.lr.ph26.preheader, label %.preheader.preheader

.lr.ph26.preheader:                               ; preds = %.preheader23
  %wide.trip.count32 = zext nneg i32 %3 to i64
  %xtraiter38 = and i64 %wide.trip.count32, 3
  %19 = icmp ult i32 %3, 4
  br i1 %19, label %.preheader.preheader.loopexit.unr-lcssa, label %.lr.ph26.preheader.new

.lr.ph26.preheader.new:                           ; preds = %.lr.ph26.preheader
  %unroll_iter41 = and i64 %wide.trip.count32, 2147483644
  br label %.lr.ph26

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %20 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %22
  store i32 1, ptr %23, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %24 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %26
  store i32 1, ptr %27, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %28 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.1
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %30
  store i32 1, ptr %31, align 4, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %32 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.2
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %34
  store i32 1, ptr %35, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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 %.preheader23.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

.lr.ph26:                                         ; preds = %.lr.ph26, %.lr.ph26.preheader.new
  %indvars.iv29 = phi i64 [ 0, %.lr.ph26.preheader.new ], [ %indvars.iv.next30.3, %.lr.ph26 ]
  %niter42 = phi i64 [ 0, %.lr.ph26.preheader.new ], [ %niter42.next.3, %.lr.ph26 ]
  %36 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv29
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %38
  store i32 1, ptr %39, align 4, !tbaa !5
  %indvars.iv.next30 = or disjoint i64 %indvars.iv29, 1
  %40 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next30
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %42
  store i32 1, ptr %43, align 4, !tbaa !5
  %indvars.iv.next30.1 = or disjoint i64 %indvars.iv29, 2
  %44 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next30.1
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %46
  store i32 1, ptr %47, align 4, !tbaa !5
  %indvars.iv.next30.2 = or disjoint i64 %indvars.iv29, 3
  %48 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next30.2
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %50
  store i32 1, ptr %51, align 4, !tbaa !5
  %indvars.iv.next30.3 = add nuw nsw i64 %indvars.iv29, 4
  %niter42.next.3 = add i64 %niter42, 4
  %niter42.ncmp.3 = icmp eq i64 %niter42.next.3, %unroll_iter41
  br i1 %niter42.ncmp.3, label %.preheader.preheader.loopexit.unr-lcssa, label %.lr.ph26, !llvm.loop !13

.preheader.preheader.loopexit.unr-lcssa:          ; preds = %.lr.ph26, %.lr.ph26.preheader
  %indvars.iv29.unr = phi i64 [ 0, %.lr.ph26.preheader ], [ %indvars.iv.next30.3, %.lr.ph26 ]
  %lcmp.mod40.not = icmp eq i64 %xtraiter38, 0
  br i1 %lcmp.mod40.not, label %.preheader.preheader, label %.lr.ph26.epil

.lr.ph26.epil:                                    ; preds = %.preheader.preheader.loopexit.unr-lcssa, %.lr.ph26.epil
  %indvars.iv29.epil = phi i64 [ %indvars.iv.next30.epil, %.lr.ph26.epil ], [ %indvars.iv29.unr, %.preheader.preheader.loopexit.unr-lcssa ]
  %epil.iter39 = phi i64 [ %epil.iter39.next, %.lr.ph26.epil ], [ 0, %.preheader.preheader.loopexit.unr-lcssa ]
  %52 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv29.epil
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %54
  store i32 1, ptr %55, align 4, !tbaa !5
  %indvars.iv.next30.epil = add nuw nsw i64 %indvars.iv29.epil, 1
  %epil.iter39.next = add i64 %epil.iter39, 1
  %epil.iter39.cmp.not = icmp eq i64 %epil.iter39.next, %xtraiter38
  br i1 %epil.iter39.cmp.not, label %.preheader.preheader, label %.lr.ph26.epil, !llvm.loop !14

.preheader.preheader:                             ; preds = %.preheader.preheader.loopexit.unr-lcssa, %.lr.ph26.epil, %.preheader23
  br label %.preheader

.preheader:                                       ; preds = %78, %.preheader.preheader
  %indvars.iv34 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next35.1, %78 ]
  %56 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %indvars.iv34
  %57 = load i32, ptr %56, align 8, !tbaa !5
  %.not = icmp eq i32 %57, 0
  br i1 %.not, label %.preheader.1, label %58

58:                                               ; preds = %.preheader
  %59 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %indvars.iv34
  %60 = load i32, ptr %59, align 8, !tbaa !5
  %.not22 = icmp eq i32 %60, 0
  br i1 %.not22, label %.preheader.1, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %62 to i64
  %65 = getelementptr inbounds i32, ptr %11, i64 %64
  %66 = trunc nuw nsw i64 %indvars.iv34 to i32
  store i32 %66, ptr %65, align 4, !tbaa !5
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader, %58, %61
  %indvars.iv.next35 = or disjoint i64 %indvars.iv34, 1
  %67 = getelementptr inbounds [1000 x i32], ptr %6, i64 0, i64 %indvars.iv.next35
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %68, 0
  br i1 %.not.1, label %78, label %69

69:                                               ; preds = %.preheader.1
  %70 = getelementptr inbounds [1000 x i32], ptr %7, i64 0, i64 %indvars.iv.next35
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %.not22.1 = icmp eq i32 %71, 0
  br i1 %.not22.1, label %78, label %72

72:                                               ; preds = %69
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %4, align 4, !tbaa !5
  %75 = sext i32 %73 to i64
  %76 = getelementptr inbounds i32, ptr %11, i64 %75
  %77 = trunc nuw nsw i64 %indvars.iv.next35 to i32
  store i32 %77, ptr %76, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %72, %69, %.preheader.1
  %indvars.iv.next35.1 = add nuw nsw i64 %indvars.iv34, 2
  %exitcond37.not.1 = icmp eq i64 %indvars.iv.next35.1, 1000
  br i1 %exitcond37.not.1, label %79, label %.preheader, !llvm.loop !15

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %6) #5
  ret ptr %11
}

; 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: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { nofree nounwind memory(write, argmem: readwrite, inaccessiblemem: readwrite) 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #6 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !12}


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