; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x14-Hash/139. 回文子串的最大长度-Manacher.ll (Z8manacherv)

; 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
@m = external dso_local global i32, align 4
@s = external dso_local global [2000010 x i8], align 16
@str = external dso_local global [2000010 x i8], align 16
@p = external dso_local global [2000010 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8manacherv() #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 = call i64 @strlen(ptr noundef @s) #4
  %9 = trunc i64 %8 to i32
  store i32 %9, ptr @n, align 4, !tbaa !5
  store i8 33, ptr @str, align 16, !tbaa !9
  store i8 35, ptr getelementptr inbounds ([2000010 x i8], ptr @str, i64 0, i64 1), align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %30, %0
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

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

15:                                               ; preds = %10
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [2000010 x i8], ptr @s, i64 0, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !9
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = mul nsw i32 %20, 2
  %22 = add nsw i32 %21, 2
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %23
  store i8 %19, ptr %24, align 1, !tbaa !9
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = mul nsw i32 %25, 2
  %27 = add nsw i32 %26, 3
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %28
  store i8 35, ptr %29, align 1, !tbaa !9
  br label %30

30:                                               ; preds = %15
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %1, align 4, !tbaa !5
  br label %10, !llvm.loop !10

33:                                               ; preds = %14
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = mul nsw i32 %34, 2
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr @m, align 4, !tbaa !5
  %37 = load i32, ptr @m, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %39
  store i8 64, ptr %40, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %121, %33
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %124

46:                                               ; preds = %41
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  br i1 %49, label %50, label %62

50:                                               ; preds = %46
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = mul nsw i32 2, %51
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sub nsw i32 %52, %53
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %55
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sub nsw i32 %57, %58
  store i32 %59, ptr %6, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  br label %63

62:                                               ; preds = %46
  br label %63

63:                                               ; preds = %62, %50
  %64 = phi i32 [ %61, %50 ], [ 1, %62 ]
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %68

68:                                               ; preds = %90, %63
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %69, %73
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !9
  %78 = sext i8 %77 to i32
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sub nsw i32 %79, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !9
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %78, %88
  br i1 %89, label %90, label %96

90:                                               ; preds = %68
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %93, align 4, !tbaa !5
  br label %68, !llvm.loop !12

96:                                               ; preds = %68
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add nsw i32 %97, %101
  %103 = load i32, ptr %2, align 4, !tbaa !5
  %104 = icmp sgt i32 %102, %103
  br i1 %104, label %105, label %113

105:                                              ; preds = %96
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %106, %110
  store i32 %111, ptr %2, align 4, !tbaa !5
  %112 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %112, ptr %3, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %105, %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  store i32 %118, ptr %7, align 4, !tbaa !5
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  store i32 %120, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %121

121:                                              ; preds = %113
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !13

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

attributes #0 = { 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 #1 = { nounwind willreturn memory(read) "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 = { 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 #4 = { nounwind willreturn memory(read) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; 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
@m = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local global [2000010 x i8], align 16
@str = external dso_local local_unnamed_addr global [2000010 x i8], align 16
@p = external dso_local global [2000010 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z8manacherv() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #5
  %5 = trunc i64 %4 to i32
  store i32 %5, ptr @n, align 4, !tbaa !5
  store i8 33, ptr @str, align 16, !tbaa !9
  store i8 35, ptr getelementptr inbounds (i8, ptr @str, i64 1), align 1, !tbaa !9
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = and i64 %4, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 16
  br i1 %min.iters.check, label %.lr.ph.preheader64, label %vector.ph

.lr.ph.preheader64:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %4, 15
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %7 = getelementptr inbounds [2000010 x i8], ptr @s, i64 0, i64 %index
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %wide.load = load <8 x i8>, ptr %7, align 16, !tbaa !9
  %wide.load60 = load <8 x i8>, ptr %8, align 8, !tbaa !9
  %9 = shl nuw nsw i64 %index, 1
  %10 = shl i64 %index, 1
  %11 = or disjoint i64 %9, 3
  %12 = or disjoint i64 %10, 19
  %gep = getelementptr [2000010 x i8], ptr getelementptr (i8, ptr @str, i64 -1), i64 0, i64 %11
  %gep67 = getelementptr [2000010 x i8], ptr getelementptr (i8, ptr @str, i64 -1), i64 0, i64 %12
  %interleaved.vec = shufflevector <8 x i8> %wide.load, <8 x i8> <i8 35, i8 35, i8 35, i8 35, i8 35, i8 35, i8 35, i8 35>, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
  store <16 x i8> %interleaved.vec, ptr %gep, align 2, !tbaa !9
  %interleaved.vec61 = shufflevector <8 x i8> %wide.load60, <8 x i8> <i8 35, i8 35, i8 35, i8 35, i8 35, i8 35, i8 35, i8 35>, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
  store <16 x i8> %interleaved.vec61, ptr %gep67, align 2, !tbaa !9
  %index.next = add nuw i64 %index, 16
  %13 = icmp eq i64 %index.next, %n.vec
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader64

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %14 = shl nsw i32 %5, 1
  %15 = or disjoint i32 %14, 1
  store i32 %15, ptr @m, align 4, !tbaa !5
  %16 = add nsw i32 %14, 2
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %17
  store i8 64, ptr %18, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  %.not40 = icmp slt i32 %5, 0
  br i1 %.not40, label %._crit_edge46, label %.lr.ph45

.lr.ph:                                           ; preds = %.lr.ph.preheader64, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader64 ]
  %19 = getelementptr inbounds [2000010 x i8], ptr @s, i64 0, i64 %indvars.iv
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = shl nuw nsw i64 %indvars.iv, 1
  %22 = add nuw nsw i64 %21, 2
  %23 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %22
  store i8 %20, ptr %23, align 2, !tbaa !9
  %24 = add nuw nsw i64 %21, 3
  %25 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %24
  store i8 35, ptr %25, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge46:                                    ; preds = %59, %._crit_edge
  %26 = phi i32 [ 0, %._crit_edge ], [ %63, %59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 %26

.lr.ph45:                                         ; preds = %._crit_edge, %59
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %59 ], [ 1, %._crit_edge ]
  %.02642 = phi i32 [ %spec.select32, %59 ], [ 0, %._crit_edge ]
  %.02741 = phi i32 [ %spec.select, %59 ], [ 0, %._crit_edge ]
  %27 = sext i32 %.02741 to i64
  %28 = icmp slt i64 %indvars.iv53, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  br i1 %28, label %29, label %.lr.ph45._crit_edge

.lr.ph45._crit_edge:                              ; preds = %.lr.ph45
  %.pre = trunc nuw nsw i64 %indvars.iv53 to i32
  br label %38

29:                                               ; preds = %.lr.ph45
  %30 = shl nsw i32 %.02642, 1
  %31 = sext i32 %30 to i64
  %32 = sub nsw i64 %31, %indvars.iv53
  %33 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %32
  %34 = trunc nuw nsw i64 %indvars.iv53 to i32
  %35 = sub nsw i32 %.02741, %34
  store i32 %35, ptr %2, align 4, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %37 = load i32, ptr %36, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %.lr.ph45._crit_edge, %29
  %.pre-phi = phi i32 [ %.pre, %.lr.ph45._crit_edge ], [ %34, %29 ]
  %39 = phi i32 [ 1, %.lr.ph45._crit_edge ], [ %37, %29 ]
  %40 = getelementptr inbounds [2000010 x i32], ptr @p, i64 0, i64 %indvars.iv53
  store i32 %39, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %41 = add nsw i32 %39, %.pre-phi
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %45 = sext i32 %39 to i64
  %46 = sub nsw i64 %indvars.iv53, %45
  %47 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = icmp eq i8 %44, %48
  br i1 %49, label %.lr.ph36, label %59

.lr.ph36:                                         ; preds = %38, %.lr.ph36
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph36 ], [ %45, %38 ]
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, 1
  %50 = add nsw i64 %indvars.iv.next51, %indvars.iv53
  %51 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = sub nsw i64 %indvars.iv53, %indvars.iv.next51
  %54 = getelementptr inbounds [2000010 x i8], ptr @str, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !9
  %56 = icmp eq i8 %52, %55
  br i1 %56, label %.lr.ph36, label %._crit_edge37, !llvm.loop !15

._crit_edge37:                                    ; preds = %.lr.ph36
  %57 = trunc nsw i64 %indvars.iv.next51 to i32
  %58 = trunc nsw i64 %50 to i32
  store i32 %57, ptr %40, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %._crit_edge37, %38
  %.lcssa33 = phi i32 [ %57, %._crit_edge37 ], [ %39, %38 ]
  %.lcssa = phi i32 [ %58, %._crit_edge37 ], [ %41, %38 ]
  %60 = icmp sgt i32 %.lcssa, %.02741
  %spec.select = call i32 @llvm.smax.i32(i32 %.lcssa, i32 %.02741)
  %spec.select32 = select i1 %60, i32 %.pre-phi, i32 %.02642
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %61 = add nsw i32 %.lcssa33, -1
  store i32 %61, ptr %3, align 4, !tbaa !5
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %.not.not = icmp slt i64 %indvars.iv53, %65
  br i1 %.not.not, label %.lr.ph45, label %._crit_edge46, !llvm.loop !16
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

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

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

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

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

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

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 nofree nounwind willreturn memory(argmem: read) "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind willreturn memory(read) }
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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !13, !12}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass