; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/数据结构 (主席树)

; 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.ZXTree = type { [2500250 x %"struct.ZXTree::node"], i32, i32, [100010 x i32], [100010 x i32] }
%"struct.ZXTree::node" = type { i32, i32, i32 }

@zxtree = external dso_local global %struct.ZXTree, align 4
@A = external dso_local global [100000 x i32], align 16
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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 i8, align 1
  store i32 0, ptr %1, align 4
  %9 = load ptr, ptr @stdin, align 8, !tbaa !5
  %10 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %9)
  %11 = load ptr, ptr @stdout, align 8, !tbaa !5
  %12 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %11)
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef @n, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %24, %0
  %15 = load i32, ptr %2, align 4, !tbaa !9
  %16 = load i32, ptr @n, align 4, !tbaa !9
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100000 x i32], ptr @A, i64 0, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !9
  br label %14, !llvm.loop !11

27:                                               ; preds = %18
  %28 = load i32, ptr @n, align 4, !tbaa !9
  call void @_ZN6ZXTree4initEPii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, ptr noundef @A, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %95, %27
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = load i32, ptr @q, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  %36 = load i32, ptr %4, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %44

38:                                               ; preds = %34
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = call noundef i32 @_ZN6ZXTree3preEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %39, i32 noundef %40, i32 noundef %41)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %42)
  br label %94

44:                                               ; preds = %34
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %53

47:                                               ; preds = %44
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = call noundef i32 @_ZN6ZXTree4nextEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %48, i32 noundef %49, i32 noundef %50)
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %51)
  br label %93

53:                                               ; preds = %44
  %54 = load i32, ptr %4, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 2
  br i1 %55, label %56, label %62

56:                                               ; preds = %53
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = call noundef i32 @_ZN6ZXTree3kthEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %57, i32 noundef %58, i32 noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %60)
  br label %92

62:                                               ; preds = %53
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 3
  br i1 %64, label %65, label %71

65:                                               ; preds = %62
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = call noundef i32 @_ZN6ZXTree3askEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %66, i32 noundef %67, i32 noundef %68)
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %69)
  br label %91

71:                                               ; preds = %62
  %72 = load i32, ptr %4, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 4
  br i1 %73, label %74, label %80

74:                                               ; preds = %71
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = call noundef i32 @_ZN6ZXTree5countEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %75, i32 noundef %76, i32 noundef %77)
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %78)
  br label %90

80:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = call noundef zeroext i1 @_ZN6ZXTree4findEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %81, i32 noundef %82, i32 noundef %83)
  %85 = zext i1 %84 to i8
  store i8 %85, ptr %8, align 1, !tbaa !13
  %86 = load i8, ptr %8, align 1, !tbaa !13, !range !15, !noundef !16
  %87 = trunc i8 %86 to i1
  %88 = zext i1 %87 to i32
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %88)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %90

90:                                               ; preds = %80, %74
  br label %91

91:                                               ; preds = %90, %65
  br label %92

92:                                               ; preds = %91, %56
  br label %93

93:                                               ; preds = %92, %47
  br label %94

94:                                               ; preds = %93, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %3, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %3, align 4, !tbaa !9
  br label %29, !llvm.loop !17

98:                                               ; preds = %33
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ZXTree4initEPii(ptr noundef nonnull align 4 dereferenceable(30803088), ptr noundef, i32 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree3preEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree4nextEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6ZXTree3kthEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree3askEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree5countEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6ZXTree4findEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) #3 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 = { "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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !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.ZXTree = type { [2500250 x %"struct.ZXTree::node"], i32, i32, [100010 x i32], [100010 x i32] }
%"struct.ZXTree::node" = type { i32, i32, i32 }

@zxtree = external dso_local global %struct.ZXTree, align 4
@A = external dso_local global [100000 x i32], align 16
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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 = load ptr, ptr @stdin, align 8, !tbaa !5
  %6 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %5)
  %7 = load ptr, ptr @stdout, align 8, !tbaa !5
  %8 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %7)
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @n, ptr noundef nonnull @q)
  %10 = load i32, ptr @n, align 4, !tbaa !9
  %.not9 = icmp slt i32 %10, 1
  br i1 %.not9, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i32 [ %10, %0 ], [ %15, %.lr.ph ]
  tail call void @_ZN6ZXTree4initEPii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, ptr noundef nonnull @A, i32 noundef %.lcssa)
  %11 = load i32, ptr @q, align 4, !tbaa !9
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph13, label %._crit_edge14

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %13 = getelementptr inbounds [100000 x i32], ptr @A, i64 0, i64 %indvars.iv
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %.not.not = icmp slt i64 %indvars.iv, %16
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge14:                                    ; preds = %35, %._crit_edge
  ret i32 0

.lr.ph13:                                         ; preds = %._crit_edge, %35
  %.0611 = phi i32 [ %37, %35 ], [ 0, %._crit_edge ]
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %18 = load i32, ptr %1, align 4, !tbaa !9
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = load i32, ptr %4, align 4, !tbaa !9
  switch i32 %18, label %32 [
    i32 0, label %22
    i32 1, label %24
    i32 2, label %26
    i32 3, label %28
    i32 4, label %30
  ]

22:                                               ; preds = %.lr.ph13
  %23 = call noundef i32 @_ZN6ZXTree3preEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  br label %35

24:                                               ; preds = %.lr.ph13
  %25 = call noundef i32 @_ZN6ZXTree4nextEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  br label %35

26:                                               ; preds = %.lr.ph13
  %27 = call noundef i32 @_ZN6ZXTree3kthEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  br label %35

28:                                               ; preds = %.lr.ph13
  %29 = call noundef i32 @_ZN6ZXTree3askEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  br label %35

30:                                               ; preds = %.lr.ph13
  %31 = call noundef i32 @_ZN6ZXTree5countEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  br label %35

32:                                               ; preds = %.lr.ph13
  %33 = call noundef zeroext i1 @_ZN6ZXTree4findEiii(ptr noundef nonnull align 4 dereferenceable(30803088) @zxtree, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  %34 = zext i1 %33 to i32
  br label %35

35:                                               ; preds = %24, %28, %32, %30, %26, %22
  %.sink = phi i32 [ %25, %24 ], [ %29, %28 ], [ %34, %32 ], [ %31, %30 ], [ %27, %26 ], [ %23, %22 ]
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.sink)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  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
  %37 = add nuw nsw i32 %.0611, 1
  %38 = load i32, ptr @q, align 4, !tbaa !9
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %.lr.ph13, label %._crit_edge14, !llvm.loop !13
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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.start.p0(i64 immarg, ptr nocapture) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ZXTree4initEPii(ptr noundef nonnull align 4 dereferenceable(30803088), ptr noundef, i32 noundef) 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 uwtable
declare dso_local noundef i32 @_ZN6ZXTree3preEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree4nextEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6ZXTree3kthEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree3askEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6ZXTree5countEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6ZXTree4findEiii(ptr noundef nonnull align 4 dereferenceable(30803088), i32 noundef, i32 noundef, i32 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 = { "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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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