; LLVM IR from Thre4dripper/DSA-Programs :: 05. Doubly Linked Lists/Insertion.ll (Z13insertAtIndexiiPP4NodeS1_Pi)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.Node = type { i32, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13insertAtIndexiiPP4NodeS1_Pi(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !9
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = icmp sge i32 %16, 0
  br i1 %17, label %18, label %154

18:                                               ; preds = %5
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = load ptr, ptr %10, align 8, !tbaa !9
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp sle i32 %19, %21
  br i1 %22, label %23, label %154

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %24 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #5
  store ptr %24, ptr %11, align 8, !tbaa !9
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load ptr, ptr %11, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.Node, ptr %26, i32 0, i32 0
  store i32 %25, ptr %27, align 8, !tbaa !11
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = load ptr, ptr %10, align 8, !tbaa !9
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sdiv i32 %30, 2
  %32 = icmp sle i32 %28, %31
  br i1 %32, label %33, label %96

33:                                               ; preds = %23
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %62

36:                                               ; preds = %33
  %37 = load ptr, ptr %8, align 8, !tbaa !9
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %48

40:                                               ; preds = %36
  %41 = load ptr, ptr %11, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.Node, ptr %41, i32 0, i32 1
  store ptr null, ptr %42, align 8, !tbaa !13
  %43 = load ptr, ptr %11, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.Node, ptr %43, i32 0, i32 2
  store ptr null, ptr %44, align 8, !tbaa !14
  %45 = load ptr, ptr %11, align 8, !tbaa !9
  %46 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %45, ptr %46, align 8, !tbaa !9
  %47 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %45, ptr %47, align 8, !tbaa !9
  br label %61

48:                                               ; preds = %36
  %49 = load ptr, ptr %8, align 8, !tbaa !9
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = load ptr, ptr %11, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.Node, ptr %51, i32 0, i32 1
  store ptr %50, ptr %52, align 8, !tbaa !13
  %53 = load ptr, ptr %11, align 8, !tbaa !9
  %54 = load ptr, ptr %8, align 8, !tbaa !9
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.Node, ptr %55, i32 0, i32 2
  store ptr %53, ptr %56, align 8, !tbaa !14
  %57 = load ptr, ptr %11, align 8, !tbaa !9
  %58 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %57, ptr %58, align 8, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.Node, ptr %59, i32 0, i32 2
  store ptr null, ptr %60, align 8, !tbaa !14
  br label %61

61:                                               ; preds = %48, %40
  br label %95

62:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  store ptr %64, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %75, %62
  %66 = load i32, ptr %13, align 4, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = icmp slt i32 %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %78

71:                                               ; preds = %65
  %72 = load ptr, ptr %12, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.Node, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !13
  store ptr %74, ptr %12, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %71
  %76 = load i32, ptr %13, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %13, align 4, !tbaa !5
  br label %65, !llvm.loop !15

78:                                               ; preds = %70
  %79 = load ptr, ptr %12, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.Node, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.Node, ptr %82, i32 0, i32 1
  store ptr %81, ptr %83, align 8, !tbaa !13
  %84 = load ptr, ptr %12, align 8, !tbaa !9
  %85 = load ptr, ptr %11, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.Node, ptr %85, i32 0, i32 2
  store ptr %84, ptr %86, align 8, !tbaa !14
  %87 = load ptr, ptr %11, align 8, !tbaa !9
  %88 = load ptr, ptr %12, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.Node, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  %91 = getelementptr inbounds %struct.Node, ptr %90, i32 0, i32 2
  store ptr %87, ptr %91, align 8, !tbaa !14
  %92 = load ptr, ptr %11, align 8, !tbaa !9
  %93 = load ptr, ptr %12, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.Node, ptr %93, i32 0, i32 1
  store ptr %92, ptr %94, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %95

95:                                               ; preds = %78, %61
  br label %150

96:                                               ; preds = %23
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = load ptr, ptr %10, align 8, !tbaa !9
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp eq i32 %97, %99
  br i1 %100, label %101, label %114

101:                                              ; preds = %96
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = load ptr, ptr %102, align 8, !tbaa !9
  %104 = load ptr, ptr %11, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.Node, ptr %104, i32 0, i32 2
  store ptr %103, ptr %105, align 8, !tbaa !14
  %106 = load ptr, ptr %11, align 8, !tbaa !9
  %107 = load ptr, ptr %9, align 8, !tbaa !9
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.Node, ptr %108, i32 0, i32 1
  store ptr %106, ptr %109, align 8, !tbaa !13
  %110 = load ptr, ptr %11, align 8, !tbaa !9
  %111 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %110, ptr %111, align 8, !tbaa !9
  %112 = load ptr, ptr %11, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.Node, ptr %112, i32 0, i32 1
  store ptr null, ptr %113, align 8, !tbaa !13
  br label %149

114:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %115 = load ptr, ptr %9, align 8, !tbaa !9
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  store ptr %116, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %117 = load ptr, ptr %10, align 8, !tbaa !9
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr %15, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %129, %114
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  %123 = icmp sgt i32 %120, %122
  br i1 %123, label %125, label %124

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

125:                                              ; preds = %119
  %126 = load ptr, ptr %14, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.Node, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !14
  store ptr %128, ptr %14, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %125
  %130 = load i32, ptr %15, align 4, !tbaa !5
  %131 = add nsw i32 %130, -1
  store i32 %131, ptr %15, align 4, !tbaa !5
  br label %119, !llvm.loop !17

132:                                              ; preds = %124
  %133 = load ptr, ptr %14, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.Node, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !14
  %136 = load ptr, ptr %11, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.Node, ptr %136, i32 0, i32 2
  store ptr %135, ptr %137, align 8, !tbaa !14
  %138 = load ptr, ptr %14, align 8, !tbaa !9
  %139 = load ptr, ptr %11, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.Node, ptr %139, i32 0, i32 1
  store ptr %138, ptr %140, align 8, !tbaa !13
  %141 = load ptr, ptr %11, align 8, !tbaa !9
  %142 = load ptr, ptr %14, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.Node, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !14
  %145 = getelementptr inbounds %struct.Node, ptr %144, i32 0, i32 1
  store ptr %141, ptr %145, align 8, !tbaa !13
  %146 = load ptr, ptr %11, align 8, !tbaa !9
  %147 = load ptr, ptr %14, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.Node, ptr %147, i32 0, i32 2
  store ptr %146, ptr %148, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %149

149:                                              ; preds = %132, %101
  br label %150

150:                                              ; preds = %149, %95
  %151 = load ptr, ptr %10, align 8, !tbaa !9
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %151, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %157

154:                                              ; preds = %18, %5
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %157

157:                                              ; preds = %154, %150
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 #3 = { nobuiltin 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 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Node", !6, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13insertAtIndexiiPP4NodeS1_Pi(i32 noundef %0, i32 noundef %1, ptr nocapture noundef %2, ptr nocapture noundef %3, ptr nocapture noundef %4) local_unnamed_addr #0 {
  %6 = icmp sgt i32 %1, -1
  br i1 %6, label %7, label %57

7:                                                ; preds = %5
  %8 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp slt i32 %8, %1
  br i1 %.not, label %57, label %9

9:                                                ; preds = %7
  %10 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #4
  store i32 %0, ptr %10, align 8, !tbaa !9
  %11 = lshr i32 %8, 1
  %.not63 = icmp ult i32 %11, %1
  br i1 %.not63, label %38, label %12

12:                                               ; preds = %9
  %13 = load ptr, ptr %2, align 8, !tbaa !12
  switch i32 %1, label %.lr.ph.preheader [
    i32 0, label %17
    i32 1, label %._crit_edge
  ]

.lr.ph.preheader:                                 ; preds = %12
  %14 = add nsw i32 %1, -2
  %15 = add nsw i32 %1, -1
  %xtraiter = and i32 %15, 7
  %16 = icmp ult i32 %14, 7
  br i1 %16, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %15, -8
  br label %.lr.ph

17:                                               ; preds = %12
  %18 = icmp eq ptr %13, null
  %19 = getelementptr inbounds i8, ptr %10, i64 8
  br i1 %18, label %20, label %21

20:                                               ; preds = %17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 0, i64 16, i1 false)
  store ptr %10, ptr %3, align 8, !tbaa !12
  store ptr %10, ptr %2, align 8, !tbaa !12
  br label %55

21:                                               ; preds = %17
  store ptr %13, ptr %19, align 8, !tbaa !13
  %22 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr %10, ptr %22, align 8, !tbaa !14
  store ptr %10, ptr %2, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr null, ptr %23, align 8, !tbaa !14
  br label %55

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.059.lcssa82.ph = phi ptr [ poison, %.lr.ph.preheader ], [ %.059.7, %.lr.ph ]
  %.05967.unr = phi ptr [ %13, %.lr.ph.preheader ], [ %.059.7, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.05967.epil = phi ptr [ %.059.epil, %.lr.ph.epil ], [ %.05967.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %24 = getelementptr inbounds i8, ptr %.05967.epil, i64 8
  %.059.epil = load ptr, ptr %24, align 8, !tbaa !12
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !15

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %12
  %.059.lcssa = phi ptr [ %13, %12 ], [ %.059.lcssa82.ph, %._crit_edge.loopexit.unr-lcssa ], [ %.059.epil, %.lr.ph.epil ]
  %25 = getelementptr inbounds i8, ptr %.059.lcssa, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %26, ptr %27, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %.059.lcssa, ptr %28, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %26, i64 16
  store ptr %10, ptr %29, align 8, !tbaa !14
  store ptr %10, ptr %25, align 8, !tbaa !13
  br label %55

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.05967 = phi ptr [ %13, %.lr.ph.preheader.new ], [ %.059.7, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %30 = getelementptr inbounds i8, ptr %.05967, i64 8
  %.059 = load ptr, ptr %30, align 8, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %.059, i64 8
  %.059.1 = load ptr, ptr %31, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %.059.1, i64 8
  %.059.2 = load ptr, ptr %32, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %.059.2, i64 8
  %.059.3 = load ptr, ptr %33, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %.059.3, i64 8
  %.059.4 = load ptr, ptr %34, align 8, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %.059.4, i64 8
  %.059.5 = load ptr, ptr %35, align 8, !tbaa !12
  %36 = getelementptr inbounds i8, ptr %.059.5, i64 8
  %.059.6 = load ptr, ptr %36, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %.059.6, i64 8
  %.059.7 = load ptr, ptr %37, align 8, !tbaa !12
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !17

38:                                               ; preds = %9
  %39 = icmp eq i32 %8, %1
  br i1 %39, label %42, label %.preheader

.preheader:                                       ; preds = %38
  %40 = add nuw nsw i32 %1, 1
  %.05768 = load ptr, ptr %3, align 8, !tbaa !12
  %41 = icmp ugt i32 %8, %40
  br i1 %41, label %.lr.ph71, label %._crit_edge72

42:                                               ; preds = %38
  %43 = load ptr, ptr %3, align 8, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %43, ptr %44, align 8, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %43, i64 8
  store ptr %10, ptr %45, align 8, !tbaa !13
  store ptr %10, ptr %3, align 8, !tbaa !12
  %46 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr null, ptr %46, align 8, !tbaa !13
  br label %55

._crit_edge72:                                    ; preds = %.lr.ph71, %.preheader
  %.057.lcssa = phi ptr [ %.05768, %.preheader ], [ %.057, %.lr.ph71 ]
  %47 = getelementptr inbounds i8, ptr %.057.lcssa, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !14
  %49 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %48, ptr %49, align 8, !tbaa !14
  %50 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %.057.lcssa, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %48, i64 8
  store ptr %10, ptr %51, align 8, !tbaa !13
  store ptr %10, ptr %47, align 8, !tbaa !14
  br label %55

.lr.ph71:                                         ; preds = %.preheader, %.lr.ph71
  %.05770 = phi ptr [ %.057, %.lr.ph71 ], [ %.05768, %.preheader ]
  %.069 = phi i32 [ %53, %.lr.ph71 ], [ %8, %.preheader ]
  %52 = getelementptr inbounds i8, ptr %.05770, i64 16
  %53 = add nsw i32 %.069, -1
  %.057 = load ptr, ptr %52, align 8, !tbaa !12
  %54 = icmp sgt i32 %53, %40
  br i1 %54, label %.lr.ph71, label %._crit_edge72, !llvm.loop !19

55:                                               ; preds = %42, %._crit_edge72, %._crit_edge, %21, %20
  %56 = add nsw i32 %8, 1
  store i32 %56, ptr %4, align 4, !tbaa !5
  br label %60

57:                                               ; preds = %7, %5
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %60

60:                                               ; preds = %57, %55
  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 = { 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 = { inlinehint 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 #2 = { nobuiltin 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { builtin 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++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4Node", !6, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !11, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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