; LLVM IR from Thre4dripper/DSA-Programs :: 06. Circular Doubly Linked Lists/Replacing.ll (Z16replaceFromIndexiiPP4Nodei)

; 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.4 = 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: 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) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z16replaceFromIndexiiPP4Nodei(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = icmp sge i32 %14, 0
  br i1 %15, label %16, label %130

16:                                               ; preds = %4
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = load i32, ptr %8, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %20, label %130

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %21 = load ptr, ptr %7, align 8, !tbaa !9
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.Node, ptr %22, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  store ptr %24, ptr %10, align 8, !tbaa !9
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %20
  %28 = load ptr, ptr %10, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.Node, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !13
  store i32 %30, ptr %9, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = load ptr, ptr %10, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.Node, ptr %32, i32 0, i32 0
  store i32 %31, ptr %33, align 8, !tbaa !13
  br label %129

34:                                               ; preds = %20
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = icmp eq i32 %35, %37
  br i1 %38, label %39, label %69

39:                                               ; preds = %34
  %40 = load ptr, ptr %7, align 8, !tbaa !9
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.Node, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.Node, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %7, align 8, !tbaa !9
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.Node, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = icmp eq ptr %45, %49
  br i1 %50, label %51, label %58

51:                                               ; preds = %39
  %52 = load ptr, ptr %10, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.Node, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !13
  store i32 %54, ptr %9, align 4, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.Node, ptr %56, i32 0, i32 0
  store i32 %55, ptr %57, align 8, !tbaa !13
  br label %68

58:                                               ; preds = %39
  %59 = load ptr, ptr %10, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.Node, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  store ptr %61, ptr %10, align 8, !tbaa !9
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.Node, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !13
  store i32 %64, ptr %9, align 4, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.Node, ptr %66, i32 0, i32 0
  store i32 %65, ptr %67, align 8, !tbaa !13
  br label %68

68:                                               ; preds = %58, %51
  br label %128

69:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.Node, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  store ptr %73, ptr %11, align 8, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sdiv i32 %75, 2
  %77 = icmp sle i32 %74, %76
  br i1 %77, label %78, label %102

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %89, %78
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = icmp slt i32 %80, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %92

85:                                               ; preds = %79
  %86 = load ptr, ptr %11, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.Node, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  store ptr %88, ptr %11, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %85
  %90 = load i32, ptr %12, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %12, align 4, !tbaa !5
  br label %79, !llvm.loop !15

92:                                               ; preds = %84
  %93 = load ptr, ptr %11, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.Node, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  store ptr %95, ptr %10, align 8, !tbaa !9
  %96 = load ptr, ptr %10, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.Node, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !13
  store i32 %98, ptr %9, align 4, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.Node, ptr %100, i32 0, i32 0
  store i32 %99, ptr %101, align 8, !tbaa !13
  br label %127

102:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %103 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %103, ptr %13, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %114, %102
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  %108 = icmp sgt i32 %105, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %117

110:                                              ; preds = %104
  %111 = load ptr, ptr %11, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.Node, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !14
  store ptr %113, ptr %11, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %110
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = add nsw i32 %115, -1
  store i32 %116, ptr %13, align 4, !tbaa !5
  br label %104, !llvm.loop !17

117:                                              ; preds = %109
  %118 = load ptr, ptr %11, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.Node, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !14
  store ptr %120, ptr %10, align 8, !tbaa !9
  %121 = load ptr, ptr %10, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.Node, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 8, !tbaa !13
  store i32 %123, ptr %9, align 4, !tbaa !5
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = load ptr, ptr %10, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.Node, ptr %125, i32 0, i32 0
  store i32 %124, ptr %126, align 8, !tbaa !13
  br label %127

127:                                              ; preds = %117, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %128

128:                                              ; preds = %127, %68
  br label %129

129:                                              ; preds = %128, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %133

130:                                              ; preds = %16, %4
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %133

133:                                              ; preds = %130, %129
  %134 = load i32, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret i32 %134
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS4Node", !6, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !6, i64 0}
!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.4 = external hidden unnamed_addr constant [14 x i8], align 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 #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z16replaceFromIndexiiPP4Nodei(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = icmp sgt i32 %1, -1
  %6 = icmp slt i32 %1, %3
  %or.cond = and i1 %5, %6
  br i1 %or.cond, label %7, label %74

7:                                                ; preds = %4
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp eq i32 %1, 0
  br i1 %11, label %78, label %12

12:                                               ; preds = %7
  %13 = add nsw i32 %3, -1
  %14 = icmp eq i32 %13, %1
  br i1 %14, label %15, label %21

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %10, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = icmp eq ptr %17, %10
  br i1 %18, label %78, label %19

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %10, i64 16
  br label %.sink.split

21:                                               ; preds = %12
  %22 = lshr i32 %3, 1
  %.not = icmp ult i32 %22, %1
  br i1 %.not, label %.preheader, label %.preheader47

.preheader47:                                     ; preds = %21
  %.not58 = icmp eq i32 %1, 1
  br i1 %.not58, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader47
  %23 = add nsw i32 %1, -2
  %24 = add nsw i32 %1, -1
  %xtraiter = and i32 %24, 7
  %25 = icmp ult i32 %23, 7
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

.preheader:                                       ; preds = %21
  %26 = add nuw nsw i32 %1, 1
  %27 = icmp slt i32 %26, %3
  br i1 %27, label %.lr.ph52.preheader, label %._crit_edge53

.lr.ph52.preheader:                               ; preds = %.preheader
  %28 = xor i32 %1, -1
  %29 = add i32 %28, %3
  %30 = add i32 %3, -2
  %31 = sub i32 %30, %1
  %xtraiter62 = and i32 %29, 7
  %lcmp.mod63.not = icmp eq i32 %xtraiter62, 0
  br i1 %lcmp.mod63.not, label %.lr.ph52.prol.loopexit, label %.lr.ph52.prol

.lr.ph52.prol:                                    ; preds = %.lr.ph52.preheader, %.lr.ph52.prol
  %.051.prol = phi i32 [ %34, %.lr.ph52.prol ], [ %3, %.lr.ph52.preheader ]
  %.150.prol = phi ptr [ %33, %.lr.ph52.prol ], [ %10, %.lr.ph52.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph52.prol ], [ 0, %.lr.ph52.preheader ]
  %32 = getelementptr inbounds i8, ptr %.150.prol, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %34 = add nsw i32 %.051.prol, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter62
  br i1 %prol.iter.cmp.not, label %.lr.ph52.prol.loopexit, label %.lr.ph52.prol, !llvm.loop !13

.lr.ph52.prol.loopexit:                           ; preds = %.lr.ph52.prol, %.lr.ph52.preheader
  %.051.unr = phi i32 [ %3, %.lr.ph52.preheader ], [ %34, %.lr.ph52.prol ]
  %.150.unr = phi ptr [ %10, %.lr.ph52.preheader ], [ %33, %.lr.ph52.prol ]
  %.lcssa.unr = phi ptr [ poison, %.lr.ph52.preheader ], [ %33, %.lr.ph52.prol ]
  %35 = icmp ult i32 %31, 7
  br i1 %35, label %._crit_edge53, label %.lr.ph52

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa60.ph = phi ptr [ poison, %.lr.ph.preheader ], [ %54, %.lr.ph ]
  %.04048.unr = phi ptr [ %10, %.lr.ph.preheader ], [ %54, %.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
  %.04048.epil = phi ptr [ %37, %.lr.ph.epil ], [ %.04048.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %36 = getelementptr inbounds i8, ptr %.04048.epil, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %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, %.preheader47
  %.040.lcssa = phi ptr [ %10, %.preheader47 ], [ %.lcssa60.ph, %._crit_edge.loopexit.unr-lcssa ], [ %37, %.lr.ph.epil ]
  %38 = getelementptr inbounds i8, ptr %.040.lcssa, i64 8
  br label %.sink.split

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.04048 = phi ptr [ %10, %.lr.ph.preheader.new ], [ %54, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %39 = getelementptr inbounds i8, ptr %.04048, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %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 !16

._crit_edge53:                                    ; preds = %.lr.ph52.prol.loopexit, %.lr.ph52, %.preheader
  %.1.lcssa = phi ptr [ %10, %.preheader ], [ %.lcssa.unr, %.lr.ph52.prol.loopexit ], [ %71, %.lr.ph52 ]
  %55 = getelementptr inbounds i8, ptr %.1.lcssa, i64 16
  br label %.sink.split

.lr.ph52:                                         ; preds = %.lr.ph52.prol.loopexit, %.lr.ph52
  %.051 = phi i32 [ %72, %.lr.ph52 ], [ %.051.unr, %.lr.ph52.prol.loopexit ]
  %.150 = phi ptr [ %71, %.lr.ph52 ], [ %.150.unr, %.lr.ph52.prol.loopexit ]
  %56 = getelementptr inbounds i8, ptr %.150, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !12
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !12
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %61 = load ptr, ptr %60, align 8, !tbaa !12
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !12
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %65 = load ptr, ptr %64, align 8, !tbaa !12
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !12
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !12
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %71 = load ptr, ptr %70, align 8, !tbaa !12
  %72 = add nsw i32 %.051, -8
  %73 = icmp sgt i32 %72, %26
  br i1 %73, label %.lr.ph52, label %._crit_edge53, !llvm.loop !18

74:                                               ; preds = %4
  %75 = 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.4)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  unreachable

.sink.split:                                      ; preds = %._crit_edge, %._crit_edge53, %19
  %.sink = phi ptr [ %20, %19 ], [ %55, %._crit_edge53 ], [ %38, %._crit_edge ]
  %77 = load ptr, ptr %.sink, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %.sink.split, %15, %7
  %.sink57 = phi ptr [ %10, %7 ], [ %10, %15 ], [ %77, %.sink.split ]
  %79 = load i32, ptr %.sink57, align 8, !tbaa !19
  store i32 %0, ptr %.sink57, align 8, !tbaa !19
  ret i32 %79
}

attributes #0 = { 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 #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" }

!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++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS4Node", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!10, !11, i64 0}


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