; LLVM IR from tangjz/acm-icpc :: usaco/Training/Chapter 1 Getting started (friday)

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

@n = external dso_local global i32, align 4
@w = external dso_local global i32, align 4
@used = external dso_local global [7 x i32], align 16
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 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 i32, align 4
  store i32 0, ptr %1, align 4
  %5 = load ptr, ptr @stdin, align 8, !tbaa !5
  %6 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %5)
  %7 = load ptr, ptr @stdout, align 8, !tbaa !5
  %8 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %7)
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 1900, ptr %2, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %82, %0
  %11 = load i32, ptr %2, align 4, !tbaa !9
  %12 = load i32, ptr @n, align 4, !tbaa !9
  %13 = add nsw i32 1900, %12
  %14 = sub nsw i32 %13, 1
  %15 = icmp sle i32 %11, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %10
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %85

17:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %78, %17
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 12
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %81

22:                                               ; preds = %18
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = icmp eq i32 %23, 2
  br i1 %24, label %25, label %42

25:                                               ; preds = %22
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = srem i32 %26, 400
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %37, label %29

29:                                               ; preds = %25
  %30 = load i32, ptr %2, align 4, !tbaa !9
  %31 = srem i32 %30, 4
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %41

33:                                               ; preds = %29
  %34 = load i32, ptr %2, align 4, !tbaa !9
  %35 = srem i32 %34, 100
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %41

37:                                               ; preds = %33, %25
  %38 = load i32, ptr @w, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  %40 = srem i32 %39, 7
  store i32 %40, ptr @w, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %37, %33, %29
  br label %72

42:                                               ; preds = %22
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %63, label %45

45:                                               ; preds = %42
  %46 = load i32, ptr %4, align 4, !tbaa !9
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %63, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %4, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 3
  br i1 %50, label %63, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %4, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 5
  br i1 %53, label %63, label %54

54:                                               ; preds = %51
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = icmp eq i32 %55, 7
  br i1 %56, label %63, label %57

57:                                               ; preds = %54
  %58 = load i32, ptr %4, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 8
  br i1 %59, label %63, label %60

60:                                               ; preds = %57
  %61 = load i32, ptr %4, align 4, !tbaa !9
  %62 = icmp eq i32 %61, 10
  br i1 %62, label %63, label %67

63:                                               ; preds = %60, %57, %54, %51, %48, %45, %42
  %64 = load i32, ptr @w, align 4, !tbaa !9
  %65 = add nsw i32 %64, 3
  %66 = srem i32 %65, 7
  store i32 %66, ptr @w, align 4, !tbaa !9
  br label %71

67:                                               ; preds = %60
  %68 = load i32, ptr @w, align 4, !tbaa !9
  %69 = add nsw i32 %68, 2
  %70 = srem i32 %69, 7
  store i32 %70, ptr @w, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %67, %63
  br label %72

72:                                               ; preds = %71, %41
  %73 = load i32, ptr @w, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %72
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %4, align 4, !tbaa !9
  br label %18, !llvm.loop !11

81:                                               ; preds = %21
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %2, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %2, align 4, !tbaa !9
  br label %10, !llvm.loop !13

85:                                               ; preds = %16
  %86 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 6), align 8, !tbaa !9
  %87 = load i32, ptr @used, align 16, !tbaa !9
  %88 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 1), align 4, !tbaa !9
  %89 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 2), align 8, !tbaa !9
  %90 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 3), align 4, !tbaa !9
  %91 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 4), align 16, !tbaa !9
  %92 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @used, i64 0, i64 5), align 4, !tbaa !9
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %86, i32 noundef %87, i32 noundef %88, i32 noundef %89, i32 noundef %90, i32 noundef %91, i32 noundef %92)
  %94 = load ptr, ptr @stdin, align 8, !tbaa !5
  %95 = call i32 @fclose(ptr noundef %94)
  %96 = load ptr, ptr @stdout, align 8, !tbaa !5
  %97 = call i32 @fclose(ptr noundef %96)
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

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

declare i32 @fclose(ptr noundef) #1

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 = { "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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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"

@n = external dso_local global i32, align 4
@w = external dso_local local_unnamed_addr global i32, align 4
@used = external dso_local local_unnamed_addr global [7 x i32], align 16
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = load ptr, ptr @stdin, align 8, !tbaa !5
  %2 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %1)
  %3 = load ptr, ptr @stdout, align 8, !tbaa !5
  %4 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %3)
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @n)
  %6 = load i32, ptr @n, align 4, !tbaa !9
  %.not32 = icmp slt i32 %6, 1
  br i1 %.not32, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %0
  %w.promoted30 = load i32, ptr @w, align 4, !tbaa !9
  %7 = add nuw i32 %6, 1899
  %smax = tail call i32 @llvm.smax.i32(i32 %7, i32 1900)
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.split.us
  %.02633 = phi i32 [ %143, %.split.us ], [ 1900, %.preheader.preheader ]
  %8 = phi i32 [ %storemerge.lcssa105.sink, %.split.us ], [ %w.promoted30, %.preheader.preheader ]
  %9 = urem i32 %.02633, 400
  %10 = icmp eq i32 %9, 0
  %.fr112 = freeze i32 %8
  %11 = add i32 %.fr112, 3
  %12 = srem i32 %11, 7
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %14, align 4, !tbaa !9
  %17 = trunc nsw i32 %12 to i8
  %.lhs.trunc = add nsw i8 %17, 3
  %18 = srem i8 %.lhs.trunc, 7
  %19 = sext i8 %18 to i64
  %20 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !9
  br i1 %10, label %.preheader.split.us.peel.next74, label %23

23:                                               ; preds = %.preheader
  %24 = and i32 %.02633, 3
  %25 = icmp ne i32 %24, 0
  %26 = urem i32 %.02633, 100
  %.not27 = icmp eq i32 %26, 0
  %or.cond28 = or i1 %25, %.not27
  br i1 %or.cond28, label %.preheader.split.peel.next51, label %27

27:                                               ; preds = %23
  %.lhs.trunc102 = add nsw i8 %18, 1
  %28 = srem i8 %.lhs.trunc102, 7
  %.phi.trans.insert = sext i8 %28 to i64
  %.phi.trans.insert86 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %.phi.trans.insert
  %.pre = load i32, ptr %.phi.trans.insert86, align 4, !tbaa !9
  br label %.preheader.split.peel.next51

.preheader.split.peel.next51:                     ; preds = %23, %27
  %29 = phi i32 [ %22, %23 ], [ %.pre, %27 ]
  %.in = phi i8 [ %18, %23 ], [ %28, %27 ]
  %.in.fr = freeze i8 %.in
  %30 = sext i8 %.in.fr to i32
  %31 = sext i8 %.in.fr to i64
  %32 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %31
  %33 = add nsw i32 %29, 1
  store i32 %33, ptr %32, align 4, !tbaa !9
  %34 = add nsw i32 %30, 3
  %.urem100 = add nsw i32 %30, -4
  %.cmp101 = icmp ult i32 %34, 7
  %35 = select i1 %.cmp101, i32 %34, i32 %.urem100
  %36 = zext nneg i32 %35 to i64
  %37 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !9
  %40 = add nuw nsw i32 %35, 2
  %storemerge = urem i32 %40, 7
  %41 = zext nneg i32 %storemerge to i64
  %42 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %42, align 4, !tbaa !9
  %45 = add nuw nsw i32 %storemerge, 3
  %storemerge.1 = urem i32 %45, 7
  %46 = zext nneg i32 %storemerge.1 to i64
  %47 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !9
  %50 = add nuw nsw i32 %storemerge.1, 2
  %storemerge.2 = urem i32 %50, 7
  %51 = zext nneg i32 %storemerge.2 to i64
  %52 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %52, align 4, !tbaa !9
  %55 = add nuw nsw i32 %storemerge.2, 3
  %storemerge.3 = urem i32 %55, 7
  %56 = zext nneg i32 %storemerge.3 to i64
  %57 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %57, align 4, !tbaa !9
  %60 = add nuw nsw i32 %storemerge.3, 3
  %storemerge.4 = urem i32 %60, 7
  %61 = zext nneg i32 %storemerge.4 to i64
  %62 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !9
  %65 = add nuw nsw i32 %storemerge.4, 2
  %storemerge.5 = urem i32 %65, 7
  %66 = zext nneg i32 %storemerge.5 to i64
  %67 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !9
  %70 = add nuw nsw i32 %storemerge.5, 3
  %storemerge.6 = urem i32 %70, 7
  %71 = zext nneg i32 %storemerge.6 to i64
  %72 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !9
  %75 = add nuw nsw i32 %storemerge.6, 2
  %storemerge.7 = urem i32 %75, 7
  %76 = zext nneg i32 %storemerge.7 to i64
  %77 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %77, align 4, !tbaa !9
  br label %.split.us

.preheader.split.us.peel.next74:                  ; preds = %.preheader
  %.lhs.trunc95 = add nsw i8 %18, 1
  %80 = srem i8 %.lhs.trunc95, 7
  %81 = sext i8 %80 to i64
  %82 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !9
  %narrow = add nsw i8 %80, 3
  %85 = sext i8 %narrow to i32
  %.urem = add nsw i32 %85, -7
  %.cmp = icmp ult i8 %narrow, 7
  %86 = select i1 %.cmp, i32 %85, i32 %.urem
  %87 = zext nneg i32 %86 to i64
  %88 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %88, align 4, !tbaa !9
  %91 = add nuw nsw i32 %86, 2
  %storemerge94 = urem i32 %91, 7
  %92 = zext nneg i32 %storemerge94 to i64
  %93 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %93, align 4, !tbaa !9
  %96 = add nuw nsw i32 %storemerge94, 3
  %storemerge94.1 = urem i32 %96, 7
  %97 = zext nneg i32 %storemerge94.1 to i64
  %98 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %98, align 4, !tbaa !9
  %101 = add nuw nsw i32 %storemerge94.1, 2
  %storemerge94.2 = urem i32 %101, 7
  %102 = zext nneg i32 %storemerge94.2 to i64
  %103 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %103, align 4, !tbaa !9
  %106 = add nuw nsw i32 %storemerge94.2, 3
  %storemerge94.3 = urem i32 %106, 7
  %107 = zext nneg i32 %storemerge94.3 to i64
  %108 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !9
  %111 = add nuw nsw i32 %storemerge94.3, 3
  %storemerge94.4 = urem i32 %111, 7
  %112 = zext nneg i32 %storemerge94.4 to i64
  %113 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %113, align 4, !tbaa !9
  %116 = add nuw nsw i32 %storemerge94.4, 2
  %storemerge94.5 = urem i32 %116, 7
  %117 = zext nneg i32 %storemerge94.5 to i64
  %118 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !9
  %121 = add nuw nsw i32 %storemerge94.5, 3
  %storemerge94.6 = urem i32 %121, 7
  %122 = zext nneg i32 %storemerge94.6 to i64
  %123 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !9
  %126 = add nuw nsw i32 %storemerge94.6, 2
  %storemerge94.7 = urem i32 %126, 7
  %127 = zext nneg i32 %storemerge94.7 to i64
  %128 = getelementptr inbounds [7 x i32], ptr @used, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %128, align 4, !tbaa !9
  br label %.split.us

._crit_edge.loopexit:                             ; preds = %.split.us
  store i32 %storemerge.lcssa105.sink, ptr @w, align 4, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %131 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 24), align 8, !tbaa !9
  %132 = load i32, ptr @used, align 16, !tbaa !9
  %133 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 4), align 4, !tbaa !9
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 8), align 8, !tbaa !9
  %135 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 12), align 4, !tbaa !9
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 16), align 16, !tbaa !9
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @used, i64 20), align 4, !tbaa !9
  %138 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %131, i32 noundef %132, i32 noundef %133, i32 noundef %134, i32 noundef %135, i32 noundef %136, i32 noundef %137)
  %139 = load ptr, ptr @stdin, align 8, !tbaa !5
  %140 = tail call i32 @fclose(ptr noundef %139)
  %141 = load ptr, ptr @stdout, align 8, !tbaa !5
  %142 = tail call i32 @fclose(ptr noundef %141)
  ret i32 0

.split.us:                                        ; preds = %.preheader.split.peel.next51, %.preheader.split.us.peel.next74
  %storemerge.lcssa105.sink = phi i32 [ %storemerge94.7, %.preheader.split.us.peel.next74 ], [ %storemerge.7, %.preheader.split.peel.next51 ]
  %143 = add nuw nsw i32 %.02633, 1
  %exitcond82 = icmp eq i32 %.02633, %smax
  br i1 %exitcond82, label %._crit_edge.loopexit, label %.preheader, !llvm.loop !11
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(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: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 = { "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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass