; LLVM IR from upupming/algorithm :: CCCC-GPLT/L2-002. 链表去重 (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
  %11 = 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
  %12 = 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 %13

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

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

17:                                               ; preds = %13
  %18 = load i32, ptr %7, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %19
  %21 = getelementptr inbounds %struct.NODE, ptr %20, i32 0, i32 3
  store i32 200000, ptr %21, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %7, align 4, !tbaa !5
  br label %13, !llvm.loop !11

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %47, %25
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %6)
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %34
  %36 = getelementptr inbounds %struct.NODE, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %38
  %40 = getelementptr inbounds %struct.NODE, ptr %39, i32 0, i32 2
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36, ptr noundef %40)
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = load i32, ptr %6, 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 0
  store i32 %42, ptr %46, align 16, !tbaa !13
  br label %47

47:                                               ; preds = %31
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %8, align 4, !tbaa !5
  br label %26, !llvm.loop !14

50:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %51 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %51, ptr %9, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %95, %50
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = icmp ne i32 %53, -1
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %101

56:                                               ; preds = %52
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.NODE, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !15
  %62 = call i32 @llvm.abs.i32(i32 %61, i1 true)
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !16, !range !18, !noundef !19
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %85

69:                                               ; preds = %56
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %71
  %73 = getelementptr inbounds %struct.NODE, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !15
  %75 = call i32 @llvm.abs.i32(i32 %74, i1 true)
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %76
  store i8 1, ptr %77, align 1, !tbaa !16
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %80
  %82 = getelementptr inbounds %struct.NODE, ptr %81, i32 0, i32 3
  store i32 %78, ptr %82, align 4, !tbaa !9
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %4, align 4, !tbaa !5
  br label %94

85:                                               ; preds = %56
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = add nsw i32 100000, %86
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.NODE, ptr %90, i32 0, i32 3
  store i32 %87, ptr %91, align 4, !tbaa !9
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %5, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %85, %69
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.NODE, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 8, !tbaa !20
  store i32 %100, ptr %9, align 4, !tbaa !5
  br label %52, !llvm.loop !21

101:                                              ; preds = %55
  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 %10) #6
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = add nsw i32 %102, %103
  store i32 %104, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %151, %101
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %154

110:                                              ; preds = %105
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = load i32, ptr %4, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 1
  %114 = icmp ne i32 %111, %113
  br i1 %114, label %115, label %138

115:                                              ; preds = %110
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = icmp ne i32 %116, %118
  br i1 %119, label %120, label %138

120:                                              ; preds = %115
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.NODE, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 16, !tbaa !13
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.NODE, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !15
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %133
  %135 = getelementptr inbounds %struct.NODE, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 16, !tbaa !13
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %125, i32 noundef %130, i32 noundef %136)
  br label %150

138:                                              ; preds = %115, %110
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %140
  %142 = getelementptr inbounds %struct.NODE, ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 16, !tbaa !13
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %145
  %147 = getelementptr inbounds %struct.NODE, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !15
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %143, i32 noundef %148)
  br label %150

150:                                              ; preds = %138, %120
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %11, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %11, align 4, !tbaa !5
  br label %105, !llvm.loop !22

154:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #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 12}
!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 0}
!14 = distinct !{!14, !12}
!15 = !{!10, !6, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!10, !6, i64 8}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !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)
  br label %7

.preheader38:                                     ; preds = %7
  %5 = load i32, ptr %2, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.preheader

7:                                                ; preds = %7, %0
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next.4, %7 ]
  %8 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv, i32 3
  store i32 200000, ptr %8, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next, i32 3
  store i32 200000, ptr %9, align 4, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %10 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.1, i32 3
  store i32 200000, ptr %10, align 4, !tbaa !9
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %11 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.2, i32 3
  store i32 200000, ptr %11, align 4, !tbaa !9
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %12 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.3, i32 3
  store i32 200000, ptr %12, align 4, !tbaa !9
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 100000
  br i1 %exitcond.not.4, label %.preheader38, label %7, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph, %.preheader38
  %.03041 = load i32, ptr %1, align 4, !tbaa !5
  %.not42 = icmp eq i32 %.03041, -1
  br i1 %.not42, label %._crit_edge, label %.lr.ph46

.lr.ph:                                           ; preds = %.preheader38, %.lr.ph
  %.03140 = phi i32 [ %23, %.lr.ph ], [ 0, %.preheader38 ]
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %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
  %17 = getelementptr inbounds i8, ptr %16, i64 4
  %18 = getelementptr inbounds i8, ptr %16, i64 8
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %17, ptr noundef nonnull %18)
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %21
  store i32 %20, ptr %22, align 16, !tbaa !13
  %23 = add nuw nsw i32 %.03140, 1
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %.lr.ph, label %.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %46, %.preheader
  %.033.lcssa = phi i32 [ 0, %.preheader ], [ %.134, %46 ]
  %.029.lcssa = phi i32 [ 0, %.preheader ], [ %.1, %46 ]
  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_)
  %26 = add nsw i32 %.029.lcssa, %.033.lcssa
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph50, label %._crit_edge51

.lr.ph50:                                         ; preds = %._crit_edge
  %28 = add nsw i32 %.029.lcssa, -1
  %29 = add nsw i32 %26, -1
  %30 = zext nneg i32 %29 to i64
  %31 = zext i32 %28 to i64
  %wide.trip.count = zext nneg i32 %26 to i64
  br label %49

.lr.ph46:                                         ; preds = %.preheader, %46
  %.03045 = phi i32 [ %.030, %46 ], [ %.03041, %.preheader ]
  %.02944 = phi i32 [ %.1, %46 ], [ 0, %.preheader ]
  %.03343 = phi i32 [ %.134, %46 ], [ 0, %.preheader ]
  %32 = sext i32 %.03045 to i64
  %33 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %32
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !15
  %36 = call i32 @llvm.abs.i32(i32 %35, i1 true)
  %37 = zext nneg i32 %36 to i64
  %38 = getelementptr inbounds [100000 x i8], ptr @exist, i64 0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !16, !range !18, !noundef !19
  %40 = icmp eq i8 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %.lr.ph46
  store i8 1, ptr %38, align 1, !tbaa !16
  %42 = add nsw i32 %.02944, 1
  br label %46

43:                                               ; preds = %.lr.ph46
  %44 = add nsw i32 %.03343, 100000
  %45 = add nsw i32 %.03343, 1
  br label %46

46:                                               ; preds = %41, %43
  %.sink = phi i32 [ %.02944, %41 ], [ %44, %43 ]
  %.134 = phi i32 [ %.03343, %41 ], [ %45, %43 ]
  %.1 = phi i32 [ %42, %41 ], [ %.02944, %43 ]
  %47 = getelementptr inbounds i8, ptr %33, i64 12
  store i32 %.sink, ptr %47, align 4
  %48 = getelementptr inbounds i8, ptr %33, i64 8
  %.030 = load i32, ptr %48, align 8, !tbaa !5
  %.not = icmp eq i32 %.030, -1
  br i1 %.not, label %._crit_edge, label %.lr.ph46, !llvm.loop !20

._crit_edge51:                                    ; preds = %61, %._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

49:                                               ; preds = %.lr.ph50, %61
  %indvars.iv53 = phi i64 [ 0, %.lr.ph50 ], [ %indvars.iv.next54.pre-phi, %61 ]
  %.not36 = icmp eq i64 %indvars.iv53, %31
  %.not37 = icmp eq i64 %indvars.iv53, %30
  %or.cond = select i1 %.not36, i1 true, i1 %.not37
  %50 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv53
  %51 = load i32, ptr %50, align 16, !tbaa !13
  %52 = getelementptr inbounds i8, ptr %50, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !15
  br i1 %or.cond, label %59, label %54

54:                                               ; preds = %49
  %55 = add nuw nsw i64 %indvars.iv53, 1
  %56 = getelementptr inbounds [100000 x %struct.NODE], ptr @node, i64 0, i64 %55
  %57 = load i32, ptr %56, align 16, !tbaa !13
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %51, i32 noundef %53, i32 noundef %57)
  br label %61

59:                                               ; preds = %49
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %51, i32 noundef %53)
  %.pre = add nuw nsw i64 %indvars.iv53, 1
  br label %61

61:                                               ; preds = %54, %59
  %indvars.iv.next54.pre-phi = phi i64 [ %55, %54 ], [ %.pre, %59 ]
  %exitcond56.not = icmp eq i64 %indvars.iv.next54.pre-phi, %wide.trip.count
  br i1 %exitcond56.not, label %._crit_edge51, label %49, !llvm.loop !21
}

; 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 12}
!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 0}
!14 = distinct !{!14, !12}
!15 = !{!10, !6, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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