; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (330A-Cakeminator)

; 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %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
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #5
  store ptr %19, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %30, %0
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr %26, i64 %28
  store i8 1, ptr %29, align 1, !tbaa !11
  br label %30

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

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = call noalias noundef nonnull ptr @_Znam(i64 noundef %35) #5
  store ptr %36, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %47, %33
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %50

42:                                               ; preds = %37
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %43, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !11
  br label %47

47:                                               ; preds = %42
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %7, align 4, !tbaa !5
  br label %37, !llvm.loop !15

50:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %82, %50
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %85

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %77, %56
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  %63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %8)
  %64 = load i8, ptr %8, align 1, !tbaa !16
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 83
  br i1 %66, label %67, label %76

67:                                               ; preds = %62
  %68 = load ptr, ptr %4, align 8, !tbaa !9
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i8, ptr %68, i64 %70
  store i8 0, ptr %71, align 1, !tbaa !11
  %72 = load ptr, ptr %6, align 8, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %72, i64 %74
  store i8 0, ptr %75, align 1, !tbaa !11
  br label %76

76:                                               ; preds = %67, %62
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %11, align 4, !tbaa !5
  br label %57, !llvm.loop !17

80:                                               ; preds = %61
  %81 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2)
  br label %82

82:                                               ; preds = %80
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %9, align 4, !tbaa !5
  br label %51, !llvm.loop !18

85:                                               ; preds = %55
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %102, %85
  %87 = load i32, ptr %14, align 4, !tbaa !5
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %105

91:                                               ; preds = %86
  %92 = load ptr, ptr %4, align 8, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %92, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !11, !range !19, !noundef !20
  %97 = trunc i8 %96 to i1
  br i1 %97, label %98, label %101

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

101:                                              ; preds = %98, %91
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %14, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %14, align 4, !tbaa !5
  br label %86, !llvm.loop !21

105:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %122, %105
  %107 = load i32, ptr %15, align 4, !tbaa !5
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %125

111:                                              ; preds = %106
  %112 = load ptr, ptr %6, align 8, !tbaa !9
  %113 = load i32, ptr %15, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %112, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !11, !range !19, !noundef !20
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %121

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

121:                                              ; preds = %118, %111
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %15, align 4, !tbaa !5
  br label %106, !llvm.loop !22

125:                                              ; preds = %110
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = mul nsw i32 %126, %127
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = mul nsw i32 %129, %130
  %132 = add nsw i32 %128, %131
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = mul nsw i32 %133, %134
  %136 = sub nsw i32 %132, %135
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %136)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  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 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %138 = load i32, ptr %1, align 4
  ret i32 %138
}

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

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

attributes #0 = { mustprogress norecurse 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 = { nobuiltin allocsize(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 }
attributes #5 = { builtin allocsize(0) }

!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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = call noalias noundef nonnull ptr @_Znam(i64 noundef %6) #7
  %8 = icmp sgt i32 %5, 0
  br i1 %8, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %9 = zext nneg i32 %5 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %7, i8 1, i64 %9, i1 false), !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = call noalias noundef nonnull ptr @_Znam(i64 noundef %11) #7
  %13 = icmp sgt i32 %10, 0
  br i1 %13, label %.lr.ph46.preheader, label %._crit_edge47

.lr.ph46.preheader:                               ; preds = %._crit_edge
  %14 = zext nneg i32 %10 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %12, i8 1, i64 %14, i1 false), !tbaa !9
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %.lr.ph46.preheader, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  br i1 %8, label %.preheader41, label %.preheader

.preheader41:                                     ; preds = %._crit_edge47, %._crit_edge50
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %._crit_edge50 ], [ 0, %._crit_edge47 ]
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %.preheader41
  %17 = getelementptr inbounds i8, ptr %7, i64 %indvars.iv65
  br label %31

.preheader40:                                     ; preds = %._crit_edge50
  %18 = icmp sgt i32 %28, 0
  br i1 %18, label %.lr.ph54.preheader, label %.preheader

.lr.ph54.preheader:                               ; preds = %.preheader40
  %wide.trip.count = zext nneg i32 %28 to i64
  %min.iters.check = icmp ult i32 %28, 8
  br i1 %min.iters.check, label %.lr.ph54.preheader99, label %vector.ph

.lr.ph54.preheader99:                             ; preds = %middle.block, %.lr.ph54.preheader
  %indvars.iv68.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %n.vec, %middle.block ]
  %.03252.ph = phi i32 [ 0, %.lr.ph54.preheader ], [ %26, %middle.block ]
  br label %.lr.ph54

vector.ph:                                        ; preds = %.lr.ph54.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  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 ], [ %23, %vector.body ]
  %vec.phi78 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %24, %vector.body ]
  %19 = getelementptr inbounds i8, ptr %7, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  %wide.load = load <4 x i8>, ptr %19, align 1, !tbaa !9
  %wide.load79 = load <4 x i8>, ptr %20, align 1, !tbaa !9
  %21 = zext <4 x i8> %wide.load to <4 x i32>
  %22 = zext <4 x i8> %wide.load79 to <4 x i32>
  %23 = add <4 x i32> %vec.phi, %21
  %24 = add <4 x i32> %vec.phi78, %22
  %index.next = add nuw i64 %index, 8
  %25 = icmp eq i64 %index.next, %n.vec
  br i1 %25, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %24, %23
  %26 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %.lr.ph54.preheader99

._crit_edge50:                                    ; preds = %37, %.preheader41
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2)
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next66, %29
  br i1 %30, label %.preheader41, label %.preheader40, !llvm.loop !15

31:                                               ; preds = %.lr.ph49, %37
  %indvars.iv = phi i64 [ 0, %.lr.ph49 ], [ %indvars.iv.next, %37 ]
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %33 = load i8, ptr %3, align 1, !tbaa !16
  %34 = icmp eq i8 %33, 83
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  store i8 0, ptr %17, align 1, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv
  store i8 0, ptr %36, align 1, !tbaa !9
  br label %37

37:                                               ; preds = %31, %35
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next, %39
  br i1 %40, label %31, label %._crit_edge50, !llvm.loop !17

.preheader:                                       ; preds = %.lr.ph54, %middle.block, %._crit_edge47, %.preheader40
  %.lcssa4277 = phi i32 [ %28, %.preheader40 ], [ %5, %._crit_edge47 ], [ %28, %middle.block ], [ %28, %.lr.ph54 ]
  %.032.lcssa = phi i32 [ 0, %.preheader40 ], [ 0, %._crit_edge47 ], [ %26, %middle.block ], [ %spec.select, %.lr.ph54 ]
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph58.preheader, label %._crit_edge59

.lr.ph58.preheader:                               ; preds = %.preheader
  %wide.trip.count74 = zext nneg i32 %41 to i64
  %min.iters.check82 = icmp ult i32 %41, 8
  br i1 %min.iters.check82, label %.lr.ph58.preheader97, label %vector.ph83

.lr.ph58.preheader97:                             ; preds = %middle.block80, %.lr.ph58.preheader
  %indvars.iv71.ph = phi i64 [ 0, %.lr.ph58.preheader ], [ %n.vec85, %middle.block80 ]
  %.03156.ph = phi i32 [ 0, %.lr.ph58.preheader ], [ %50, %middle.block80 ]
  br label %.lr.ph58

vector.ph83:                                      ; preds = %.lr.ph58.preheader
  %n.vec85 = and i64 %wide.trip.count74, 2147483640
  br label %vector.body87

vector.body87:                                    ; preds = %vector.body87, %vector.ph83
  %index88 = phi i64 [ 0, %vector.ph83 ], [ %index.next93, %vector.body87 ]
  %vec.phi89 = phi <4 x i32> [ zeroinitializer, %vector.ph83 ], [ %47, %vector.body87 ]
  %vec.phi90 = phi <4 x i32> [ zeroinitializer, %vector.ph83 ], [ %48, %vector.body87 ]
  %43 = getelementptr inbounds i8, ptr %12, i64 %index88
  %44 = getelementptr inbounds i8, ptr %43, i64 4
  %wide.load91 = load <4 x i8>, ptr %43, align 1, !tbaa !9
  %wide.load92 = load <4 x i8>, ptr %44, align 1, !tbaa !9
  %45 = zext <4 x i8> %wide.load91 to <4 x i32>
  %46 = zext <4 x i8> %wide.load92 to <4 x i32>
  %47 = add <4 x i32> %vec.phi89, %45
  %48 = add <4 x i32> %vec.phi90, %46
  %index.next93 = add nuw i64 %index88, 8
  %49 = icmp eq i64 %index.next93, %n.vec85
  br i1 %49, label %middle.block80, label %vector.body87, !llvm.loop !18

middle.block80:                                   ; preds = %vector.body87
  %bin.rdx94 = add <4 x i32> %48, %47
  %50 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx94)
  %cmp.n95 = icmp eq i64 %n.vec85, %wide.trip.count74
  br i1 %cmp.n95, label %._crit_edge59, label %.lr.ph58.preheader97

.lr.ph54:                                         ; preds = %.lr.ph54.preheader99, %.lr.ph54
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph54 ], [ %indvars.iv68.ph, %.lr.ph54.preheader99 ]
  %.03252 = phi i32 [ %spec.select, %.lr.ph54 ], [ %.03252.ph, %.lr.ph54.preheader99 ]
  %51 = getelementptr inbounds i8, ptr %7, i64 %indvars.iv68
  %52 = load i8, ptr %51, align 1, !tbaa !9, !range !19, !noundef !20
  %53 = zext nneg i8 %52 to i32
  %spec.select = add nuw nsw i32 %.03252, %53
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph54, !llvm.loop !21

._crit_edge59:                                    ; preds = %.lr.ph58, %middle.block80, %.preheader
  %.031.lcssa = phi i32 [ 0, %.preheader ], [ %50, %middle.block80 ], [ %spec.select39, %.lr.ph58 ]
  %54 = mul nsw i32 %.031.lcssa, %.lcssa4277
  %reass.add = sub i32 %41, %.031.lcssa
  %reass.mul = mul i32 %reass.add, %.032.lcssa
  %55 = add i32 %reass.mul, %54
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %55)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph58:                                         ; preds = %.lr.ph58.preheader97, %.lr.ph58
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %.lr.ph58 ], [ %indvars.iv71.ph, %.lr.ph58.preheader97 ]
  %.03156 = phi i32 [ %spec.select39, %.lr.ph58 ], [ %.03156.ph, %.lr.ph58.preheader97 ]
  %57 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv71
  %58 = load i8, ptr %57, align 1, !tbaa !9, !range !19, !noundef !20
  %59 = zext nneg i8 %58 to i32
  %spec.select39 = add nuw nsw i32 %.03156, %59
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !22
}

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress norecurse 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 = { nobuiltin allocsize(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 nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !13, !14}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !12, !14, !13}
!22 = distinct !{!22, !12, !14, !13}


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