; LLVM IR from upupming/algorithm :: BasicLevel_C++/1075. 链表元素分类(25) (main)

; 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.node = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@list = external dso_local global [100000 x %struct.node], align 16
@v = external dso_local global [3 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

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

14:                                               ; preds = %30, %0
  %15 = load i32, ptr %6, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %5)
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %22
  %24 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %26
  %28 = getelementptr inbounds %struct.node, ptr %27, i32 0, i32 1
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %24, ptr noundef %28)
  br label %30

30:                                               ; preds = %19
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %6, align 4, !tbaa !5
  br label %14, !llvm.loop !9

33:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %34, ptr %7, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %57, %33
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = icmp ne i32 %36, -1
  br i1 %37, label %38, label %63

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %40
  %42 = getelementptr inbounds %struct.node, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !11
  store i32 %43, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %38
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %57

47:                                               ; preds = %38
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp sge i32 %48, 0
  br i1 %49, label %50, label %55

50:                                               ; preds = %47
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([3 x %"class.std::vector"], ptr @v, i64 0, i64 1), ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %56

55:                                               ; preds = %50, %47
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds ([3 x %"class.std::vector"], ptr @v, i64 0, i64 2), ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %56

56:                                               ; preds = %55, %54
  br label %57

57:                                               ; preds = %56, %46
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %59
  %61 = getelementptr inbounds %struct.node, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !13
  store i32 %62, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %35, !llvm.loop !14

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

64:                                               ; preds = %133, %63
  %65 = load i32, ptr %10, align 4, !tbaa !5
  %66 = icmp slt i32 %65, 3
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 7, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %136

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

69:                                               ; preds = %129, %68
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %73
  %75 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #5
  %76 = icmp ult i64 %71, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %69
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %132

78:                                               ; preds = %69
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %101

81:                                               ; preds = %78
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %83
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #5
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %90
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #5
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.node, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !11
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %88, i32 noundef %99)
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %128

101:                                              ; preds = %78
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %103
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #5
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %110
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #5
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [3 x %"class.std::vector"], ptr @v, i64 0, i64 %117
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %120) #5
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %123
  %125 = getelementptr inbounds %struct.node, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 8, !tbaa !11
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %108, i32 noundef %115, i32 noundef %126)
  br label %128

128:                                              ; preds = %101, %81
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !5
  br label %69, !llvm.loop !15

132:                                              ; preds = %77
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %10, align 4, !tbaa !5
  br label %64, !llvm.loop !16

136:                                              ; preds = %67
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %138 = load i32, ptr %1, align 4
  ret i32 %138
}

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

declare i32 @__isoc99_scanf(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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

attributes #0 = { mustprogress norecurse 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 = { 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 #4 = { mustprogress 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4node", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; 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.node = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@list = external dso_local global [100000 x %struct.node], align 16
@v = external dso_local global [3 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %storemerge31 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %storemerge31, ptr %5, align 4, !tbaa !5
  %.not32 = icmp eq i32 %storemerge31, -1
  br i1 %.not32, label %.preheader29, label %.lr.ph35

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02430 = phi i32 [ %15, %.lr.ph ], [ 0, %0 ]
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %4)
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 4
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %15 = add nuw nsw i32 %.02430, 1
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader29:                                     ; preds = %.lr.ph35, %._crit_edge
  %18 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #5
  %.not42 = icmp eq i64 %18, 0
  br i1 %.not42, label %._crit_edge39.thread50, label %27

.lr.ph35:                                         ; preds = %._crit_edge, %.lr.ph35
  %storemerge33 = phi i32 [ %storemerge, %.lr.ph35 ], [ %storemerge31, %._crit_edge ]
  %19 = sext i32 %storemerge33 to i64
  %20 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %19
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = icmp slt i32 %21, 0
  %23 = load i32, ptr %3, align 4
  %.not28 = icmp sgt i32 %21, %23
  %. = select i1 %.not28, ptr getelementptr inbounds (i8, ptr @v, i64 48), ptr getelementptr inbounds (i8, ptr @v, i64 24)
  %.sink = select i1 %22, ptr @v, ptr %.
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %.sink, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %25, i32 1
  %storemerge = load i32, ptr %26, align 4, !tbaa !5
  store i32 %storemerge, ptr %5, align 4, !tbaa !5
  %.not = icmp eq i32 %storemerge, -1
  br i1 %.not, label %.preheader29, label %.lr.ph35, !llvm.loop !13

27:                                               ; preds = %.preheader29
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef 0) #5
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef 0) #5
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %32
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %29, i32 noundef %34)
  %36 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #5
  %37 = icmp ugt i64 %36, 1
  br i1 %37, label %.lr.ph38.peel.next, label %._crit_edge39.thread

._crit_edge39:                                    ; preds = %.lr.ph38.peel.next
  %38 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24)) #5
  %.not42.1 = icmp eq i64 %38, 0
  br i1 %.not42.1, label %._crit_edge39.1, label %.lr.ph38.preheader.1

._crit_edge39.thread50:                           ; preds = %.preheader29
  %39 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24)) #5
  %.not42.152 = icmp eq i64 %39, 0
  br i1 %.not42.152, label %._crit_edge39.1.thread, label %.lr.ph38.preheader.1.thread53

._crit_edge39.thread:                             ; preds = %27
  %40 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24)) #5
  %.not42.149 = icmp eq i64 %40, 0
  br i1 %.not42.149, label %._crit_edge39.1, label %.lr.ph38.preheader.1.thread

.lr.ph38.preheader.1:                             ; preds = %._crit_edge39
  br i1 %.not42, label %.lr.ph38.preheader.1.thread53, label %.lr.ph38.preheader.1.thread

.lr.ph38.preheader.1.thread:                      ; preds = %._crit_edge39.thread, %.lr.ph38.preheader.1
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef 0) #5
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef 0) #5
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef 0) #5
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %47
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %42, i32 noundef %44, i32 noundef %49)
  br label %59

.lr.ph38.preheader.1.thread53:                    ; preds = %._crit_edge39.thread50, %.lr.ph38.preheader.1
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef 0) #5
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef 0) #5
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %55
  %57 = load i32, ptr %56, align 8, !tbaa !11
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %52, i32 noundef %57)
  br label %59

59:                                               ; preds = %.lr.ph38.preheader.1.thread53, %.lr.ph38.preheader.1.thread
  %60 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24)) #5
  %61 = icmp ugt i64 %60, 1
  br i1 %61, label %.lr.ph38.peel.next.1, label %._crit_edge39.1

.lr.ph38.peel.next.1:                             ; preds = %59, %.lr.ph38.peel.next.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %.lr.ph38.peel.next.1 ], [ 1, %59 ]
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef %indvars.iv.1) #5
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef %indvars.iv.1) #5
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24), i64 noundef %indvars.iv.1) #5
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %68
  %70 = load i32, ptr %69, align 8, !tbaa !11
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %63, i32 noundef %65, i32 noundef %70)
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %72 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 24)) #5
  %73 = icmp ugt i64 %72, %indvars.iv.next.1
  br i1 %73, label %.lr.ph38.peel.next.1, label %._crit_edge39.1, !llvm.loop !14

._crit_edge39.1:                                  ; preds = %.lr.ph38.peel.next.1, %59, %._crit_edge39.thread, %._crit_edge39
  %74 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48)) #5
  %.not42.2 = icmp eq i64 %74, 0
  br i1 %.not42.2, label %._crit_edge39.2, label %.lr.ph38.preheader.2

._crit_edge39.1.thread:                           ; preds = %._crit_edge39.thread50
  %75 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48)) #5
  %.not42.255 = icmp eq i64 %75, 0
  br i1 %.not42.255, label %._crit_edge39.2, label %86

.lr.ph38.preheader.2:                             ; preds = %._crit_edge39.1
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef 0) #5
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef 0) #5
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef 0) #5
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %82
  %84 = load i32, ptr %83, align 8, !tbaa !11
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %77, i32 noundef %79, i32 noundef %84)
  br label %95

86:                                               ; preds = %._crit_edge39.1.thread
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef 0) #5
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef 0) #5
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %91
  %93 = load i32, ptr %92, align 8, !tbaa !11
  %94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %88, i32 noundef %93)
  br label %95

95:                                               ; preds = %86, %.lr.ph38.preheader.2
  %96 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48)) #5
  %97 = icmp ugt i64 %96, 1
  br i1 %97, label %.lr.ph38.peel.next.2, label %._crit_edge39.2

.lr.ph38.peel.next.2:                             ; preds = %95, %.lr.ph38.peel.next.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %.lr.ph38.peel.next.2 ], [ 1, %95 ]
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef %indvars.iv.2) #5
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef %indvars.iv.2) #5
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48), i64 noundef %indvars.iv.2) #5
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %104
  %106 = load i32, ptr %105, align 8, !tbaa !11
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %99, i32 noundef %101, i32 noundef %106)
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %108 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @v, i64 48)) #5
  %109 = icmp ugt i64 %108, %indvars.iv.next.2
  br i1 %109, label %.lr.ph38.peel.next.2, label %._crit_edge39.2, !llvm.loop !14

._crit_edge39.2:                                  ; preds = %.lr.ph38.peel.next.2, %95, %._crit_edge39.1.thread, %._crit_edge39.1
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.lr.ph38.peel.next:                               ; preds = %27, %.lr.ph38.peel.next
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph38.peel.next ], [ 1, %27 ]
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #5
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #5
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #5
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100000 x %struct.node], ptr @list, i64 0, i64 %117
  %119 = load i32, ptr %118, align 8, !tbaa !11
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %112, i32 noundef %114, i32 noundef %119)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %121 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #5
  %122 = icmp ugt i64 %121, %indvars.iv.next
  br i1 %122, label %.lr.ph38.peel.next, label %._crit_edge39, !llvm.loop !14
}

; 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 @__isoc99_scanf(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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress norecurse 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 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 #4 = { mustprogress 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4node", !6, i64 0, !6, i64 4}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15}
!15 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass