; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/字符串算法/后缀自动机.ll (Z7topsortv)

; 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"

@par = external dso_local global [210000 x i32], align 16
@len = external dso_local global [210000 x i32], align 16
@cur = external dso_local global i32, align 4
@cnt = external dso_local global [210000 x i32], align 16
@arr = external dso_local global [210000 x i32], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z7topsortv() #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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %15, %0
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = load i32, ptr @cur, align 4, !tbaa !5
  %9 = icmp slt i32 %7, %8
  br i1 %9, label %11, label %10

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

11:                                               ; preds = %6
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %13
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %11
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr %1, align 4, !tbaa !5
  br label %6, !llvm.loop !9

18:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %33, %18
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr @cur, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %36

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %33

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

36:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %53, %36
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = load i32, ptr @cur, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %56

42:                                               ; preds = %37
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, %47
  store i32 %52, ptr %50, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %42
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %3, align 4, !tbaa !5
  br label %37, !llvm.loop !12

56:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %57 = load i32, ptr @cur, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %75, %56
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = icmp sge i32 %60, 1
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %78

63:                                               ; preds = %59
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %70, align 4, !tbaa !5
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %73
  store i32 %64, ptr %74, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %63
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %4, align 4, !tbaa !5
  br label %59, !llvm.loop !13

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

79:                                               ; preds = %107, %78
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = load i32, ptr @cur, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

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

84:                                               ; preds = %79
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [210000 x i32], ptr @par, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp eq i32 %92, %96
  br i1 %97, label %98, label %106

98:                                               ; preds = %84
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %101
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %104
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %102, ptr noundef nonnull align 4 dereferenceable(4) %105) #3
  br label %106

106:                                              ; preds = %98, %84
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %5, align 4, !tbaa !5
  br label %79, !llvm.loop !14

110:                                              ; preds = %83
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@par = external dso_local local_unnamed_addr global [210000 x i32], align 16
@len = external dso_local local_unnamed_addr global [210000 x i32], align 16
@cur = external dso_local local_unnamed_addr global i32, align 4
@cnt = external dso_local local_unnamed_addr global [210000 x i32], align 16
@arr = external dso_local global [210000 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z7topsortv() local_unnamed_addr #0 {
  %1 = load i32, ptr @cur, align 4, !tbaa !5
  %2 = icmp sgt i32 %1, 1
  br i1 %2, label %.lr.ph30.preheader, label %._crit_edge

.lr.ph30.preheader:                               ; preds = %0
  %3 = add nsw i32 %1, -1
  %4 = zext nneg i32 %3 to i64
  %5 = shl nuw nsw i64 %4, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @cnt, i64 4), i8 0, i64 %5, i1 false), !tbaa !5
  %wide.trip.count = zext nneg i32 %1 to i64
  %6 = add nsw i64 %wide.trip.count, -1
  %7 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %6, 3
  %8 = icmp ult i64 %7, 3
  br i1 %8, label %.preheader26.unr-lcssa, label %.lr.ph30.preheader.new

.lr.ph30.preheader.new:                           ; preds = %.lr.ph30.preheader
  %unroll_iter = and i64 %6, -4
  br label %.lr.ph30

.preheader26.unr-lcssa:                           ; preds = %.lr.ph30, %.lr.ph30.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph30.preheader ], [ %indvars.iv.next.3, %.lr.ph30 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader26, label %.lr.ph30.epil

.lr.ph30.epil:                                    ; preds = %.preheader26.unr-lcssa, %.lr.ph30.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph30.epil ], [ %indvars.iv.unr, %.preheader26.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph30.epil ], [ 0, %.preheader26.unr-lcssa ]
  %9 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv.epil
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr %12, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader26, label %.lr.ph30.epil, !llvm.loop !9

.preheader26:                                     ; preds = %.lr.ph30.epil, %.preheader26.unr-lcssa
  br i1 %2, label %.lr.ph32.preheader, label %._crit_edge

.lr.ph32.preheader:                               ; preds = %.preheader26
  %.pre = load i32, ptr @cnt, align 16, !tbaa !5
  %xtraiter51 = and i64 %6, 3
  %15 = icmp ult i64 %7, 3
  br i1 %15, label %.preheader25.unr-lcssa, label %.lr.ph32.preheader.new

.lr.ph32.preheader.new:                           ; preds = %.lr.ph32.preheader
  %unroll_iter54 = and i64 %6, -4
  br label %.lr.ph32

.lr.ph30:                                         ; preds = %.lr.ph30, %.lr.ph30.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph30.preheader.new ], [ %indvars.iv.next.3, %.lr.ph30 ]
  %niter = phi i64 [ 0, %.lr.ph30.preheader.new ], [ %niter.next.3, %.lr.ph30 ]
  %16 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr %19, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv.next
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %25, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %28 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv.next.1
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %34 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv.next.2
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader26.unr-lcssa, label %.lr.ph30, !llvm.loop !11

.preheader25.unr-lcssa:                           ; preds = %.lr.ph32, %.lr.ph32.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph32.preheader ], [ %57, %.lr.ph32 ]
  %indvars.iv39.unr = phi i64 [ 1, %.lr.ph32.preheader ], [ %indvars.iv.next40.3, %.lr.ph32 ]
  %lcmp.mod53.not = icmp eq i64 %xtraiter51, 0
  br i1 %lcmp.mod53.not, label %.preheader25, label %.lr.ph32.epil

.lr.ph32.epil:                                    ; preds = %.preheader25.unr-lcssa, %.lr.ph32.epil
  %40 = phi i32 [ %43, %.lr.ph32.epil ], [ %.unr, %.preheader25.unr-lcssa ]
  %indvars.iv39.epil = phi i64 [ %indvars.iv.next40.epil, %.lr.ph32.epil ], [ %indvars.iv39.unr, %.preheader25.unr-lcssa ]
  %epil.iter52 = phi i64 [ %epil.iter52.next, %.lr.ph32.epil ], [ 0, %.preheader25.unr-lcssa ]
  %41 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %indvars.iv39.epil
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, %40
  store i32 %43, ptr %41, align 4, !tbaa !5
  %indvars.iv.next40.epil = add nuw nsw i64 %indvars.iv39.epil, 1
  %epil.iter52.next = add i64 %epil.iter52, 1
  %epil.iter52.cmp.not = icmp eq i64 %epil.iter52.next, %xtraiter51
  br i1 %epil.iter52.cmp.not, label %.preheader25, label %.lr.ph32.epil, !llvm.loop !13

.preheader25:                                     ; preds = %.lr.ph32.epil, %.preheader25.unr-lcssa
  br i1 %2, label %.lr.ph34.preheader, label %._crit_edge

.lr.ph34.preheader:                               ; preds = %.preheader25
  %44 = zext nneg i32 %1 to i64
  br label %.lr.ph34

.lr.ph32:                                         ; preds = %.lr.ph32, %.lr.ph32.preheader.new
  %45 = phi i32 [ %.pre, %.lr.ph32.preheader.new ], [ %57, %.lr.ph32 ]
  %indvars.iv39 = phi i64 [ 1, %.lr.ph32.preheader.new ], [ %indvars.iv.next40.3, %.lr.ph32 ]
  %niter55 = phi i64 [ 0, %.lr.ph32.preheader.new ], [ %niter55.next.3, %.lr.ph32 ]
  %46 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %indvars.iv39
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, %45
  store i32 %48, ptr %46, align 4, !tbaa !5
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %49 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next40
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %48
  store i32 %51, ptr %49, align 4, !tbaa !5
  %indvars.iv.next40.1 = add nuw nsw i64 %indvars.iv39, 2
  %52 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next40.1
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, %51
  store i32 %54, ptr %52, align 4, !tbaa !5
  %indvars.iv.next40.2 = add nuw nsw i64 %indvars.iv39, 3
  %55 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next40.2
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, %54
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next40.3 = add nuw nsw i64 %indvars.iv39, 4
  %niter55.next.3 = add i64 %niter55, 4
  %niter55.ncmp.3 = icmp eq i64 %niter55.next.3, %unroll_iter54
  br i1 %niter55.ncmp.3, label %.preheader25.unr-lcssa, label %.lr.ph32, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph34
  %.not = icmp eq i32 %1, 2
  br i1 %.not, label %._crit_edge, label %.lr.ph36

.lr.ph34:                                         ; preds = %.lr.ph34.preheader, %.lr.ph34
  %indvars.iv44 = phi i64 [ %44, %.lr.ph34.preheader ], [ %indvars.iv.next45, %.lr.ph34 ]
  %indvars.iv.next45 = add nsw i64 %indvars.iv44, -1
  %58 = getelementptr inbounds [210000 x i32], ptr @len, i64 0, i64 %indvars.iv.next45
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [210000 x i32], ptr @cnt, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = add nsw i32 %62, -1
  store i32 %63, ptr %61, align 4, !tbaa !5
  %64 = sext i32 %62 to i64
  %65 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %64
  %66 = trunc nuw nsw i64 %indvars.iv.next45 to i32
  store i32 %66, ptr %65, align 4, !tbaa !5
  %67 = icmp ugt i64 %indvars.iv44, 2
  br i1 %67, label %.lr.ph34, label %.preheader, !llvm.loop !15

._crit_edge:                                      ; preds = %79, %0, %.preheader26, %.preheader25, %.preheader
  ret void

.lr.ph36:                                         ; preds = %.preheader, %79
  %68 = phi i32 [ %80, %79 ], [ %1, %.preheader ]
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %79 ], [ 2, %.preheader ]
  %69 = add nsw i64 %indvars.iv47, -1
  %70 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [210000 x i32], ptr @par, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = getelementptr inbounds [210000 x i32], ptr @arr, i64 0, i64 %indvars.iv47
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp eq i32 %74, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %.lr.ph36
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %75) #3
  %.pre50 = load i32, ptr @cur, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %.lr.ph36, %78
  %80 = phi i32 [ %68, %.lr.ph36 ], [ %.pre50, %78 ]
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next48, %81
  br i1 %82, label %.lr.ph36, label %._crit_edge, !llvm.loop !16
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { inlinehint 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind }

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

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


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