; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ/1233.ll (Z4primv)

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

@n = external dso_local global i32, align 4
@dist = external dso_local global [110 x i32], align 16
@map = external dso_local global [110 x [110 x i32]], align 16
@isvisited = external dso_local global [110 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z4primv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @isvisited, i8 0, i64 440, i1 false)
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %18, %0
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sle i32 %7, %8
  br i1 %9, label %10, label %21

10:                                               ; preds = %6
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [110 x i32], ptr getelementptr inbounds ([110 x [110 x i32]], ptr @map, i64 0, i64 1), i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %16
  store i32 %14, ptr %17, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %10
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %1, align 4, !tbaa !5
  br label %6, !llvm.loop !9

21:                                               ; preds = %6
  store i32 1, ptr getelementptr inbounds ([110 x i32], ptr @isvisited, i64 0, i64 1), align 4, !tbaa !5
  store i32 65535, ptr getelementptr inbounds ([110 x i32], ptr @dist, i64 0, i64 1), align 4, !tbaa !5
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %103, %21
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %106

26:                                               ; preds = %22
  store i32 65535, ptr %3, align 4, !tbaa !5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %51, %26
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %31, label %54

31:                                               ; preds = %27
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %50, label %37

37:                                               ; preds = %31
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %50

44:                                               ; preds = %37
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr %3, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %49, ptr %4, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %44, %37, %31
  br label %51

51:                                               ; preds = %50
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !11

54:                                               ; preds = %27
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = add nsw i32 %59, %58
  store i32 %60, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %62
  store i32 1, ptr %63, align 4, !tbaa !5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %99, %54
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %68, label %102

68:                                               ; preds = %64
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %98, label %74

74:                                               ; preds = %68
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [110 x [110 x i32]], ptr @map, i64 0, i64 %80
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [110 x i32], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp sgt i32 %78, %85
  br i1 %86, label %87, label %98

87:                                               ; preds = %74
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [110 x [110 x i32]], ptr @map, i64 0, i64 %89
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [110 x i32], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %96
  store i32 %94, ptr %97, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %87, %74, %68
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %2, align 4, !tbaa !5
  br label %64, !llvm.loop !12

102:                                              ; preds = %64
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %1, align 4, !tbaa !5
  br label %22, !llvm.loop !13

106:                                              ; preds = %22
  %107 = load i32, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret i32 %107
}

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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"

@n = external dso_local local_unnamed_addr global i32, align 4
@dist = external dso_local local_unnamed_addr global [110 x i32], align 16
@map = external dso_local local_unnamed_addr global [110 x [110 x i32]], align 16
@isvisited = external dso_local local_unnamed_addr global [110 x i32], align 16

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local noundef i32 @_Z4primv() local_unnamed_addr #0 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(440) @isvisited, i8 0, i64 440, i1 false)
  %1 = load i32, ptr @n, align 4, !tbaa !5
  %.not40 = icmp slt i32 %1, 1
  br i1 %.not40, label %._crit_edge.thread, label %._crit_edge

._crit_edge.thread:                               ; preds = %0
  store i32 1, ptr getelementptr inbounds (i8, ptr @isvisited, i64 4), align 4, !tbaa !5
  store i32 65535, ptr getelementptr inbounds (i8, ptr @dist, i64 4), align 4, !tbaa !5
  br label %._crit_edge57

._crit_edge:                                      ; preds = %0
  %2 = zext nneg i32 %1 to i64
  %3 = shl nuw nsw i64 %2, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @dist, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @map, i64 444), i64 %3, i1 false), !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @isvisited, i64 4), align 4, !tbaa !5
  store i32 65535, ptr getelementptr inbounds (i8, ptr @dist, i64 4), align 4, !tbaa !5
  %.not = icmp eq i32 %1, 1
  br i1 %.not, label %._crit_edge57, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge
  %4 = zext nneg i32 %1 to i64
  %5 = zext nneg i32 %1 to i64
  %6 = add nsw i64 %5, -1
  %xtraiter = and i64 %4, 1
  %7 = icmp eq i64 %6, 0
  %unroll_iter = and i64 %4, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter77 = and i64 %4, 1
  %8 = icmp eq i64 %6, 0
  %unroll_iter79 = and i64 %4, 2147483646
  %lcmp.mod78.not = icmp eq i64 %xtraiter77, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge53
  %.056 = phi i32 [ %65, %._crit_edge53 ], [ 0, %.preheader.preheader ]
  %.02655 = phi i32 [ %.2.lcssa, %._crit_edge53 ], [ undef, %.preheader.preheader ]
  %.13254 = phi i32 [ %66, %._crit_edge53 ], [ 1, %.preheader.preheader ]
  br i1 %7, label %._crit_edge47.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader, %24
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %24 ], [ 1, %.preheader ]
  %.145 = phi i32 [ %.2.1, %24 ], [ %.02655, %.preheader ]
  %.02744 = phi i32 [ %.128.1, %24 ], [ 65535, %.preheader ]
  %niter = phi i64 [ %niter.next.1, %24 ], [ 0, %.preheader ]
  %9 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %.not38 = icmp eq i32 %10, 0
  br i1 %.not38, label %11, label %16

11:                                               ; preds = %.preheader.new
  %12 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp slt i32 %13, %.02744
  %spec.select = tail call i32 @llvm.smin.i32(i32 %13, i32 %.02744)
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select39 = select i1 %14, i32 %15, i32 %.145
  br label %16

16:                                               ; preds = %11, %.preheader.new
  %.128 = phi i32 [ %.02744, %.preheader.new ], [ %spec.select, %11 ]
  %.2 = phi i32 [ %.145, %.preheader.new ], [ %spec.select39, %11 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv.next
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %.not38.1 = icmp eq i32 %18, 0
  br i1 %.not38.1, label %19, label %24

19:                                               ; preds = %16
  %20 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv.next
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp slt i32 %21, %.128
  %spec.select.1 = tail call i32 @llvm.smin.i32(i32 %21, i32 %.128)
  %23 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select39.1 = select i1 %22, i32 %23, i32 %.2
  br label %24

24:                                               ; preds = %19, %16
  %.128.1 = phi i32 [ %.128, %16 ], [ %spec.select.1, %19 ]
  %.2.1 = phi i32 [ %.2, %16 ], [ %spec.select39.1, %19 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge47.unr-lcssa, label %.preheader.new, !llvm.loop !9

._crit_edge47.unr-lcssa:                          ; preds = %24, %.preheader
  %.2.lcssa.ph = phi i32 [ poison, %.preheader ], [ %.2.1, %24 ]
  %indvars.iv.unr = phi i64 [ 1, %.preheader ], [ %indvars.iv.next.1, %24 ]
  %.145.unr = phi i32 [ %.02655, %.preheader ], [ %.2.1, %24 ]
  %.02744.unr = phi i32 [ 65535, %.preheader ], [ %.128.1, %24 ]
  br i1 %lcmp.mod.not, label %._crit_edge47, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge47.unr-lcssa
  %25 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv.unr
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not38.epil = icmp eq i32 %26, 0
  br i1 %.not38.epil, label %27, label %._crit_edge47

27:                                               ; preds = %.epil.preheader
  %28 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv.unr
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp slt i32 %29, %.02744.unr
  %31 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %spec.select39.epil = select i1 %30, i32 %31, i32 %.145.unr
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %.epil.preheader, %27, %._crit_edge47.unr-lcssa
  %.2.lcssa = phi i32 [ %.2.lcssa.ph, %._crit_edge47.unr-lcssa ], [ %.145.unr, %.epil.preheader ], [ %spec.select39.epil, %27 ]
  %32 = sext i32 %.2.lcssa to i64
  %33 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %32
  store i32 1, ptr %35, align 4, !tbaa !5
  br i1 %8, label %._crit_edge53.unr-lcssa, label %._crit_edge47.new

._crit_edge47.new:                                ; preds = %._crit_edge47, %55
  %indvars.iv69 = phi i64 [ %indvars.iv.next70.1, %55 ], [ 1, %._crit_edge47 ]
  %niter80 = phi i64 [ %niter80.next.1, %55 ], [ 0, %._crit_edge47 ]
  %36 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv69
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not37 = icmp eq i32 %37, 0
  br i1 %.not37, label %38, label %45

38:                                               ; preds = %._crit_edge47.new
  %39 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv69
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [110 x [110 x i32]], ptr @map, i64 0, i64 %32, i64 %indvars.iv69
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp sgt i32 %40, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %38
  store i32 %42, ptr %39, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %._crit_edge47.new, %38, %44
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %46 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv.next70
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %.not37.1 = icmp eq i32 %47, 0
  br i1 %.not37.1, label %48, label %55

48:                                               ; preds = %45
  %49 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv.next70
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds [110 x [110 x i32]], ptr @map, i64 0, i64 %32, i64 %indvars.iv.next70
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp sgt i32 %50, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %48
  store i32 %52, ptr %49, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %54, %48, %45
  %indvars.iv.next70.1 = add nuw nsw i64 %indvars.iv69, 2
  %niter80.next.1 = add i64 %niter80, 2
  %niter80.ncmp.1 = icmp eq i64 %niter80.next.1, %unroll_iter79
  br i1 %niter80.ncmp.1, label %._crit_edge53.unr-lcssa, label %._crit_edge47.new, !llvm.loop !11

._crit_edge53.unr-lcssa:                          ; preds = %55, %._crit_edge47
  %indvars.iv69.unr = phi i64 [ 1, %._crit_edge47 ], [ %indvars.iv.next70.1, %55 ]
  br i1 %lcmp.mod78.not, label %._crit_edge53, label %.epil.preheader76

.epil.preheader76:                                ; preds = %._crit_edge53.unr-lcssa
  %56 = getelementptr inbounds [110 x i32], ptr @isvisited, i64 0, i64 %indvars.iv69.unr
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %.not37.epil = icmp eq i32 %57, 0
  br i1 %.not37.epil, label %58, label %._crit_edge53

58:                                               ; preds = %.epil.preheader76
  %59 = getelementptr inbounds [110 x i32], ptr @dist, i64 0, i64 %indvars.iv69.unr
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = getelementptr inbounds [110 x [110 x i32]], ptr @map, i64 0, i64 %32, i64 %indvars.iv69.unr
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sgt i32 %60, %62
  br i1 %63, label %64, label %._crit_edge53

64:                                               ; preds = %58
  store i32 %62, ptr %59, align 4, !tbaa !5
  br label %._crit_edge53

._crit_edge53:                                    ; preds = %.epil.preheader76, %58, %64, %._crit_edge53.unr-lcssa
  %65 = add nsw i32 %34, %.056
  %66 = add nuw nsw i32 %.13254, 1
  %exitcond74.not = icmp eq i32 %66, %1
  br i1 %exitcond74.not, label %._crit_edge57, label %.preheader, !llvm.loop !12

._crit_edge57:                                    ; preds = %._crit_edge53, %._crit_edge.thread, %._crit_edge
  %.0.lcssa = phi i32 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %65, %._crit_edge53 ]
  ret i32 %.0.lcssa
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

attributes #0 = { mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass