; LLVM IR from DionysiosB/CodeForces :: 0100-0199 (157A-GameOutcome)

; 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 [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 ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %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
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = mul nsw i32 %16, %17
  %19 = sext i32 %18 to i64
  %20 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %19, i64 4)
  %21 = extractvalue { i64, i1 } %20, 1
  %22 = extractvalue { i64, i1 } %20, 0
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #6
  store ptr %24, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %26, i64 4)
  %28 = extractvalue { i64, i1 } %27, 1
  %29 = extractvalue { i64, i1 } %27, 0
  %30 = select i1 %28, i64 -1, i64 %29
  %31 = call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #6
  store ptr %31, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %33, i64 4)
  %35 = extractvalue { i64, i1 } %34, 1
  %36 = extractvalue { i64, i1 } %34, 0
  %37 = select i1 %35, i64 -1, i64 %36
  %38 = call noalias noundef nonnull ptr @_Znam(i64 noundef %37) #6
  store ptr %38, 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
  br label %39

39:                                               ; preds = %52, %0
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = mul nsw i32 %41, %42
  %44 = icmp slt i32 %40, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %39
  %47 = load ptr, ptr %3, align 8, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %50)
  br label %52

52:                                               ; preds = %46
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %6, align 4, !tbaa !5
  br label %39, !llvm.loop !11

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

56:                                               ; preds = %70, %55
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %73

61:                                               ; preds = %56
  %62 = load ptr, ptr %4, align 8, !tbaa !9
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %62, i64 %64
  store i32 0, ptr %65, align 4, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %66, i64 %68
  store i32 0, ptr %69, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %61
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !5
  br label %56, !llvm.loop !13

73:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %130, %73
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %133

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %101, %79
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

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

85:                                               ; preds = %80
  %86 = load ptr, ptr %3, align 8, !tbaa !9
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr %2, align 4, !tbaa !5
  %89 = mul nsw i32 %87, %88
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %86, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load ptr, ptr %4, align 8, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %95, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %94
  store i32 %100, ptr %98, align 4, !tbaa !5
  br label %101

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

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

105:                                              ; preds = %126, %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %129

110:                                              ; preds = %105
  %111 = load ptr, ptr %3, align 8, !tbaa !9
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = mul nsw i32 %112, %113
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = add nsw i32 %114, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %111, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = load ptr, ptr %5, align 8, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %120, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add nsw i32 %124, %119
  store i32 %125, ptr %123, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %110
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %11, align 4, !tbaa !5
  br label %105, !llvm.loop !15

129:                                              ; preds = %109
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %8, align 4, !tbaa !5
  br label %74, !llvm.loop !16

133:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %165, %133
  %135 = load i32, ptr %13, align 4, !tbaa !5
  %136 = load i32, ptr %2, align 4, !tbaa !5
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %168

139:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %161, %139
  %141 = load i32, ptr %14, align 4, !tbaa !5
  %142 = load i32, ptr %2, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %164

145:                                              ; preds = %140
  %146 = load ptr, ptr %5, align 8, !tbaa !9
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %146, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = load ptr, ptr %4, align 8, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = icmp sgt i32 %150, %155
  br i1 %156, label %157, label %160

157:                                              ; preds = %145
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %12, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %157, %145
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %14, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %14, align 4, !tbaa !5
  br label %140, !llvm.loop !17

164:                                              ; preds = %144
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %13, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %13, align 4, !tbaa !5
  br label %134, !llvm.loop !18

168:                                              ; preds = %138
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %169)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %171 = load i32, ptr %1, align 4
  ret i32 %171
}

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; 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 [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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = mul nsw i32 %3, %3
  %5 = zext nneg i32 %4 to i64
  %6 = shl nuw nsw i64 %5, 2
  %7 = call noalias noundef nonnull ptr @_Znam(i64 noundef %6) #7
  %8 = sext i32 %3 to i64
  %9 = icmp slt i32 %3, 0
  %10 = shl nsw i64 %8, 2
  %11 = select i1 %9, i64 -1, i64 %10
  %12 = call noalias noundef nonnull ptr @_Znam(i64 noundef %11) #7
  %13 = call noalias noundef nonnull ptr @_Znam(i64 noundef %11) #7
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %._crit_edge69, label %.lr.ph

.preheader49:                                     ; preds = %.lr.ph
  %14 = icmp sgt i32 %17, 0
  br i1 %14, label %.preheader47.us.us.preheader, label %._crit_edge69

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %15 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = mul nsw i32 %17, %17
  %19 = zext nneg i32 %18 to i64
  %20 = icmp ult i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %.preheader49, !llvm.loop !9

.preheader47.us.us.preheader:                     ; preds = %.preheader49
  %21 = zext nneg i32 %17 to i64
  %22 = shl nuw nsw i64 %21, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %12, i8 0, i64 %22, i1 false), !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %13, i8 0, i64 %22, i1 false), !tbaa !5
  %23 = zext nneg i32 %17 to i64
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i32 %17, 1
  %unroll_iter = and i64 %23, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %min.iters.check = icmp ult i32 %17, 8
  %n.vec = and i64 %23, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %23
  br label %.preheader47.us.us

.preheader47.us.us:                               ; preds = %.preheader47.us.us.preheader, %._crit_edge.us.us
  %indvars.iv84 = phi i64 [ 0, %.preheader47.us.us.preheader ], [ %indvars.iv.next85, %._crit_edge.us.us ]
  %invariant.gep = getelementptr inbounds i32, ptr %7, i64 %indvars.iv84
  br i1 %24, label %..preheader46_crit_edge.us.us.unr-lcssa, label %.preheader47.us.us.new

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %scalar.ph ], [ %indvars.iv79.ph, %scalar.ph.preheader ]
  %gep105 = getelementptr inbounds i32, ptr %invariant.gep104, i64 %indvars.iv79
  %25 = load i32, ptr %gep105, align 4, !tbaa !5
  %26 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv79
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %27, %25
  store i32 %28, ptr %26, align 4, !tbaa !5
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %23
  br i1 %exitcond83.not, label %._crit_edge.us.us, label %scalar.ph, !llvm.loop !11

.preheader47.us.us.new:                           ; preds = %.preheader47.us.us, %.preheader47.us.us.new
  %indvars.iv76 = phi i64 [ %indvars.iv.next77.1, %.preheader47.us.us.new ], [ 0, %.preheader47.us.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader47.us.us.new ], [ 0, %.preheader47.us.us ]
  %29 = mul nuw nsw i64 %indvars.iv76, %23
  %gep = getelementptr inbounds i32, ptr %invariant.gep, i64 %29
  %30 = load i32, ptr %gep, align 4, !tbaa !5
  %31 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv76
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, %30
  store i32 %33, ptr %31, align 4, !tbaa !5
  %indvars.iv.next77 = or disjoint i64 %indvars.iv76, 1
  %34 = mul nuw nsw i64 %indvars.iv.next77, %23
  %gep.1 = getelementptr inbounds i32, ptr %invariant.gep, i64 %34
  %35 = load i32, ptr %gep.1, align 4, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv.next77
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, %35
  store i32 %38, ptr %36, align 4, !tbaa !5
  %indvars.iv.next77.1 = add nuw nsw i64 %indvars.iv76, 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 %..preheader46_crit_edge.us.us.unr-lcssa, label %.preheader47.us.us.new, !llvm.loop !14

..preheader46_crit_edge.us.us.unr-lcssa:          ; preds = %.preheader47.us.us.new, %.preheader47.us.us
  %indvars.iv76.unr = phi i64 [ 0, %.preheader47.us.us ], [ %indvars.iv.next77.1, %.preheader47.us.us.new ]
  br i1 %lcmp.mod.not, label %..preheader46_crit_edge.us.us, label %..preheader46_crit_edge.us.us.epilog-lcssa

..preheader46_crit_edge.us.us.epilog-lcssa:       ; preds = %..preheader46_crit_edge.us.us.unr-lcssa
  %39 = mul nuw nsw i64 %indvars.iv76.unr, %23
  %gep.epil = getelementptr inbounds i32, ptr %invariant.gep, i64 %39
  %40 = load i32, ptr %gep.epil, align 4, !tbaa !5
  %41 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv76.unr
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, %40
  store i32 %43, ptr %41, align 4, !tbaa !5
  br label %..preheader46_crit_edge.us.us

..preheader46_crit_edge.us.us:                    ; preds = %..preheader46_crit_edge.us.us.unr-lcssa, %..preheader46_crit_edge.us.us.epilog-lcssa
  %44 = mul nuw nsw i64 %indvars.iv84, %23
  %invariant.gep104 = getelementptr inbounds i32, ptr %7, i64 %44
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %..preheader46_crit_edge.us.us
  %indvars.iv79.ph = phi i64 [ 0, %..preheader46_crit_edge.us.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %..preheader46_crit_edge.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %..preheader46_crit_edge.us.us ]
  %45 = getelementptr inbounds i32, ptr %invariant.gep104, i64 %index
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %wide.load = load <4 x i32>, ptr %45, align 4, !tbaa !5
  %wide.load106 = load <4 x i32>, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds i32, ptr %13, i64 %index
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %wide.load107 = load <4 x i32>, ptr %47, align 4, !tbaa !5
  %wide.load108 = load <4 x i32>, ptr %48, align 4, !tbaa !5
  %49 = add nsw <4 x i32> %wide.load107, %wide.load
  %50 = add nsw <4 x i32> %wide.load108, %wide.load106
  store <4 x i32> %49, ptr %47, align 4, !tbaa !5
  store <4 x i32> %50, ptr %48, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us, label %scalar.ph.preheader

._crit_edge.us.us:                                ; preds = %scalar.ph, %middle.block
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %23
  br i1 %exitcond88.not, label %.preheader45, label %.preheader47.us.us, !llvm.loop !16

.preheader45:                                     ; preds = %._crit_edge.us.us
  br i1 %14, label %.preheader.us.preheader, label %._crit_edge69

.preheader.us.preheader:                          ; preds = %.preheader45
  %wide.trip.count97 = zext nneg i32 %17 to i64
  %min.iters.check111 = icmp ult i32 %17, 8
  %n.vec114 = and i64 %23, 2147483640
  %cmp.n122 = icmp eq i64 %n.vec114, %23
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv94 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next95, %._crit_edge.us ]
  %.03767.us = phi i32 [ 0, %.preheader.us.preheader ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  %52 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv94
  %53 = load i32, ptr %52, align 4, !tbaa !5
  br i1 %min.iters.check111, label %scalar.ph110.preheader, label %vector.ph112

vector.ph112:                                     ; preds = %.preheader.us
  %54 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.03767.us, i64 0
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %53, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body116

vector.body116:                                   ; preds = %vector.body116, %vector.ph112
  %index117 = phi i64 [ 0, %vector.ph112 ], [ %index.next121, %vector.body116 ]
  %vec.phi = phi <4 x i32> [ %54, %vector.ph112 ], [ %61, %vector.body116 ]
  %vec.phi118 = phi <4 x i32> [ zeroinitializer, %vector.ph112 ], [ %62, %vector.body116 ]
  %55 = getelementptr inbounds i32, ptr %13, i64 %index117
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load119 = load <4 x i32>, ptr %55, align 4, !tbaa !5
  %wide.load120 = load <4 x i32>, ptr %56, align 4, !tbaa !5
  %57 = icmp sgt <4 x i32> %wide.load119, %broadcast.splat
  %58 = icmp sgt <4 x i32> %wide.load120, %broadcast.splat
  %59 = zext <4 x i1> %57 to <4 x i32>
  %60 = zext <4 x i1> %58 to <4 x i32>
  %61 = add <4 x i32> %vec.phi, %59
  %62 = add <4 x i32> %vec.phi118, %60
  %index.next121 = add nuw i64 %index117, 8
  %63 = icmp eq i64 %index.next121, %n.vec114
  br i1 %63, label %middle.block109, label %vector.body116, !llvm.loop !17

middle.block109:                                  ; preds = %vector.body116
  %bin.rdx = add <4 x i32> %62, %61
  %64 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n122, label %._crit_edge.us, label %scalar.ph110.preheader

scalar.ph110.preheader:                           ; preds = %middle.block109, %.preheader.us
  %indvars.iv89.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec114, %middle.block109 ]
  %.163.us.ph = phi i32 [ %.03767.us, %.preheader.us ], [ %64, %middle.block109 ]
  br label %scalar.ph110

scalar.ph110:                                     ; preds = %scalar.ph110.preheader, %scalar.ph110
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %scalar.ph110 ], [ %indvars.iv89.ph, %scalar.ph110.preheader ]
  %.163.us = phi i32 [ %spec.select.us, %scalar.ph110 ], [ %.163.us.ph, %scalar.ph110.preheader ]
  %65 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv89
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, %53
  %68 = zext i1 %67 to i32
  %spec.select.us = add nsw i32 %.163.us, %68
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count97
  br i1 %exitcond93.not, label %._crit_edge.us, label %scalar.ph110, !llvm.loop !18

._crit_edge.us:                                   ; preds = %scalar.ph110, %middle.block109
  %spec.select.us.lcssa = phi i32 [ %64, %middle.block109 ], [ %spec.select.us, %scalar.ph110 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge69, label %.preheader.us, !llvm.loop !19

._crit_edge69:                                    ; preds = %._crit_edge.us, %.preheader49, %0, %.preheader45
  %.037.lcssa = phi i32 [ 0, %.preheader45 ], [ 0, %0 ], [ 0, %.preheader49 ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.037.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  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: 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !13, !12}
!18 = distinct !{!18, !10, !12, !13}
!19 = distinct !{!19, !10}


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