; LLVM IR from ahampriyanshu/algo-ds-101 :: Algorithms/Sorting/Strand_Sort (strand_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"

%struct.slist = type { ptr, ptr }
%struct.node_t = type { i32, ptr }

; Function Attrs: nounwind uwtable
declare dso_local void @push(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @removehead(ptr noundef) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local void @merge(ptr noundef, ptr noundef) #0

; 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: 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) #3

; Function Attrs: nounwind uwtable
define dso_local void @sort(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.slist, align 8
  %9 = alloca %struct.slist, align 8
  %10 = alloca %struct.slist, align 8
  %11 = alloca %struct.slist, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %14 = load i32, ptr %4, align 4, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %5, align 8
  %17 = alloca %struct.node_t, i64 %15, align 16
  store i64 %15, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %49, %2
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %52

23:                                               ; preds = %18
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr %24, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %struct.node_t, ptr %17, i64 %30
  %32 = getelementptr inbounds %struct.node_t, ptr %31, i32 0, i32 0
  store i32 %28, ptr %32, align 16, !tbaa !11
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = sub nsw i32 %34, 1
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %37, label %42

37:                                               ; preds = %23
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds %struct.node_t, ptr %17, i64 %39
  %41 = getelementptr inbounds %struct.node_t, ptr %40, i64 1
  br label %43

42:                                               ; preds = %23
  br label %43

43:                                               ; preds = %42, %37
  %44 = phi ptr [ %41, %37 ], [ null, %42 ]
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.node_t, ptr %17, i64 %46
  %48 = getelementptr inbounds %struct.node_t, ptr %47, i32 0, i32 1
  store ptr %44, ptr %48, align 8, !tbaa !13
  br label %49

49:                                               ; preds = %43
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %7, align 4, !tbaa !9
  br label %18, !llvm.loop !14

52:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %53 = getelementptr inbounds %struct.slist, ptr %8, i32 0, i32 0
  store ptr %17, ptr %53, align 8, !tbaa !16
  %54 = getelementptr inbounds %struct.slist, ptr %8, i32 0, i32 1
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.node_t, ptr %17, i64 %56
  %58 = getelementptr inbounds %struct.node_t, ptr %57, i64 -1
  store ptr %58, ptr %54, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %89, %52
  %60 = getelementptr inbounds %struct.slist, ptr %8, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !16
  %62 = icmp ne ptr %61, null
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %90

64:                                               ; preds = %59
  %65 = getelementptr inbounds %struct.slist, ptr %9, i32 0, i32 1
  store ptr null, ptr %65, align 8, !tbaa !18
  %66 = getelementptr inbounds %struct.slist, ptr %9, i32 0, i32 0
  store ptr null, ptr %66, align 8, !tbaa !16
  br label %67

67:                                               ; preds = %85, %64
  %68 = call ptr @removehead(ptr noundef %8)
  store ptr %68, ptr %12, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %88

70:                                               ; preds = %67
  %71 = getelementptr inbounds %struct.slist, ptr %10, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %83

74:                                               ; preds = %70
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.node_t, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds %struct.slist, ptr %10, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = getelementptr inbounds %struct.node_t, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = icmp sge i32 %77, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %74, %70
  br label %85

84:                                               ; preds = %74
  br label %85

85:                                               ; preds = %84, %83
  %86 = phi ptr [ %10, %83 ], [ %9, %84 ]
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  call void @push(ptr noundef %86, ptr noundef %87)
  br label %67, !llvm.loop !19

88:                                               ; preds = %67
  call void @merge(ptr noundef %11, ptr noundef %10)
  br label %89

89:                                               ; preds = %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !20
  br label %59, !llvm.loop !21

90:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %105, %90
  %92 = getelementptr inbounds %struct.slist, ptr %11, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  %94 = icmp ne ptr %93, null
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %113

96:                                               ; preds = %91
  %97 = getelementptr inbounds %struct.slist, ptr %11, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !16
  %99 = getelementptr inbounds %struct.node_t, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !11
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  store i32 %100, ptr %104, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %96
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %13, align 4, !tbaa !9
  %108 = getelementptr inbounds %struct.slist, ptr %11, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = getelementptr inbounds %struct.node_t, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = getelementptr inbounds %struct.slist, ptr %11, i32 0, i32 0
  store ptr %111, ptr %112, align 8, !tbaa !16
  br label %91, !llvm.loop !22

113:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  %114 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %114)
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
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 = !{!"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 = !{!12, !10, i64 0}
!12 = !{!"node_t", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !6, i64 0}
!17 = !{!"", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !15}
!20 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


; 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.slist = type { ptr, ptr }
%struct.node_t = type { i32, ptr }

; Function Attrs: nounwind uwtable
declare dso_local void @push(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @removehead(ptr 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local void @merge(ptr noundef, ptr noundef) local_unnamed_addr #0

; 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 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) #3

; Function Attrs: nounwind uwtable
define dso_local void @sort(ptr nocapture noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.slist, align 8
  %4 = alloca %struct.slist, align 8
  %5 = alloca %struct.slist, align 8
  %6 = alloca %struct.slist, align 8
  %7 = zext i32 %1 to i64
  %8 = alloca %struct.node_t, i64 %7, align 16
  %9 = icmp sgt i32 %1, 0
  br i1 %9, label %.lr.ph, label %.lr.ph32

.lr.ph:                                           ; preds = %2
  %10 = add nsw i32 %1, -1
  %11 = zext nneg i32 %10 to i64
  %xtraiter = and i64 %7, 1
  %12 = icmp eq i32 %1, 1
  br i1 %12, label %.lr.ph32.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %7, 2147483646
  br label %25

.lr.ph32.loopexit.unr-lcssa:                      ; preds = %25, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %25 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph32, label %.lr.ph32.loopexit.epilog-lcssa

.lr.ph32.loopexit.epilog-lcssa:                   ; preds = %.lr.ph32.loopexit.unr-lcssa
  %13 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.unr
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = getelementptr inbounds %struct.node_t, ptr %8, i64 %indvars.iv.unr
  store i32 %14, ptr %15, align 16, !tbaa !9
  %16 = icmp ult i64 %indvars.iv.unr, %11
  %17 = getelementptr inbounds i8, ptr %15, i64 16
  %18 = select i1 %16, ptr %17, ptr null
  %19 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %18, ptr %19, align 8, !tbaa !12
  br label %.lr.ph32

.lr.ph32:                                         ; preds = %.lr.ph32.loopexit.epilog-lcssa, %.lr.ph32.loopexit.unr-lcssa, %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  store ptr %8, ptr %3, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %3, i64 8
  %21 = sext i32 %1 to i64
  %22 = getelementptr inbounds %struct.node_t, ptr %8, i64 %21
  %23 = getelementptr inbounds i8, ptr %22, i64 -16
  store ptr %23, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  br label %40

25:                                               ; preds = %25, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %25 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %25 ]
  %26 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds %struct.node_t, ptr %8, i64 %indvars.iv
  store i32 %27, ptr %28, align 16, !tbaa !9
  %29 = icmp ult i64 %indvars.iv, %11
  %30 = getelementptr inbounds i8, ptr %28, i64 16
  %31 = select i1 %29, ptr %30, ptr null
  %32 = getelementptr inbounds i8, ptr %28, i64 8
  store ptr %31, ptr %32, align 8, !tbaa !12
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %33 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds %struct.node_t, ptr %8, i64 %indvars.iv.next
  store i32 %34, ptr %35, align 16, !tbaa !9
  %36 = icmp ult i64 %indvars.iv.next, %11
  %37 = getelementptr inbounds i8, ptr %35, i64 16
  %38 = select i1 %36, ptr %37, ptr null
  %39 = getelementptr inbounds i8, ptr %35, i64 8
  store ptr %38, ptr %39, align 8, !tbaa !12
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.lr.ph32.loopexit.unr-lcssa, label %25, !llvm.loop !16

40:                                               ; preds = %.lr.ph32, %._crit_edge29
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %41 = call ptr @removehead(ptr noundef nonnull %3)
  %.not2226 = icmp eq ptr %41, null
  br i1 %.not2226, label %._crit_edge29, label %.lr.ph28

.lr.ph28:                                         ; preds = %40, %48
  %42 = phi ptr [ %50, %48 ], [ %41, %40 ]
  %43 = load ptr, ptr %5, align 8, !tbaa !13
  %.not23 = icmp eq ptr %43, null
  br i1 %.not23, label %48, label %44

44:                                               ; preds = %.lr.ph28
  %45 = load i32, ptr %42, align 8, !tbaa !9
  %46 = load ptr, ptr %24, align 8, !tbaa !15
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %.not24 = icmp slt i32 %45, %47
  %spec.select = select i1 %.not24, ptr %4, ptr %5
  br label %48

48:                                               ; preds = %44, %.lr.ph28
  %49 = phi ptr [ %5, %.lr.ph28 ], [ %spec.select, %44 ]
  call void @push(ptr noundef %49, ptr noundef nonnull %42)
  %50 = call ptr @removehead(ptr noundef nonnull %3)
  %.not22 = icmp eq ptr %50, null
  br i1 %.not22, label %._crit_edge29, label %.lr.ph28, !llvm.loop !18

._crit_edge29:                                    ; preds = %48, %40
  call void @merge(ptr noundef nonnull %6, ptr noundef nonnull %5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %4, i64 16, i1 false), !tbaa.struct !19
  %51 = load ptr, ptr %3, align 8, !tbaa !13
  %.not = icmp eq ptr %51, null
  br i1 %.not, label %thread-pre-split, label %40, !llvm.loop !21

thread-pre-split:                                 ; preds = %._crit_edge29
  %.pr.pre = load ptr, ptr %6, align 8, !tbaa !13
  %.not2133 = icmp eq ptr %.pr.pre, null
  br i1 %.not2133, label %._crit_edge36, label %.lr.ph35

._crit_edge36:                                    ; preds = %.lr.ph35, %thread-pre-split
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret void

.lr.ph35:                                         ; preds = %thread-pre-split, %.lr.ph35
  %indvars.iv38 = phi i64 [ %indvars.iv.next39, %.lr.ph35 ], [ 0, %thread-pre-split ]
  %52 = phi ptr [ %56, %.lr.ph35 ], [ %.pr.pre, %thread-pre-split ]
  %53 = load i32, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv38
  store i32 %53, ptr %54, align 4, !tbaa !5
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %55 = getelementptr inbounds i8, ptr %52, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !12
  %.not21 = icmp eq ptr %56, null
  br i1 %.not21, label %._crit_edge36, label %.lr.ph35, !llvm.loop !22
}

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"node_t", !6, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !11, i64 0}
!14 = !{!"", !11, i64 0, !11, i64 8}
!15 = !{!14, !11, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{i64 0, i64 8, !20, i64 8, i64 8, !20}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass