; LLVM IR from LeetCode-in-C/LeetCode-in-C :: src/main/c/g0001_0100/s0072_edit_distance (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"

; Function Attrs: nounwind uwtable
define dso_local i32 @minDistance(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = call i64 @strlen(ptr noundef %16) #6
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call i64 @strlen(ptr noundef %19) #6
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %7, align 4, !tbaa !9
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = icmp sgt i32 %22, %23
  br i1 %24, label %25, label %29

25:                                               ; preds = %2
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call i32 @minDistance(ptr noundef %26, ptr noundef %27)
  store i32 %28, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %171

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = mul i64 %32, 4
  %34 = call noalias ptr @malloc(i64 noundef %33) #7
  store ptr %34, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %46, %29
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %49

40:                                               ; preds = %35
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %42, i64 %44
  store i32 %41, ptr %45, align 4, !tbaa !9
  br label %46

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

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

50:                                               ; preds = %160, %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds i32, ptr %56, i64 0
  %58 = load i32, ptr %57, align 4, !tbaa !9
  store i32 %58, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds i32, ptr %60, i64 0
  store i32 %59, ptr %61, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %156, %55
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %159

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %73, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !13
  %79 = sext i8 %78 to i32
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %80, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !13
  %86 = sext i8 %85 to i32
  %87 = icmp ne i32 %79, %86
  br i1 %87, label %88, label %147

88:                                               ; preds = %67
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = icmp slt i32 %89, %94
  br i1 %95, label %96, label %116

96:                                               ; preds = %88
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %98, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = icmp slt i32 %97, %103
  br i1 %104, label %105, label %107

105:                                              ; preds = %96
  %106 = load i32, ptr %12, align 4, !tbaa !9
  br label %114

107:                                              ; preds = %96
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %108, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %107, %105
  %115 = phi i32 [ %106, %105 ], [ %113, %107 ]
  br label %144

116:                                              ; preds = %88
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %122, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp slt i32 %121, %127
  br i1 %128, label %129, label %135

129:                                              ; preds = %116
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !9
  br label %142

135:                                              ; preds = %116
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load i32, ptr %13, align 4, !tbaa !9
  %138 = sub nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %136, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %135, %129
  %143 = phi i32 [ %134, %129 ], [ %141, %135 ]
  br label %144

144:                                              ; preds = %142, %114
  %145 = phi i32 [ %115, %114 ], [ %143, %142 ]
  %146 = add nsw i32 1, %145
  br label %149

147:                                              ; preds = %67
  %148 = load i32, ptr %12, align 4, !tbaa !9
  br label %149

149:                                              ; preds = %147, %144
  %150 = phi i32 [ %146, %144 ], [ %148, %147 ]
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  store i32 %150, ptr %154, align 4, !tbaa !9
  %155 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %155, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %156

156:                                              ; preds = %149
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %13, align 4, !tbaa !9
  br label %62, !llvm.loop !14

159:                                              ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %11, align 4, !tbaa !9
  br label %50, !llvm.loop !15

163:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load i32, ptr %7, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %164, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  store i32 %168, ptr %15, align 4, !tbaa !9
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %169) #5
  %170 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %170, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %171

171:                                              ; preds = %163, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %172 = load i32, ptr %3, align 4
  ret i32 %172
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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 = { nounwind willreturn memory(read) "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 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 "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 }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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 = !{!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"

; Function Attrs: nounwind memory(readwrite, argmem: read) uwtable
define dso_local i32 @minDistance(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %tailrecurse, %2
  %.tr = phi ptr [ %0, %2 ], [ %.tr66, %tailrecurse ]
  %.tr66 = phi ptr [ %1, %2 ], [ %.tr, %tailrecurse ]
  %3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.tr) #5
  %4 = trunc i64 %3 to i32
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.tr66) #5
  %6 = trunc i64 %5 to i32
  %7 = icmp sgt i32 %6, %4
  br i1 %7, label %tailrecurse, label %8

8:                                                ; preds = %tailrecurse
  %9 = shl i64 %5, 32
  %sext = add i64 %9, 4294967296
  %10 = ashr exact i64 %sext, 30
  %11 = tail call noalias ptr @malloc(i64 noundef %10) #6
  %.not69 = icmp slt i32 %6, 0
  br i1 %.not69, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %8
  %12 = add nuw nsw i64 %5, 1
  %wide.trip.count = and i64 %12, 4294967295
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader100, label %vector.ph

.lr.ph.preheader100:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %12, 7
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %13 = getelementptr inbounds i32, ptr %11, i64 %index
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  store <4 x i32> %vec.ind, ptr %13, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %14, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %15 = icmp eq i64 %index.next, %n.vec
  br i1 %15, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %.preheader, label %.lr.ph.preheader100

.preheader:                                       ; preds = %.lr.ph, %middle.block, %8
  %.not6275 = icmp slt i32 %4, 1
  br i1 %.not6275, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %.preheader
  %invariant.gep = getelementptr i8, ptr %.tr, i64 -1
  %.not6471 = icmp slt i32 %6, 1
  br i1 %.not6471, label %.lr.ph77.split.us.preheader, label %.lr.ph74.preheader

.lr.ph74.preheader:                               ; preds = %.lr.ph77
  %.promoted = load i32, ptr %11, align 4, !tbaa !5
  %16 = add nuw nsw i64 %5, 1
  %17 = add nuw nsw i64 %3, 1
  %wide.trip.count91 = and i64 %17, 4294967295
  %wide.trip.count86 = and i64 %16, 4294967295
  br label %.lr.ph74

.lr.ph77.split.us.preheader:                      ; preds = %.lr.ph77
  store i32 %4, ptr %11, align 4, !tbaa !5
  br label %._crit_edge78

.lr.ph:                                           ; preds = %.lr.ph.preheader100, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader100 ]
  %18 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %19, ptr %18, align 4, !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 %.preheader, label %.lr.ph, !llvm.loop !13

._crit_edge78:                                    ; preds = %._crit_edge, %.lr.ph77.split.us.preheader, %.preheader
  %20 = ashr exact i64 %9, 30
  %21 = getelementptr inbounds i8, ptr %11, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  tail call void @free(ptr noundef %11) #7
  ret i32 %22

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %._crit_edge
  %indvars.iv88 = phi i64 [ 1, %.lr.ph74.preheader ], [ %indvars.iv.next89, %._crit_edge ]
  %.0557679 = phi i32 [ %.promoted, %.lr.ph74.preheader ], [ %23, %._crit_edge ]
  %23 = trunc nuw nsw i64 %indvars.iv88 to i32
  store i32 %23, ptr %11, align 4, !tbaa !5
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv88
  br label %24

._crit_edge:                                      ; preds = %34
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge78, label %.lr.ph74, !llvm.loop !14

24:                                               ; preds = %.lr.ph74, %34
  %25 = phi i32 [ %23, %.lr.ph74 ], [ %35, %34 ]
  %indvars.iv83 = phi i64 [ 1, %.lr.ph74 ], [ %indvars.iv.next84, %34 ]
  %.05472 = phi i32 [ %.0557679, %.lr.ph74 ], [ %27, %34 ]
  %26 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv83
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = load i8, ptr %gep, align 1, !tbaa !15
  %29 = add nsw i64 %indvars.iv83, -1
  %30 = getelementptr inbounds i8, ptr %.tr66, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !15
  %.not65 = icmp eq i8 %28, %31
  br i1 %.not65, label %34, label %32

32:                                               ; preds = %24
  %.05472. = tail call i32 @llvm.smin.i32(i32 %.05472, i32 %27)
  %. = tail call i32 @llvm.smin.i32(i32 %.05472., i32 %25)
  %33 = add nsw i32 %., 1
  br label %34

34:                                               ; preds = %24, %32
  %35 = phi i32 [ %33, %32 ], [ %.05472, %24 ]
  store i32 %35, ptr %26, align 4, !tbaa !5
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge, label %24, !llvm.loop !16
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

attributes #0 = { nounwind memory(readwrite, argmem: read) 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 nofree nounwind willreturn memory(argmem: read) "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 #2 = { 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 #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 willreturn memory(read) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}


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