; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SNACKDOWN/16/Qualifier/Problem C/C.ll (Z5solvev)

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

@s = external dso_local global [100100 x i8], align 16
@k = external dso_local global i32, align 4
@cnt = external dso_local global [26 x i32], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @s, ptr noundef @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %12 = call i64 @strlen(ptr noundef @s) #7
  %13 = trunc i64 %12 to i32
  store i32 %13, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @cnt, ptr noundef getelementptr inbounds (i32, ptr @cnt, i64 26), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %30, %0
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !9
  %24 = sext i8 %23 to i32
  %25 = sub nsw i32 %24, 97
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !5
  br label %30

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

33:                                               ; preds = %18
  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
  br label %34

34:                                               ; preds = %44, %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 26
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %47

38:                                               ; preds = %34
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %40
  %42 = 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) %41)
  %43 = load i32, ptr %42, align 4, !tbaa !5
  store i32 %43, ptr %4, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %38
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %5, align 4, !tbaa !5
  br label %34, !llvm.loop !12

47:                                               ; preds = %37
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = load i32, ptr @k, align 4, !tbaa !5
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %47
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 1, ptr %6, align 4
  br label %110

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1000000000, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %54 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %54, ptr %8, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %104, %53
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = load i32, ptr @k, align 4, !tbaa !5
  %58 = icmp sge i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %107

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %98, %60
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 26
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %101

65:                                               ; preds = %61
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = icmp sgt i32 %69, %70
  br i1 %71, label %72, label %81

72:                                               ; preds = %65
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = sub nsw i32 %76, %77
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = add nsw i32 %79, %78
  store i32 %80, ptr %9, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %72, %65
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = load i32, ptr @k, align 4, !tbaa !5
  %88 = sub nsw i32 %86, %87
  %89 = icmp slt i32 %85, %88
  br i1 %89, label %90, label %97

90:                                               ; preds = %81
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr %9, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %90, %81
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %10, align 4, !tbaa !5
  br label %61, !llvm.loop !13

101:                                              ; preds = %64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %104

104:                                              ; preds = %101
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %8, align 4, !tbaa !5
  br label %55, !llvm.loop !14

107:                                              ; preds = %59
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %108)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  store i32 0, ptr %6, align 4
  br label %110

110:                                              ; preds = %107, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  %111 = load i32, ptr %6, align 4
  switch i32 %111, label %113 [
    i32 0, label %112
    i32 1, label %112
  ]

112:                                              ; preds = %110, %110
  ret void

113:                                              ; preds = %110
  unreachable
}

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: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

; 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 @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

; 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)) #5

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 = { "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 = { 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 #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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}
!14 = distinct !{!14, !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"

@s = external dso_local global [100100 x i8], align 16
@k = external dso_local global i32, align 4
@cnt = external dso_local global [26 x i32], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() 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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s, ptr noundef nonnull @k)
  %6 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #6
  %7 = trunc i64 %6 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @cnt, ptr noundef nonnull getelementptr inbounds (i8, ptr @cnt, i64 104), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = and i64 %6, 2147483647
  %xtraiter = and i64 %6, 1
  %9 = icmp eq i64 %wide.trip.count, 1
  br i1 %9, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %.lr.ph

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

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %10 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %indvars.iv.unr
  %11 = load i8, ptr %10, align 1, !tbaa !9
  %12 = sext i8 %11 to i64
  %13 = add nsw i64 %12, -97
  %14 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %14, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) @cnt)
  %18 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %18, ptr %2, align 4, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 4))
  %20 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %20, ptr %2, align 4, !tbaa !5
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 8))
  %22 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %22, ptr %2, align 4, !tbaa !5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 12))
  %24 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %24, ptr %2, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 16))
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr %2, align 4, !tbaa !5
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 20))
  %28 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %28, ptr %2, align 4, !tbaa !5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 24))
  %30 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %30, ptr %2, align 4, !tbaa !5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 28))
  %32 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %32, ptr %2, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 32))
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %2, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 36))
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr %2, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 40))
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr %2, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 44))
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %2, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 48))
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr %2, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 52))
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %44, ptr %2, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 56))
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr %2, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 60))
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr %2, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 64))
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %50, ptr %2, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 68))
  %52 = load i32, ptr %51, align 4, !tbaa !5
  store i32 %52, ptr %2, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 72))
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %2, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 76))
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %2, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 80))
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr %2, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 84))
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %2, align 4, !tbaa !5
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 88))
  %62 = load i32, ptr %61, align 4, !tbaa !5
  store i32 %62, ptr %2, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 92))
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %2, align 4, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 96))
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %2, align 4, !tbaa !5
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 100))
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr %2, align 4, !tbaa !5
  %69 = load i32, ptr @k, align 4, !tbaa !5
  %.not = icmp sgt i32 %68, %69
  br i1 %.not, label %.lr.ph30.preheader, label %84

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %70 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %indvars.iv
  %71 = load i8, ptr %70, align 2, !tbaa !9
  %72 = sext i8 %71 to i64
  %73 = add nsw i64 %72, -97
  %74 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %77 = getelementptr inbounds [100100 x i8], ptr @s, i64 0, i64 %indvars.iv.next
  %78 = load i8, ptr %77, align 1, !tbaa !9
  %79 = sext i8 %78 to i64
  %80 = add nsw i64 %79, -97
  %81 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %81, align 4, !tbaa !5
  %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_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !10

84:                                               ; preds = %._crit_edge
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %116

.lr.ph30.preheader:                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1000000000, ptr %3, align 4, !tbaa !5
  br label %.lr.ph30

._crit_edge31:                                    ; preds = %89
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %91)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %116

.lr.ph30:                                         ; preds = %.lr.ph30.preheader, %89
  %87 = phi i32 [ %93, %89 ], [ %69, %.lr.ph30.preheader ]
  %.01828 = phi i32 [ %92, %89 ], [ %68, %.lr.ph30.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  %88 = sub nsw i32 %.01828, %87
  br label %94

89:                                               ; preds = %115
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %92 = add nsw i32 %.01828, -1
  %93 = load i32, ptr @k, align 4, !tbaa !5
  %.not23.not = icmp sgt i32 %.01828, %93
  br i1 %.not23.not, label %.lr.ph30, label %._crit_edge31, !llvm.loop !12

94:                                               ; preds = %115, %.lr.ph30
  %indvars.iv39 = phi i64 [ 0, %.lr.ph30 ], [ %indvars.iv.next40.1, %115 ]
  %95 = phi i32 [ 0, %.lr.ph30 ], [ %112, %115 ]
  %96 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %indvars.iv39
  %97 = load i32, ptr %96, align 8, !tbaa !5
  %.not32 = icmp sgt i32 %97, %.01828
  %98 = sub i32 %97, %.01828
  %99 = select i1 %.not32, i32 %98, i32 0
  %100 = add nsw i32 %95, %99
  %.not33 = icmp slt i32 %97, %88
  %101 = select i1 %.not33, i32 %97, i32 0
  %102 = add nsw i32 %100, %101
  %103 = or i1 %.not32, %.not33
  br i1 %103, label %104, label %105

104:                                              ; preds = %94
  store i32 %102, ptr %4, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %94, %104
  %indvars.iv.next40 = or disjoint i64 %indvars.iv39, 1
  %106 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next40
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %.not32.1 = icmp sgt i32 %107, %.01828
  %108 = sub i32 %107, %.01828
  %109 = select i1 %.not32.1, i32 %108, i32 0
  %110 = add nsw i32 %102, %109
  %.not33.1 = icmp slt i32 %107, %88
  %111 = select i1 %.not33.1, i32 %107, i32 0
  %112 = add nsw i32 %110, %111
  %113 = or i1 %.not32.1, %.not33.1
  br i1 %113, label %114, label %115

114:                                              ; preds = %105
  store i32 %112, ptr %4, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %114, %105
  %indvars.iv.next40.1 = add nuw nsw i64 %indvars.iv39, 2
  %exitcond42.not.1 = icmp eq i64 %indvars.iv.next40.1, 26
  br i1 %exitcond42.not.1, label %89, label %94, !llvm.loop !13

116:                                              ; preds = %._crit_edge31, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

; 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 @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; 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 #5

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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}


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