; LLVM IR from hanzohasashi33/Competetive_programming :: hackerrank/c language proficiency (Digit_Frequency)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [1000 x i8], align 16
  %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 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1000, ptr %2) #4
  %14 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %123, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %20 = call i64 @strlen(ptr noundef %19) #5
  %21 = icmp ult i64 %18, %20
  br i1 %21, label %22, label %126

22:                                               ; preds = %16
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 48
  br i1 %28, label %29, label %32

29:                                               ; preds = %22
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %4, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %29, %22
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 49
  br i1 %38, label %39, label %42

39:                                               ; preds = %32
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %39, %32
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 50
  br i1 %48, label %49, label %52

49:                                               ; preds = %42
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %6, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %49, %42
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 51
  br i1 %58, label %59, label %62

59:                                               ; preds = %52
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %59, %52
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = sext i8 %66 to i32
  %68 = icmp eq i32 %67, 52
  br i1 %68, label %69, label %72

69:                                               ; preds = %62
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %8, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %69, %62
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 53
  br i1 %78, label %79, label %82

79:                                               ; preds = %72
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %9, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %79, %72
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !9
  %87 = sext i8 %86 to i32
  %88 = icmp eq i32 %87, 54
  br i1 %88, label %89, label %92

89:                                               ; preds = %82
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %10, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %89, %82
  %93 = load i32, ptr %3, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !9
  %97 = sext i8 %96 to i32
  %98 = icmp eq i32 %97, 55
  br i1 %98, label %99, label %102

99:                                               ; preds = %92
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %99, %92
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 56
  br i1 %108, label %109, label %112

109:                                              ; preds = %102
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %109, %102
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !9
  %117 = sext i8 %116 to i32
  %118 = icmp eq i32 %117, 57
  br i1 %118, label %119, label %122

119:                                              ; preds = %112
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %119, %112
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %3, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %3, align 4, !tbaa !5
  br label %16, !llvm.loop !10

126:                                              ; preds = %16
  %127 = load i32, ptr %4, align 4, !tbaa !5
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = load i32, ptr %12, align 4, !tbaa !5
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %127, i32 noundef %128, i32 noundef %129, i32 noundef %130, i32 noundef %131, i32 noundef %132, i32 noundef %133, i32 noundef %134, i32 noundef %135, i32 noundef %136)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 1000, ptr %2) #4
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

; 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 = { nounwind }
attributes #5 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [1000 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %1) #5
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %.not = icmp eq i64 %3, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %min.iters.check = icmp ult i64 %3, 4
  br i1 %min.iters.check, label %.lr.ph.preheader91, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %3, -4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ]
  %vec.phi73 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %31, %vector.body ]
  %vec.phi74 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %28, %vector.body ]
  %vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ]
  %vec.phi76 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %22, %vector.body ]
  %vec.phi77 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
  %vec.phi78 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ]
  %vec.phi79 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ]
  %vec.phi80 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ]
  %vec.phi81 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ]
  %4 = getelementptr inbounds [1000 x i8], ptr %1, i64 0, i64 %index
  %wide.load = load <4 x i8>, ptr %4, align 4, !tbaa !5
  %5 = icmp eq <4 x i8> %wide.load, <i8 48, i8 48, i8 48, i8 48>
  %6 = zext <4 x i1> %5 to <4 x i32>
  %7 = add <4 x i32> %vec.phi81, %6
  %8 = icmp eq <4 x i8> %wide.load, <i8 49, i8 49, i8 49, i8 49>
  %9 = zext <4 x i1> %8 to <4 x i32>
  %10 = add <4 x i32> %vec.phi80, %9
  %11 = icmp eq <4 x i8> %wide.load, <i8 50, i8 50, i8 50, i8 50>
  %12 = zext <4 x i1> %11 to <4 x i32>
  %13 = add <4 x i32> %vec.phi79, %12
  %14 = icmp eq <4 x i8> %wide.load, <i8 51, i8 51, i8 51, i8 51>
  %15 = zext <4 x i1> %14 to <4 x i32>
  %16 = add <4 x i32> %vec.phi78, %15
  %17 = icmp eq <4 x i8> %wide.load, <i8 52, i8 52, i8 52, i8 52>
  %18 = zext <4 x i1> %17 to <4 x i32>
  %19 = add <4 x i32> %vec.phi77, %18
  %20 = icmp eq <4 x i8> %wide.load, <i8 53, i8 53, i8 53, i8 53>
  %21 = zext <4 x i1> %20 to <4 x i32>
  %22 = add <4 x i32> %vec.phi76, %21
  %23 = icmp eq <4 x i8> %wide.load, <i8 54, i8 54, i8 54, i8 54>
  %24 = zext <4 x i1> %23 to <4 x i32>
  %25 = add <4 x i32> %vec.phi75, %24
  %26 = icmp eq <4 x i8> %wide.load, <i8 55, i8 55, i8 55, i8 55>
  %27 = zext <4 x i1> %26 to <4 x i32>
  %28 = add <4 x i32> %vec.phi74, %27
  %29 = icmp eq <4 x i8> %wide.load, <i8 56, i8 56, i8 56, i8 56>
  %30 = zext <4 x i1> %29 to <4 x i32>
  %31 = add <4 x i32> %vec.phi73, %30
  %32 = icmp eq <4 x i8> %wide.load, <i8 57, i8 57, i8 57, i8 57>
  %33 = zext <4 x i1> %32 to <4 x i32>
  %34 = add <4 x i32> %vec.phi, %33
  %index.next = add nuw i64 %index, 4
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %36 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %34)
  %37 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %31)
  %38 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %28)
  %39 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %25)
  %40 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %22)
  %41 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %19)
  %42 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %16)
  %43 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %13)
  %44 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %10)
  %45 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %7)
  %cmp.n = icmp eq i64 %3, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader91

.lr.ph.preheader91:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.062.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %36, %middle.block ]
  %.03261.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %37, %middle.block ]
  %.03460.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %38, %middle.block ]
  %.03659.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %39, %middle.block ]
  %.03858.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %40, %middle.block ]
  %.04057.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %41, %middle.block ]
  %.04256.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %42, %middle.block ]
  %.04455.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %43, %middle.block ]
  %.04654.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %44, %middle.block ]
  %.04853.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %45, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader91, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader91 ]
  %.062 = phi i32 [ %.1, %.lr.ph ], [ %.062.ph, %.lr.ph.preheader91 ]
  %.03261 = phi i32 [ %.133, %.lr.ph ], [ %.03261.ph, %.lr.ph.preheader91 ]
  %.03460 = phi i32 [ %.135, %.lr.ph ], [ %.03460.ph, %.lr.ph.preheader91 ]
  %.03659 = phi i32 [ %.137, %.lr.ph ], [ %.03659.ph, %.lr.ph.preheader91 ]
  %.03858 = phi i32 [ %.139, %.lr.ph ], [ %.03858.ph, %.lr.ph.preheader91 ]
  %.04057 = phi i32 [ %.141, %.lr.ph ], [ %.04057.ph, %.lr.ph.preheader91 ]
  %.04256 = phi i32 [ %.143, %.lr.ph ], [ %.04256.ph, %.lr.ph.preheader91 ]
  %.04455 = phi i32 [ %.145, %.lr.ph ], [ %.04455.ph, %.lr.ph.preheader91 ]
  %.04654 = phi i32 [ %.147, %.lr.ph ], [ %.04654.ph, %.lr.ph.preheader91 ]
  %.04853 = phi i32 [ %spec.select, %.lr.ph ], [ %.04853.ph, %.lr.ph.preheader91 ]
  %46 = getelementptr inbounds [1000 x i8], ptr %1, i64 0, i64 %indvars.iv
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = icmp eq i8 %47, 48
  %49 = zext i1 %48 to i32
  %spec.select = add nuw nsw i32 %.04853, %49
  %50 = icmp eq i8 %47, 49
  %51 = zext i1 %50 to i32
  %.147 = add nuw nsw i32 %.04654, %51
  %52 = icmp eq i8 %47, 50
  %53 = zext i1 %52 to i32
  %.145 = add nuw nsw i32 %.04455, %53
  %54 = icmp eq i8 %47, 51
  %55 = zext i1 %54 to i32
  %.143 = add nuw nsw i32 %.04256, %55
  %56 = icmp eq i8 %47, 52
  %57 = zext i1 %56 to i32
  %.141 = add nuw nsw i32 %.04057, %57
  %58 = icmp eq i8 %47, 53
  %59 = zext i1 %58 to i32
  %.139 = add nuw nsw i32 %.03858, %59
  %60 = icmp eq i8 %47, 54
  %61 = zext i1 %60 to i32
  %.137 = add nuw nsw i32 %.03659, %61
  %62 = icmp eq i8 %47, 55
  %63 = zext i1 %62 to i32
  %.135 = add nuw nsw i32 %.03460, %63
  %64 = icmp eq i8 %47, 56
  %65 = zext i1 %64 to i32
  %.133 = add nuw nsw i32 %.03261, %65
  %66 = icmp eq i8 %47, 57
  %67 = zext i1 %66 to i32
  %.1 = add nuw nsw i32 %.062, %67
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %3
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %.048.lcssa = phi i32 [ 0, %0 ], [ %45, %middle.block ], [ %spec.select, %.lr.ph ]
  %.046.lcssa = phi i32 [ 0, %0 ], [ %44, %middle.block ], [ %.147, %.lr.ph ]
  %.044.lcssa = phi i32 [ 0, %0 ], [ %43, %middle.block ], [ %.145, %.lr.ph ]
  %.042.lcssa = phi i32 [ 0, %0 ], [ %42, %middle.block ], [ %.143, %.lr.ph ]
  %.040.lcssa = phi i32 [ 0, %0 ], [ %41, %middle.block ], [ %.141, %.lr.ph ]
  %.038.lcssa = phi i32 [ 0, %0 ], [ %40, %middle.block ], [ %.139, %.lr.ph ]
  %.036.lcssa = phi i32 [ 0, %0 ], [ %39, %middle.block ], [ %.137, %.lr.ph ]
  %.034.lcssa = phi i32 [ 0, %0 ], [ %38, %middle.block ], [ %.135, %.lr.ph ]
  %.032.lcssa = phi i32 [ 0, %0 ], [ %37, %middle.block ], [ %.133, %.lr.ph ]
  %.0.lcssa = phi i32 [ 0, %0 ], [ %36, %middle.block ], [ %.1, %.lr.ph ]
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.048.lcssa, i32 noundef %.046.lcssa, i32 noundef %.044.lcssa, i32 noundef %.042.lcssa, i32 noundef %.040.lcssa, i32 noundef %.038.lcssa, i32 noundef %.036.lcssa, i32 noundef %.034.lcssa, i32 noundef %.032.lcssa, i32 noundef %.0.lcssa)
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %1) #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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

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 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, !10}


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