; LLVM IR from sbshah97/DS-Algo-Handbook :: Algorithms/Sort_Algorithms/Radix_Sort (Radix_sort)

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

; Function Attrs: nounwind uwtable
declare dso_local void @print(ptr 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

declare i32 @printf(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: nounwind uwtable
define dso_local void @radix_sort(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [100 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [10 x i32], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 400, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %29, %2
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = load i32, ptr %4, align 4, !tbaa !9
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %14, label %32

14:                                               ; preds = %10
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr %15, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = icmp sgt i32 %19, %20
  br i1 %21, label %22, label %28

22:                                               ; preds = %14
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i32, ptr %23, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %27, ptr %7, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %22, %14
  br label %29

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

32:                                               ; preds = %10
  br label %33

33:                                               ; preds = %123, %32
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = sdiv i32 %34, %35
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %129

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #4
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 40, i1 false)
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %56, %38
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %59

43:                                               ; preds = %39
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sdiv i32 %48, %49
  %51 = srem i32 %50, 10
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %53, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %43
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %5, align 4, !tbaa !9
  br label %39, !llvm.loop !13

59:                                               ; preds = %39
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %74, %59
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = icmp slt i32 %61, 10
  br i1 %62, label %63, label %77

63:                                               ; preds = %60
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = sub nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = add nsw i32 %72, %68
  store i32 %73, ptr %71, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %63
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %5, align 4, !tbaa !9
  br label %60, !llvm.loop !14

77:                                               ; preds = %60
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = sub nsw i32 %78, 1
  store i32 %79, ptr %5, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %103, %77
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %83, label %106

83:                                               ; preds = %80
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %89, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sdiv i32 %93, %94
  %96 = srem i32 %95, 10
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = add nsw i32 %99, -1
  store i32 %100, ptr %98, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %101
  store i32 %88, ptr %102, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %83
  %104 = load i32, ptr %5, align 4, !tbaa !9
  %105 = add nsw i32 %104, -1
  store i32 %105, ptr %5, align 4, !tbaa !9
  br label %80, !llvm.loop !15

106:                                              ; preds = %80
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %120, %106
  %108 = load i32, ptr %5, align 4, !tbaa !9
  %109 = load i32, ptr %4, align 4, !tbaa !9
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %111, label %123

111:                                              ; preds = %107
  %112 = load i32, ptr %5, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  store i32 %115, ptr %119, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %111
  %121 = load i32, ptr %5, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %5, align 4, !tbaa !9
  br label %107, !llvm.loop !16

123:                                              ; preds = %107
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = mul nsw i32 %124, 10
  store i32 %125, ptr %8, align 4, !tbaa !9
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = load i32, ptr %4, align 4, !tbaa !9
  call void @print(ptr noundef %127, i32 noundef %128)
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #4
  br label %33, !llvm.loop !17

129:                                              ; preds = %33
  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 400, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { "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 = { 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 = !{!"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}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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"

@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @print(ptr 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: nofree nounwind
declare noundef i32 @printf(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: nounwind uwtable
define dso_local void @radix_sort(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca [100 x i32], align 16
  %4 = alloca [10 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %3) #6
  %5 = icmp sgt i32 %1, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge55

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 8
  br i1 %min.iters.check, label %.lr.ph.preheader92, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ]
  %vec.phi90 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %9, %vector.body ]
  %6 = getelementptr inbounds i32, ptr %0, i64 %index
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %wide.load = load <4 x i32>, ptr %6, align 4, !tbaa !5
  %wide.load91 = load <4 x i32>, ptr %7, align 4, !tbaa !5
  %8 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi)
  %9 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load91, <4 x i32> %vec.phi90)
  %index.next = add nuw i64 %index, 8
  %10 = icmp eq i64 %index.next, %n.vec
  br i1 %10, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %8, <4 x i32> %9)
  %11 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader43, label %.lr.ph.preheader92

.preheader43:                                     ; preds = %.lr.ph, %middle.block
  %spec.select.lcssa = phi i32 [ %11, %middle.block ], [ %spec.select, %.lr.ph ]
  %12 = icmp sgt i32 %spec.select.lcssa, 0
  br i1 %12, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %.preheader43
  %13 = zext nneg i32 %1 to i64
  %14 = shl nuw nsw i64 %13, 2
  %.phi.trans.insert = getelementptr inbounds i8, ptr %4, i64 4
  %.phi.trans.insert73 = getelementptr inbounds i8, ptr %4, i64 8
  %.phi.trans.insert75 = getelementptr inbounds i8, ptr %4, i64 12
  %.phi.trans.insert77 = getelementptr inbounds i8, ptr %4, i64 16
  %.phi.trans.insert79 = getelementptr inbounds i8, ptr %4, i64 20
  %.phi.trans.insert81 = getelementptr inbounds i8, ptr %4, i64 24
  %.phi.trans.insert83 = getelementptr inbounds i8, ptr %4, i64 28
  %.phi.trans.insert85 = getelementptr inbounds i8, ptr %4, i64 32
  %.phi.trans.insert87 = getelementptr inbounds i8, ptr %4, i64 36
  %15 = getelementptr inbounds i8, ptr %4, i64 4
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = getelementptr inbounds i8, ptr %4, i64 12
  %18 = getelementptr inbounds i8, ptr %4, i64 16
  %19 = getelementptr inbounds i8, ptr %4, i64 20
  %20 = getelementptr inbounds i8, ptr %4, i64 24
  %21 = getelementptr inbounds i8, ptr %4, i64 28
  %22 = getelementptr inbounds i8, ptr %4, i64 32
  %23 = getelementptr inbounds i8, ptr %4, i64 36
  br label %26

.lr.ph:                                           ; preds = %.lr.ph.preheader92, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader92 ]
  %.03645 = phi i32 [ %spec.select, %.lr.ph ], [ %.03645.ph, %.lr.ph.preheader92 ]
  %24 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %25, i32 %.03645)
  %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 %.preheader43, label %.lr.ph, !llvm.loop !13

26:                                               ; preds = %.lr.ph54, %._crit_edge
  %.053 = phi i32 [ 1, %.lr.ph54 ], [ %64, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %4, i8 0, i64 40, i1 false)
  br i1 %5, label %.lr.ph47, label %.preheader42

.preheader42.loopexit:                            ; preds = %.lr.ph47
  %.pre = load i32, ptr %4, align 16, !tbaa !5
  %.pre72 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  %.pre74 = load i32, ptr %.phi.trans.insert73, align 8, !tbaa !5
  %.pre76 = load i32, ptr %.phi.trans.insert75, align 4, !tbaa !5
  %.pre78 = load i32, ptr %.phi.trans.insert77, align 16, !tbaa !5
  %.pre80 = load i32, ptr %.phi.trans.insert79, align 4, !tbaa !5
  %.pre82 = load i32, ptr %.phi.trans.insert81, align 8, !tbaa !5
  %.pre84 = load i32, ptr %.phi.trans.insert83, align 4, !tbaa !5
  %.pre86 = load i32, ptr %.phi.trans.insert85, align 16, !tbaa !5
  %.pre88 = load i32, ptr %.phi.trans.insert87, align 4, !tbaa !5
  %27 = add nsw i32 %.pre72, %.pre
  br label %.preheader42

.preheader42:                                     ; preds = %.preheader42.loopexit, %26
  %28 = phi i32 [ %.pre88, %.preheader42.loopexit ], [ 0, %26 ]
  %29 = phi i32 [ %.pre86, %.preheader42.loopexit ], [ 0, %26 ]
  %30 = phi i32 [ %.pre84, %.preheader42.loopexit ], [ 0, %26 ]
  %31 = phi i32 [ %.pre82, %.preheader42.loopexit ], [ 0, %26 ]
  %32 = phi i32 [ %.pre80, %.preheader42.loopexit ], [ 0, %26 ]
  %33 = phi i32 [ %.pre78, %.preheader42.loopexit ], [ 0, %26 ]
  %34 = phi i32 [ %.pre76, %.preheader42.loopexit ], [ 0, %26 ]
  %35 = phi i32 [ %.pre74, %.preheader42.loopexit ], [ 0, %26 ]
  %36 = phi i32 [ %27, %.preheader42.loopexit ], [ 0, %26 ]
  store i32 %36, ptr %15, align 4, !tbaa !5
  %37 = add nsw i32 %35, %36
  store i32 %37, ptr %16, align 8, !tbaa !5
  %38 = add nsw i32 %34, %37
  store i32 %38, ptr %17, align 4, !tbaa !5
  %39 = add nsw i32 %33, %38
  store i32 %39, ptr %18, align 16, !tbaa !5
  %40 = add nsw i32 %32, %39
  store i32 %40, ptr %19, align 4, !tbaa !5
  %41 = add nsw i32 %31, %40
  store i32 %41, ptr %20, align 8, !tbaa !5
  %42 = add nsw i32 %30, %41
  store i32 %42, ptr %21, align 4, !tbaa !5
  %43 = add nsw i32 %29, %42
  store i32 %43, ptr %22, align 16, !tbaa !5
  %44 = add nsw i32 %28, %43
  store i32 %44, ptr %23, align 4, !tbaa !5
  br i1 %5, label %.lr.ph50, label %._crit_edge

.lr.ph47:                                         ; preds = %26, %.lr.ph47
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %.lr.ph47 ], [ 0, %26 ]
  %45 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv57
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sdiv i32 %46, %.053
  %48 = srem i32 %47, 10
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 4, !tbaa !5
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next58, %13
  br i1 %exitcond61.not, label %.preheader42.loopexit, label %.lr.ph47, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph50
  br i1 %5, label %.lr.ph52.preheader, label %._crit_edge

.lr.ph52.preheader:                               ; preds = %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %0, ptr nonnull align 16 %3, i64 %14, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph50:                                         ; preds = %.preheader42, %.lr.ph50
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.lr.ph50 ], [ %13, %.preheader42 ]
  %indvars.iv.next67 = add nsw i64 %indvars.iv66, -1
  %53 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next67
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sdiv i32 %54, %.053
  %56 = srem i32 %55, 10
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %58, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100 x i32], ptr %3, i64 0, i64 %61
  store i32 %54, ptr %62, align 4, !tbaa !5
  %63 = icmp sgt i64 %indvars.iv66, 1
  br i1 %63, label %.lr.ph50, label %.preheader, !llvm.loop !15

._crit_edge:                                      ; preds = %.preheader42, %.lr.ph52.preheader, %.preheader
  %64 = mul nuw nsw i32 %.053, 10
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  tail call void @print(ptr noundef %0, i32 noundef %1)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  %66 = udiv i32 %spec.select.lcssa, %64
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %26, label %._crit_edge55, !llvm.loop !16

._crit_edge55:                                    ; preds = %._crit_edge, %2, %.preheader43
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %3) #6
  ret void
}

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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/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 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass