; LLVM IR from freddiev4/dailyprogrammerchallenges :: Intermediate Challenges/Challenge 0003 Intermediate/solutions (solution)

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

@__const.main.str = external hidden unnamed_addr constant [30 x i8], align 16
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [30 x i8], align 16
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 30, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 @__const.main.str, i64 30, i1 false)
  %9 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 0
  %10 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %9)
  %11 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 0
  %12 = call i64 @strlen(ptr noundef %11) #6
  %13 = trunc i64 %12 to i32
  store i32 %13, ptr %7, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %138, %2
  %15 = load i32, ptr %6, align 4, !tbaa !5
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %18, label %141

18:                                               ; preds = %14
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !11
  %23 = sext i8 %22 to i32
  %24 = icmp sge i32 %23, 48
  br i1 %24, label %25, label %46

25:                                               ; preds = %18
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = sext i8 %29 to i32
  %31 = icmp sle i32 %30, 57
  br i1 %31, label %32, label %46

32:                                               ; preds = %25
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = sub nsw i32 %37, 48
  %39 = add nsw i32 %38, 7
  %40 = srem i32 %39, 10
  %41 = add nsw i32 48, %40
  %42 = trunc i32 %41 to i8
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %44
  store i8 %42, ptr %45, align 1, !tbaa !11
  br label %137

46:                                               ; preds = %25, %18
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !11
  %51 = sext i8 %50 to i32
  %52 = icmp sge i32 %51, 97
  br i1 %52, label %53, label %74

53:                                               ; preds = %46
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = icmp sle i32 %58, 122
  br i1 %59, label %60, label %74

60:                                               ; preds = %53
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i32
  %66 = sub nsw i32 %65, 97
  %67 = add nsw i32 %66, 7
  %68 = srem i32 %67, 26
  %69 = add nsw i32 97, %68
  %70 = trunc i32 %69 to i8
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %72
  store i8 %70, ptr %73, align 1, !tbaa !11
  br label %136

74:                                               ; preds = %53, %46
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp sge i32 %79, 65
  br i1 %80, label %81, label %102

81:                                               ; preds = %74
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = sext i8 %85 to i32
  %87 = icmp sle i32 %86, 90
  br i1 %87, label %88, label %102

88:                                               ; preds = %81
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !11
  %93 = sext i8 %92 to i32
  %94 = sub nsw i32 %93, 65
  %95 = add nsw i32 %94, 7
  %96 = srem i32 %95, 26
  %97 = add nsw i32 65, %96
  %98 = trunc i32 %97 to i8
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %100
  store i8 %98, ptr %101, align 1, !tbaa !11
  br label %135

102:                                              ; preds = %81, %74
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !11
  %107 = sext i8 %106 to i32
  %108 = icmp sge i32 %107, 32
  br i1 %108, label %109, label %130

109:                                              ; preds = %102
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !11
  %114 = sext i8 %113 to i32
  %115 = icmp sle i32 %114, 47
  br i1 %115, label %116, label %130

116:                                              ; preds = %109
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %118
  %120 = load i8, ptr %119, align 1, !tbaa !11
  %121 = sext i8 %120 to i32
  %122 = sub nsw i32 %121, 32
  %123 = add nsw i32 %122, 7
  %124 = srem i32 %123, 16
  %125 = add nsw i32 32, %124
  %126 = trunc i32 %125 to i8
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %128
  store i8 %126, ptr %129, align 1, !tbaa !11
  br label %134

130:                                              ; preds = %109, %102
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 %132
  store i8 126, ptr %133, align 1, !tbaa !11
  br label %134

134:                                              ; preds = %130, %116
  br label %135

135:                                              ; preds = %134, %88
  br label %136

136:                                              ; preds = %135, %60
  br label %137

137:                                              ; preds = %136, %32
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %6, align 4, !tbaa !5
  br label %14, !llvm.loop !12

141:                                              ; preds = %14
  %142 = getelementptr inbounds [30 x i8], ptr %8, i64 0, i64 0
  %143 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 30, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret i32 0
}

; 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

attributes #0 = { 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: readwrite) }
attributes #3 = { "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) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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

@__const.main.str = external hidden unnamed_addr constant [30 x i8], align 16
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [30 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(30) %3, ptr noundef nonnull align 16 dereferenceable(30) @__const.main.str, i64 30, i1 false)
  %4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %3)
  %5 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #6
  %6 = trunc i64 %5 to i32
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %iter.check, label %._crit_edge

iter.check:                                       ; preds = %2
  %wide.trip.count = and i64 %5, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check39 = icmp ult i64 %wide.trip.count, 16
  br i1 %min.iters.check39, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.mod.vf = and i64 %5, 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 ]
  %8 = getelementptr inbounds [30 x i8], ptr %3, i64 0, i64 %index
  %wide.load = load <16 x i8>, ptr %8, align 16, !tbaa !5
  %9 = freeze <16 x i8> %wide.load
  %10 = add <16 x i8> %9, <i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58>
  %11 = icmp ult <16 x i8> %10, <i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10>
  %12 = add <16 x i8> %9, <i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123>
  %13 = icmp ult <16 x i8> %12, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
  %14 = and <16 x i1> %11, %13
  %15 = add <16 x i8> %9, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %16 = icmp ult <16 x i8> %15, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %17 = xor <16 x i1> %16, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
  %18 = and <16 x i1> %14, %17
  %19 = and <16 x i8> %9, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
  %20 = icmp eq <16 x i8> %19, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %21 = and <16 x i1> %18, %20
  %22 = add nuw nsw <16 x i8> %9, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %23 = and <16 x i8> %22, <i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47>
  %24 = and <16 x i1> %14, %16
  %25 = add nsw <16 x i8> %9, <i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58>
  %26 = add nsw <16 x i8> %9, <i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84>
  %27 = icmp ult <16 x i8> %25, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %28 = select <16 x i1> %27, <16 x i8> %25, <16 x i8> %26
  %29 = add nuw nsw <16 x i8> %28, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
  %30 = add <16 x i8> %9, <i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97>
  %31 = icmp ult <16 x i8> %30, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %32 = add nsw <16 x i8> %9, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  %33 = add nsw <16 x i8> %9, <i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116>
  %34 = icmp ult <16 x i8> %32, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %35 = select <16 x i1> %34, <16 x i8> %32, <16 x i8> %33
  %36 = add nuw nsw <16 x i8> %35, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
  %37 = zext <16 x i8> %9 to <16 x i32>
  %38 = add nsw <16 x i32> %37, <i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41>
  %39 = add nuw nsw <16 x i32> %37, <i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205>
  %40 = icmp ult <16 x i32> %38, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
  %41 = select <16 x i1> %40, <16 x i32> %38, <16 x i32> %39
  %42 = trunc <16 x i32> %41 to <16 x i8>
  %43 = or disjoint <16 x i8> %42, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  %44 = xor <16 x i1> %20, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
  %45 = and <16 x i1> %18, %44
  %predphi = select <16 x i1> %24, <16 x i8> %29, <16 x i8> %43
  %predphi40 = select <16 x i1> %21, <16 x i8> %23, <16 x i8> %predphi
  %predphi41 = select <16 x i1> %31, <16 x i8> %36, <16 x i8> %predphi40
  %predphi42 = select <16 x i1> %45, <16 x i8> <i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126>, <16 x i8> %predphi41
  store <16 x i8> %predphi42, ptr %8, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 16
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %min.epilog.iters.check = icmp ult i64 %n.mod.vf, 8
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.mod.vf43 = and i64 %5, 7
  %n.vec44 = sub nsw i64 %wide.trip.count, %n.mod.vf43
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index45 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next51, %vec.epilog.vector.body ]
  %47 = getelementptr inbounds [30 x i8], ptr %3, i64 0, i64 %index45
  %wide.load46 = load <8 x i8>, ptr %47, align 1, !tbaa !5
  %48 = freeze <8 x i8> %wide.load46
  %49 = add <8 x i8> %48, <i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58>
  %50 = icmp ult <8 x i8> %49, <i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10>
  %51 = add <8 x i8> %48, <i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123>
  %52 = icmp ult <8 x i8> %51, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
  %53 = and <8 x i1> %50, %52
  %54 = add <8 x i8> %48, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %55 = icmp ult <8 x i8> %54, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %56 = xor <8 x i1> %55, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
  %57 = and <8 x i1> %53, %56
  %58 = and <8 x i8> %48, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
  %59 = icmp eq <8 x i8> %58, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %60 = and <8 x i1> %57, %59
  %61 = add nuw nsw <8 x i8> %48, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %62 = and <8 x i8> %61, <i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47, i8 47>
  %63 = and <8 x i1> %53, %55
  %64 = add nsw <8 x i8> %48, <i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58, i8 -58>
  %65 = add nsw <8 x i8> %48, <i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84, i8 -84>
  %66 = icmp ult <8 x i8> %64, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %67 = select <8 x i1> %66, <8 x i8> %64, <8 x i8> %65
  %68 = add nuw nsw <8 x i8> %67, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
  %69 = add <8 x i8> %48, <i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97>
  %70 = icmp ult <8 x i8> %69, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %71 = add nsw <8 x i8> %48, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  %72 = add nsw <8 x i8> %48, <i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116, i8 -116>
  %73 = icmp ult <8 x i8> %71, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %74 = select <8 x i1> %73, <8 x i8> %71, <8 x i8> %72
  %75 = add nuw nsw <8 x i8> %74, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
  %76 = zext <8 x i8> %48 to <8 x i32>
  %77 = add nsw <8 x i32> %76, <i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41, i32 -41>
  %78 = add nuw nsw <8 x i32> %76, <i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205, i32 205>
  %79 = icmp ult <8 x i32> %77, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
  %80 = select <8 x i1> %79, <8 x i32> %77, <8 x i32> %78
  %81 = trunc <8 x i32> %80 to <8 x i8>
  %82 = or disjoint <8 x i8> %81, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  %83 = xor <8 x i1> %59, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
  %84 = and <8 x i1> %57, %83
  %predphi47 = select <8 x i1> %63, <8 x i8> %68, <8 x i8> %82
  %predphi48 = select <8 x i1> %60, <8 x i8> %62, <8 x i8> %predphi47
  %predphi49 = select <8 x i1> %70, <8 x i8> %75, <8 x i8> %predphi48
  %predphi50 = select <8 x i1> %84, <8 x i8> <i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126, i8 126>, <8 x i8> %predphi49
  store <8 x i8> %predphi50, ptr %47, align 1, !tbaa !5
  %index.next51 = add nuw i64 %index45, 8
  %85 = icmp eq i64 %index.next51, %n.vec44
  br i1 %85, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n52 = icmp eq i64 %n.mod.vf43, 0
  br i1 %cmp.n52, label %._crit_edge, label %.lr.ph.preheader

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %111
  %indvars.iv = phi i64 [ %indvars.iv.next, %111 ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %86 = getelementptr inbounds [30 x i8], ptr %3, i64 0, i64 %indvars.iv
  %87 = load i8, ptr %86, align 1, !tbaa !5
  %.fr = freeze i8 %87
  %88 = add i8 %.fr, -48
  %or.cond = icmp ult i8 %88, 10
  br i1 %or.cond, label %89, label %95

89:                                               ; preds = %.lr.ph
  %90 = zext nneg i8 %.fr to i32
  %91 = add nsw i32 %90, -41
  %.urem = add nuw nsw i32 %90, 205
  %.cmp = icmp ult i32 %91, 10
  %92 = select i1 %.cmp, i32 %91, i32 %.urem
  %93 = trunc i32 %92 to i8
  %94 = or disjoint i8 %93, 48
  br label %111

95:                                               ; preds = %.lr.ph
  %96 = add i8 %.fr, -97
  %or.cond27 = icmp ult i8 %96, 26
  br i1 %or.cond27, label %97, label %101

97:                                               ; preds = %95
  %98 = add nsw i8 %.fr, -90
  %.urem31 = add nsw i8 %.fr, -116
  %.cmp32 = icmp ult i8 %98, 26
  %99 = select i1 %.cmp32, i8 %98, i8 %.urem31
  %100 = add nuw nsw i8 %99, 97
  br label %111

101:                                              ; preds = %95
  %102 = add i8 %.fr, -65
  %or.cond28 = icmp ult i8 %102, 26
  br i1 %or.cond28, label %103, label %107

103:                                              ; preds = %101
  %104 = add nsw i8 %.fr, -58
  %.urem34 = add nsw i8 %.fr, -84
  %.cmp35 = icmp ult i8 %104, 26
  %105 = select i1 %.cmp35, i8 %104, i8 %.urem34
  %106 = add nuw nsw i8 %105, 65
  br label %111

107:                                              ; preds = %101
  %108 = and i8 %.fr, -16
  %or.cond29 = icmp eq i8 %108, 32
  br i1 %or.cond29, label %109, label %111

109:                                              ; preds = %107
  %narrow = add nuw nsw i8 %.fr, 7
  %110 = and i8 %narrow, 47
  br label %111

111:                                              ; preds = %107, %89, %103, %109, %97
  %.sink = phi i8 [ %94, %89 ], [ %106, %103 ], [ %110, %109 ], [ %100, %97 ], [ 126, %107 ]
  store i8 %.sink, ptr %86, align 1, !tbaa !5
  %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 !13

._crit_edge:                                      ; preds = %111, %middle.block, %vec.epilog.middle.block, %2
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %3) #5
  ret i32 0
}

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

; Function Attrs: mustprogress 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) #2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) 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) #1

attributes #0 = { nofree 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10, !11}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !9, !10, !11}
!13 = distinct !{!13, !9, !11, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass