; LLVM IR from tangjz/acm-icpc :: codeforces (1191B)

; 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 [257 x i32], align 16
  %3 = alloca [3 x [9 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [3 x i8], align 1
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1028, ptr %2) #5
  call void @llvm.memset.p0.i64(ptr align 16 %2, i8 0, i64 1028, i1 false)
  call void @llvm.lifetime.start.p0(i64 108, ptr %3) #5
  call void @llvm.memset.p0.i64(ptr align 16 %3, i8 0, i64 108, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 2, ptr %4, align 4, !tbaa !5
  %12 = getelementptr inbounds [257 x i32], ptr %2, i64 0, i64 109
  store i32 1, ptr %12, align 4, !tbaa !5
  %13 = getelementptr inbounds [257 x i32], ptr %2, i64 0, i64 112
  store i32 2, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds [257 x i32], ptr %2, i64 0, i64 115
  store i32 3, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %38, %0
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 3
  br i1 %17, label %19, label %18

18:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %41

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 3, ptr %6) #5
  %20 = getelementptr inbounds [3 x i8], ptr %6, i64 0, i64 0
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %20)
  %22 = getelementptr inbounds [3 x i8], ptr %6, i64 0, i64 1
  %23 = load i8, ptr %22, align 1, !tbaa !9
  %24 = sext i8 %23 to i64
  %25 = getelementptr inbounds [257 x i32], ptr %2, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [3 x [9 x i32]], ptr %3, i64 0, i64 %28
  %30 = getelementptr inbounds [3 x i8], ptr %6, i64 0, i64 0
  %31 = load i8, ptr %30, align 1, !tbaa !9
  %32 = sext i8 %31 to i32
  %33 = sub nsw i32 %32, 49
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [9 x i32], ptr %29, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 3, ptr %6) #5
  br label %38

38:                                               ; preds = %19
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %5, align 4, !tbaa !5
  br label %15, !llvm.loop !10

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

42:                                               ; preds = %111, %41
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 3
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %114

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %107, %46
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 9
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [3 x [9 x i32]], ptr %3, i64 0, i64 %53
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [9 x i32], ptr %54, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sub nsw i32 3, %58
  store i32 %59, ptr %10, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = add nsw i32 %62, 2
  %64 = icmp slt i32 %63, 9
  br i1 %64, label %65, label %106

65:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3 x [9 x i32]], ptr %3, i64 0, i64 %67
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [9 x i32], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  %74 = xor i1 %73, true
  %75 = xor i1 %74, true
  %76 = zext i1 %75 to i32
  %77 = sub nsw i32 3, %76
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [3 x [9 x i32]], ptr %3, i64 0, i64 %79
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [9 x i32], ptr %80, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  %87 = xor i1 %86, true
  %88 = xor i1 %87, true
  %89 = zext i1 %88 to i32
  %90 = sub nsw i32 %77, %89
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [3 x [9 x i32]], ptr %3, i64 0, i64 %92
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = add nsw i32 %94, 2
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [9 x i32], ptr %93, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = icmp ne i32 %98, 0
  %100 = xor i1 %99, true
  %101 = xor i1 %100, true
  %102 = zext i1 %101 to i32
  %103 = sub nsw i32 %90, %102
  store i32 %103, ptr %11, align 4, !tbaa !5
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %106

106:                                              ; preds = %65, %51
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %9, align 4, !tbaa !5
  br label %47, !llvm.loop !12

110:                                              ; preds = %50
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !5
  br label %42, !llvm.loop !13

114:                                              ; preds = %45
  %115 = load i32, ptr %4, align 4, !tbaa !5
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %115)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 108, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1028, ptr %2) #5
  %117 = load i32, ptr %1, align 4
  ret i32 %117
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #5 = { nounwind }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; 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 nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader.preheader:
  %0 = alloca [257 x i32], align 16
  %1 = alloca [3 x [9 x i32]], align 16
  %2 = alloca i32, align 4
  %3 = alloca [3 x i8], align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1028, ptr nonnull %0) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1028) %0, i8 0, i64 1028, i1 false)
  call void @llvm.lifetime.start.p0(i64 108, ptr nonnull %1) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(108) %1, i8 0, i64 108, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 2, ptr %2, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 436
  store i32 1, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 448
  store i32 2, ptr %7, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 460
  store i32 3, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %3, i64 1
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %3) #5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %11 = load i8, ptr %9, align 1, !tbaa !9
  %12 = sext i8 %11 to i64
  %13 = getelementptr inbounds [257 x i32], ptr %0, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  %16 = sext i32 %15 to i64
  %17 = load i8, ptr %3, align 1, !tbaa !9
  %18 = sext i8 %17 to i64
  %19 = add nsw i64 %18, -49
  %20 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %16, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %3) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %24 = load i8, ptr %9, align 1, !tbaa !9
  %25 = sext i8 %24 to i64
  %26 = getelementptr inbounds [257 x i32], ptr %0, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  %29 = sext i32 %28 to i64
  %30 = load i8, ptr %3, align 1, !tbaa !9
  %31 = sext i8 %30 to i64
  %32 = add nsw i64 %31, -49
  %33 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %29, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %3) #5
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %37 = load i8, ptr %9, align 1, !tbaa !9
  %38 = sext i8 %37 to i64
  %39 = getelementptr inbounds [257 x i32], ptr %0, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, -1
  %42 = sext i32 %41 to i64
  %43 = load i8, ptr %3, align 1, !tbaa !9
  %44 = sext i8 %43 to i64
  %45 = add nsw i64 %44, -49
  %46 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %42, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %3) #5
  br label %51

49:                                               ; preds = %51
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %157)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 108, ptr nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 1028, ptr nonnull %0) #5
  ret i32 0

51:                                               ; preds = %51, %.preheader.preheader
  %indvars.iv = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next, %51 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %52 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sub nsw i32 3, %53
  store i32 %54, ptr %4, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not = icmp eq i32 %53, 0
  %57 = select i1 %.not, i32 3, i32 2
  %58 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 1
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = icmp ne i32 %59, 0
  %.neg = sext i1 %60 to i32
  %61 = add nsw i32 %57, %.neg
  %62 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 2
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp ne i32 %63, 0
  %.neg19 = sext i1 %64 to i32
  %65 = add nsw i32 %61, %.neg19
  store i32 %65, ptr %5, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %68 = sub nsw i32 3, %59
  store i32 %68, ptr %4, align 4, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %70 = load i32, ptr %69, align 4, !tbaa !5
  store i32 %70, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.1 = icmp eq i32 %59, 0
  %71 = select i1 %.not.1, i32 3, i32 2
  %72 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 2
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp ne i32 %73, 0
  %.neg.1 = sext i1 %74 to i32
  %75 = add nsw i32 %71, %.neg.1
  %76 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 3
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  %.neg19.1 = sext i1 %78 to i32
  %79 = add nsw i32 %75, %.neg19.1
  store i32 %79, ptr %5, align 4, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %82 = sub nsw i32 3, %73
  store i32 %82, ptr %4, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.2 = icmp eq i32 %73, 0
  %85 = select i1 %.not.2, i32 3, i32 2
  %86 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 3
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  %.neg.2 = sext i1 %88 to i32
  %89 = add nsw i32 %85, %.neg.2
  %90 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  %.neg19.2 = sext i1 %92 to i32
  %93 = add nsw i32 %89, %.neg19.2
  store i32 %93, ptr %5, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %95 = load i32, ptr %94, align 4, !tbaa !5
  store i32 %95, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %96 = sub nsw i32 3, %87
  store i32 %96, ptr %4, align 4, !tbaa !5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %98 = load i32, ptr %97, align 4, !tbaa !5
  store i32 %98, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.3 = icmp eq i32 %87, 0
  %99 = select i1 %.not.3, i32 3, i32 2
  %100 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 4
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  %.neg.3 = sext i1 %102 to i32
  %103 = add nsw i32 %99, %.neg.3
  %104 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 5
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  %.neg19.3 = sext i1 %106 to i32
  %107 = add nsw i32 %103, %.neg19.3
  store i32 %107, ptr %5, align 4, !tbaa !5
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %109 = load i32, ptr %108, align 4, !tbaa !5
  store i32 %109, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %110 = sub nsw i32 3, %101
  store i32 %110, ptr %4, align 4, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.4 = icmp eq i32 %101, 0
  %113 = select i1 %.not.4, i32 3, i32 2
  %114 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 5
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp ne i32 %115, 0
  %.neg.4 = sext i1 %116 to i32
  %117 = add nsw i32 %113, %.neg.4
  %118 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 6
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = icmp ne i32 %119, 0
  %.neg19.4 = sext i1 %120 to i32
  %121 = add nsw i32 %117, %.neg19.4
  store i32 %121, ptr %5, align 4, !tbaa !5
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %123 = load i32, ptr %122, align 4, !tbaa !5
  store i32 %123, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %124 = sub nsw i32 3, %115
  store i32 %124, ptr %4, align 4, !tbaa !5
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %126 = load i32, ptr %125, align 4, !tbaa !5
  store i32 %126, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.5 = icmp eq i32 %115, 0
  %127 = select i1 %.not.5, i32 3, i32 2
  %128 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 6
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp ne i32 %129, 0
  %.neg.5 = sext i1 %130 to i32
  %131 = add nsw i32 %127, %.neg.5
  %132 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 7
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  %.neg19.5 = sext i1 %134 to i32
  %135 = add nsw i32 %131, %.neg19.5
  store i32 %135, ptr %5, align 4, !tbaa !5
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %137 = load i32, ptr %136, align 4, !tbaa !5
  store i32 %137, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %138 = sub nsw i32 3, %129
  store i32 %138, ptr %4, align 4, !tbaa !5
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %.not.6 = icmp eq i32 %129, 0
  %141 = select i1 %.not.6, i32 3, i32 2
  %142 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 7
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = icmp ne i32 %143, 0
  %.neg.6 = sext i1 %144 to i32
  %145 = add nsw i32 %141, %.neg.6
  %146 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 8
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = icmp ne i32 %147, 0
  %.neg19.6 = sext i1 %148 to i32
  %149 = add nsw i32 %145, %.neg19.6
  store i32 %149, ptr %5, align 4, !tbaa !5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %151 = load i32, ptr %150, align 4, !tbaa !5
  store i32 %151, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %152 = sub nsw i32 3, %143
  store i32 %152, ptr %4, align 4, !tbaa !5
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %154 = load i32, ptr %153, align 4, !tbaa !5
  store i32 %154, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %.phi.trans.insert44 = getelementptr inbounds [3 x [9 x i32]], ptr %1, i64 0, i64 %indvars.iv, i64 8
  %.pre45 = load i32, ptr %.phi.trans.insert44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %155 = sub nsw i32 3, %.pre45
  store i32 %155, ptr %4, align 4, !tbaa !5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  store i32 %157, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 3
  br i1 %exitcond.not, label %49, label %51, !llvm.loop !10
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

attributes #0 = { mustprogress norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #5 = { nounwind }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass