; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1097. Deduplication on a Linked List (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, i32, i32 }

@node = external dso_local global [100000 x %struct.NODE], align 16
@exist = external dso_local global [100000 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4cmp14NODES_(i64, i64, i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %33, %0
  %13 = load i32, ptr %7, align 4, !tbaa !5
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %36

17:                                               ; preds = %12
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %6)
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %20
  %22 = getelementptr inbounds %struct.NODE, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %24
  %26 = getelementptr inbounds %struct.NODE, ptr %25, i32 0, i32 2
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22, ptr noundef %26)
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %30
  %32 = getelementptr inbounds %struct.NODE, ptr %31, i32 0, i32 0
  store i32 %28, ptr %32, align 16, !tbaa !9
  br label %33

33:                                               ; preds = %17
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %7, align 4, !tbaa !5
  br label %12, !llvm.loop !11

36:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %37 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %37, ptr %8, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %81, %36
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = icmp ne i32 %39, -1
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %87

42:                                               ; preds = %38
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.NODE, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = call i32 @llvm.abs.i32(i32 %47, i1 true)
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !14, !range !16, !noundef !17
  %52 = trunc i8 %51 to i1
  %53 = zext i1 %52 to i32
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %71

55:                                               ; preds = %42
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.NODE, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = call i32 @llvm.abs.i32(i32 %60, i1 true)
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %62
  store i8 1, ptr %63, align 1, !tbaa !14
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %66
  %68 = getelementptr inbounds %struct.NODE, ptr %67, i32 0, i32 3
  store i32 %64, ptr %68, align 4, !tbaa !18
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %4, align 4, !tbaa !5
  br label %80

71:                                               ; preds = %42
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = add nsw i32 100000, %72
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.NODE, ptr %76, i32 0, i32 3
  store i32 %73, ptr %77, align 4, !tbaa !18
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %5, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %71, %55
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %83
  %85 = getelementptr inbounds %struct.NODE, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 8, !tbaa !19
  store i32 %86, ptr %8, align 4, !tbaa !5
  br label %38, !llvm.loop !20

87:                                               ; preds = %41
  call void @_ZSt4sortIP4NODEPFiS0_S0_EEvT_S4_T0_(ptr noundef @node, ptr noundef getelementptr inbounds (%struct.NODE, ptr @node, i64 100000), ptr noundef @_Z4cmp14NODES_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = add nsw i32 %88, %89
  store i32 %90, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %137, %87
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %91
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = sub nsw i32 %98, 1
  %100 = icmp ne i32 %97, %99
  br i1 %100, label %101, label %124

101:                                              ; preds = %96
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = icmp ne i32 %102, %104
  br i1 %105, label %106, label %124

106:                                              ; preds = %101
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.NODE, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 16, !tbaa !9
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %113
  %115 = getelementptr inbounds %struct.NODE, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 4, !tbaa !13
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.NODE, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 16, !tbaa !9
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %111, i32 noundef %116, i32 noundef %122)
  br label %136

124:                                              ; preds = %101, %96
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.NODE, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 16, !tbaa !9
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %131
  %133 = getelementptr inbounds %struct.NODE, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 4, !tbaa !13
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %129, i32 noundef %134)
  br label %136

136:                                              ; preds = %124, %106
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %10, align 4, !tbaa !5
  br label %91, !llvm.loop !21

140:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NODEPFiS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) #5

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4NODE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !6, i64 12}
!19 = !{!10, !6, i64 8}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.NODE = type { i32, i32, i32, i32 }

@node = external dso_local global [100000 x %struct.NODE], align 16
@exist = external dso_local local_unnamed_addr global [100000 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4cmp14NODES_(i64, i64, i64, i64) #0

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

.preheader:                                       ; preds = %.lr.ph, %0
  %.02735 = load i32, ptr %1, align 4, !tbaa !5
  %.not36 = icmp eq i32 %.02735, -1
  br i1 %.not36, label %._crit_edge, label %.lr.ph40

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

._crit_edge:                                      ; preds = %40, %.preheader
  %.029.lcssa = phi i32 [ 0, %.preheader ], [ %.130, %40 ]
  %.026.lcssa = phi i32 [ 0, %.preheader ], [ %.1, %40 ]
  call void @_ZSt4sortIP4NODEPFiS0_S0_EEvT_S4_T0_(ptr noundef nonnull @node, ptr noundef nonnull getelementptr inbounds (i8, ptr @node, i64 1600000), ptr noundef nonnull @_Z4cmp14NODES_)
  %20 = add nsw i32 %.026.lcssa, %.029.lcssa
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph44, label %._crit_edge45

.lr.ph44:                                         ; preds = %._crit_edge
  %22 = add nsw i32 %.026.lcssa, -1
  %23 = add nsw i32 %20, -1
  %24 = zext nneg i32 %23 to i64
  %25 = zext i32 %22 to i64
  %wide.trip.count = zext nneg i32 %20 to i64
  br label %43

.lr.ph40:                                         ; preds = %.preheader, %40
  %.02739 = phi i32 [ %.027, %40 ], [ %.02735, %.preheader ]
  %.02638 = phi i32 [ %.1, %40 ], [ 0, %.preheader ]
  %.02937 = phi i32 [ %.130, %40 ], [ 0, %.preheader ]
  %26 = sext i32 %.02739 to i64
  %27 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %26
  %28 = getelementptr inbounds i8, ptr %27, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = call i32 @llvm.abs.i32(i32 %29, i1 true)
  %31 = zext nneg i32 %30 to i64
  %32 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !14, !range !16, !noundef !17
  %34 = icmp eq i8 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %.lr.ph40
  store i8 1, ptr %32, align 1, !tbaa !14
  %36 = add nsw i32 %.02638, 1
  br label %40

37:                                               ; preds = %.lr.ph40
  %38 = add nsw i32 %.02937, 100000
  %39 = add nsw i32 %.02937, 1
  br label %40

40:                                               ; preds = %35, %37
  %.sink = phi i32 [ %.02638, %35 ], [ %38, %37 ]
  %.130 = phi i32 [ %.02937, %35 ], [ %39, %37 ]
  %.1 = phi i32 [ %36, %35 ], [ %.02638, %37 ]
  %41 = getelementptr inbounds i8, ptr %27, i64 12
  store i32 %.sink, ptr %41, align 4
  %42 = getelementptr inbounds i8, ptr %27, i64 8
  %.027 = load i32, ptr %42, align 8, !tbaa !5
  %.not = icmp eq i32 %.027, -1
  br i1 %.not, label %._crit_edge, label %.lr.ph40, !llvm.loop !18

._crit_edge45:                                    ; preds = %55, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

43:                                               ; preds = %.lr.ph44, %55
  %indvars.iv = phi i64 [ 0, %.lr.ph44 ], [ %indvars.iv.next.pre-phi, %55 ]
  %.not32 = icmp eq i64 %indvars.iv, %25
  %.not33 = icmp eq i64 %indvars.iv, %24
  %or.cond = select i1 %.not32, i1 true, i1 %.not33
  %44 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv
  %45 = load i32, ptr %44, align 16, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %44, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !13
  br i1 %or.cond, label %53, label %48

48:                                               ; preds = %43
  %49 = add nuw nsw i64 %indvars.iv, 1
  %50 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %49
  %51 = load i32, ptr %50, align 16, !tbaa !9
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %45, i32 noundef %47, i32 noundef %51)
  br label %55

53:                                               ; preds = %43
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %45, i32 noundef %47)
  %.pre = add nuw nsw i64 %indvars.iv, 1
  br label %55

55:                                               ; preds = %48, %53
  %indvars.iv.next.pre-phi = phi i64 [ %49, %48 ], [ %.pre, %53 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next.pre-phi, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge45, label %43, !llvm.loop !19
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NODEPFiS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4NODE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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