; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (4B-BeforeAnExam)

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

36:                                               ; preds = %65, %0
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %68

41:                                               ; preds = %36
  %42 = load ptr, ptr %4, align 8, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %42, i64 %44
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %46, i64 %48
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %45, ptr noundef %49)
  %51 = load ptr, ptr %4, align 8, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = add nsw i32 %56, %55
  store i32 %57, ptr %7, align 4, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %58, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %8, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %41
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !5
  br label %36, !llvm.loop !11

68:                                               ; preds = %40
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %72, label %177

72:                                               ; preds = %68
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = icmp sle i32 %73, %74
  br i1 %75, label %76, label %177

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

77:                                               ; preds = %99, %76
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %102

82:                                               ; preds = %77
  %83 = load ptr, ptr %4, align 8, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = load ptr, ptr %6, align 8, !tbaa !9
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %88, i64 %90
  store i32 %87, ptr %91, align 4, !tbaa !5
  %92 = load ptr, ptr %4, align 8, !tbaa !9
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = sub nsw i32 %97, %96
  store i32 %98, ptr %3, align 4, !tbaa !5
  br label %99

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

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

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

107:                                              ; preds = %103
  store i32 8, ptr %12, align 4
  br label %157

108:                                              ; preds = %103
  %109 = load ptr, ptr %5, align 8, !tbaa !9
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i32, ptr %114, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sub nsw i32 %113, %118
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %122, label %145

122:                                              ; preds = %108
  %123 = load ptr, ptr %5, align 8, !tbaa !9
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load ptr, ptr %6, align 8, !tbaa !9
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %128, i64 %130
  store i32 %127, ptr %131, align 4, !tbaa !5
  %132 = load ptr, ptr %5, align 8, !tbaa !9
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %132, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = load ptr, ptr %4, align 8, !tbaa !9
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = sub nsw i32 %136, %141
  %143 = load i32, ptr %3, align 4, !tbaa !5
  %144 = sub nsw i32 %143, %142
  store i32 %144, ptr %3, align 4, !tbaa !5
  br label %153

145:                                              ; preds = %108
  %146 = load i32, ptr %3, align 4, !tbaa !5
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = add nsw i32 %151, %146
  store i32 %152, ptr %150, align 4, !tbaa !5
  store i32 8, ptr %12, align 4
  br label %157

153:                                              ; preds = %122
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %11, align 4, !tbaa !5
  br label %103, !llvm.loop !14

157:                                              ; preds = %145, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %158

158:                                              ; preds = %157
  %159 = call i32 @puts(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %172, %158
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = load i32, ptr %2, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %175

165:                                              ; preds = %160
  %166 = load ptr, ptr %6, align 8, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %170)
  br label %172

172:                                              ; preds = %165
  %173 = load i32, ptr %13, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %13, align 4, !tbaa !5
  br label %160, !llvm.loop !15

175:                                              ; preds = %164
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %179

177:                                              ; preds = %72, %68
  %178 = call i32 @puts(ptr noundef @.str.4)
  br label %179

179:                                              ; preds = %177, %175
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #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 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %180 = load i32, ptr %1, align 4
  ret i32 %180
}

; 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 @puts(ptr noundef) #2

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}


; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = sext i32 %4 to i64
  %6 = icmp slt i32 %4, 0
  %7 = shl nsw i64 %5, 2
  %8 = select i1 %6, i64 -1, i64 %7
  %9 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #7
  %10 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #7
  %11 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #7
  %12 = icmp sgt i32 %4, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.046.lcssa = phi i32 [ 0, %0 ], [ %28, %.lr.ph ]
  %.045.lcssa = phi i32 [ 0, %0 ], [ %30, %.lr.ph ]
  %.lcssa53 = phi i32 [ %4, %0 ], [ %31, %.lr.ph ]
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp sgt i32 %.046.lcssa, %13
  %.not49 = icmp sgt i32 %13, %.045.lcssa
  %or.cond = select i1 %.not, i1 true, i1 %.not49
  br i1 %or.cond, label %61, label %.preheader51

.preheader51:                                     ; preds = %._crit_edge
  %14 = icmp sgt i32 %.lcssa53, 0
  br i1 %14, label %.lr.ph60.preheader, label %.loopexit

.lr.ph60.preheader:                               ; preds = %.preheader51
  %15 = zext nneg i32 %.lcssa53 to i64
  %16 = shl nuw nsw i64 %15, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %11, ptr nonnull align 4 %9, i64 %16, i1 false), !tbaa !5
  %min.iters.check = icmp ult i32 %.lcssa53, 8
  br i1 %min.iters.check, label %.lr.ph60.preheader107, label %vector.ph

.lr.ph60.preheader107:                            ; preds = %middle.block, %.lr.ph60.preheader
  %indvars.iv77.ph = phi i64 [ 0, %.lr.ph60.preheader ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %13, %.lr.ph60.preheader ], [ %23, %middle.block ]
  br label %.lr.ph60

vector.ph:                                        ; preds = %.lr.ph60.preheader
  %n.vec = and i64 %15, 2147483640
  %17 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %13, i64 0
  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> [ %17, %vector.ph ], [ %20, %vector.body ]
  %vec.phi102 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %21, %vector.body ]
  %18 = getelementptr inbounds i32, ptr %9, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  %wide.load = load <4 x i32>, ptr %18, align 4, !tbaa !5
  %wide.load103 = load <4 x i32>, ptr %19, align 4, !tbaa !5
  %20 = sub <4 x i32> %vec.phi, %wide.load
  %21 = sub <4 x i32> %vec.phi102, %wide.load103
  %index.next = add nuw i64 %index, 8
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %21, %20
  %23 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %15
  br i1 %cmp.n, label %.preheader, label %.lr.ph60.preheader107

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %.04555 = phi i32 [ %30, %.lr.ph ], [ 0, %0 ]
  %.04654 = phi i32 [ %28, %.lr.ph ], [ 0, %0 ]
  %24 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv
  %25 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %24, ptr noundef nonnull %25)
  %27 = load i32, ptr %24, align 4, !tbaa !5
  %28 = add nsw i32 %27, %.04654
  %29 = load i32, ptr %25, align 4, !tbaa !5
  %30 = add nsw i32 %29, %.04555
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph60, %middle.block
  %.lcssa98 = phi i32 [ %23, %middle.block ], [ %37, %.lr.ph60 ]
  store i32 %.lcssa98, ptr %2, align 4, !tbaa !5
  br i1 %14, label %.lr.ph64.preheader, label %.loopexit

.lr.ph64.preheader:                               ; preds = %.preheader
  %wide.trip.count83 = zext nneg i32 %.lcssa53 to i64
  br label %.lr.ph64

.lr.ph60:                                         ; preds = %.lr.ph60.preheader107, %.lr.ph60
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.lr.ph60 ], [ %indvars.iv77.ph, %.lr.ph60.preheader107 ]
  %34 = phi i32 [ %37, %.lr.ph60 ], [ %.ph, %.lr.ph60.preheader107 ]
  %35 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv77
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sub nsw i32 %34, %36
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next78, %15
  br i1 %exitcond.not, label %.preheader, label %.lr.ph60, !llvm.loop !14

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %46
  %indvars.iv80 = phi i64 [ 0, %.lr.ph64.preheader ], [ %indvars.iv.next81, %46 ]
  %38 = phi i32 [ %.lcssa98, %.lr.ph64.preheader ], [ %47, %46 ]
  %39 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv80
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv80
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sub nsw i32 %40, %42
  %44 = icmp slt i32 %43, %38
  %45 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv80
  br i1 %44, label %46, label %48

46:                                               ; preds = %.lr.ph64
  store i32 %40, ptr %45, align 4, !tbaa !5
  %.neg = sub i32 %42, %40
  %47 = add i32 %.neg, %38
  store i32 %47, ptr %2, align 4, !tbaa !5
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %.loopexit, label %.lr.ph64, !llvm.loop !15

48:                                               ; preds = %.lr.ph64
  %49 = load i32, ptr %45, align 4, !tbaa !5
  %50 = add nsw i32 %49, %38
  store i32 %50, ptr %45, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %46, %.preheader51, %.preheader, %48
  %51 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph67, label %._crit_edge68

._crit_edge68:                                    ; preds = %.lr.ph67, %.loopexit
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %63

.lr.ph67:                                         ; preds = %.loopexit, %.lr.ph67
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %.lr.ph67 ], [ 0, %.loopexit ]
  %55 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv85
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %56)
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next86, %59
  br i1 %60, label %.lr.ph67, label %._crit_edge68, !llvm.loop !16

61:                                               ; preds = %._crit_edge
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %63

63:                                               ; preds = %61, %._crit_edge68
  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
}

; 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

; 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) #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: readwrite) }
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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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