; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101206D)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@rk = external dso_local global i32, align 4
@ctr = external dso_local global [100001 x i32], align 16
@lim = external dso_local global [100001 x i32], align 16
@adt = external dso_local global [100001 x i32], align 16
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 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
  %5 = alloca i32, align 4
  %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
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %118, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %12
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m, ptr noundef @rk)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %37, %17
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %19
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr @ctr, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %27)
  %29 = 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) @rk)
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %35
  store i32 0, ptr %36, align 4, !tbaa !5
  br label %37

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

40:                                               ; preds = %23
  %41 = load i32, ptr @rk, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %42
  store i32 1, ptr %43, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %54, %40
  %45 = load i32, ptr @m, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr @m, align 4, !tbaa !5
  %47 = icmp ne i32 %45, 0
  br i1 %47, label %48, label %63

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %5, ptr noundef %6)
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #4
  br label %54

54:                                               ; preds = %53, %48
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %56
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %57, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %61
  store i32 %59, ptr %62, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %44, !llvm.loop !11

63:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %78, %63
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %81

69:                                               ; preds = %64
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %69
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %64, !llvm.loop !12

81:                                               ; preds = %68
  store i64 0, ptr @ans, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %82 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %82, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %111, %81
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = icmp sge i32 %84, 1
  br i1 %85, label %87, label %86

86:                                               ; preds = %83
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %114

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100001 x i32], ptr @ctr, i64 0, i64 %89
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr %9, align 4, !tbaa !5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %90, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %98 = load i32, ptr %97, align 4, !tbaa !5
  store i32 %98, ptr %10, align 4, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100001 x i32], ptr @ctr, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = sub nsw i32 %103, %99
  store i32 %104, ptr %102, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = load i64, ptr @ans, align 8, !tbaa !13
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr @ans, align 8, !tbaa !13
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = sub nsw i32 %109, %108
  store i32 %110, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %111

111:                                              ; preds = %87
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = add nsw i32 %112, -1
  store i32 %113, ptr %8, align 4, !tbaa !5
  br label %83, !llvm.loop !15

114:                                              ; preds = %86
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = load i64, ptr @ans, align 8, !tbaa !13
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %115, i64 noundef %116)
  br label %118

118:                                              ; preds = %114
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !16

121:                                              ; preds = %16
  ret i32 0
}

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: 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)) #3

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

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

declare i32 @printf(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 = { 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 #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@rk = external dso_local global i32, align 4
@ctr = external dso_local global [100001 x i32], align 16
@lim = external dso_local global [100001 x i32], align 16
@adt = external dso_local local_unnamed_addr global [100001 x i32], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %.not32 = icmp slt i32 %6, 1
  br i1 %.not32, label %._crit_edge36, label %.lr.ph35

._crit_edge36:                                    ; preds = %._crit_edge31, %0
  ret i32 0

.lr.ph35:                                         ; preds = %0, %._crit_edge31
  %.033 = phi i32 [ %78, %._crit_edge31 ], [ 1, %0 ]
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @rk)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 1, ptr %1, align 4, !tbaa !5
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not1619 = icmp slt i32 %8, 1
  br i1 %.not1619, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph35
  %9 = phi i32 [ %8, %.lr.ph35 ], [ %25, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %10 = load i32, ptr @rk, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %11
  store i32 1, ptr %12, align 4, !tbaa !5
  %13 = load i32, ptr @m, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr @m, align 4, !tbaa !5
  %.not1721 = icmp eq i32 %13, 0
  br i1 %.not1721, label %.preheader, label %.lr.ph23

.lr.ph:                                           ; preds = %.lr.ph35, %.lr.ph
  %storemerge20 = phi i32 [ %24, %.lr.ph ], [ 1, %.lr.ph35 ]
  %15 = sext i32 %storemerge20 to i64
  %16 = getelementptr inbounds i32, ptr @ctr, i64 %15
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) @rk)
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %21
  store i32 %19, ptr %22, align 4, !tbaa !5
  %23 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %21
  store i32 0, ptr %23, align 4, !tbaa !5
  %24 = add nsw i32 %20, 1
  store i32 %24, ptr %1, align 4, !tbaa !5
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %.not16.not = icmp slt i32 %20, %25
  br i1 %.not16.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader.loopexit:                              ; preds = %34
  %.pre41 = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge
  %26 = phi i32 [ %.pre41, %.preheader.loopexit ], [ %9, %._crit_edge ]
  %.not1824 = icmp slt i32 %26, 1
  br i1 %.not1824, label %._crit_edge27.thread, label %.lr.ph26.preheader

._crit_edge27.thread:                             ; preds = %.preheader
  store i64 0, ptr @ans, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  br label %._crit_edge31

.lr.ph26.preheader:                               ; preds = %.preheader
  %27 = zext nneg i32 %26 to i64
  %xtraiter = and i64 %27, 3
  %28 = icmp ult i32 %26, 4
  br i1 %28, label %._crit_edge27.unr-lcssa, label %.lr.ph26.preheader.new

.lr.ph26.preheader.new:                           ; preds = %.lr.ph26.preheader
  %unroll_iter = and i64 %27, 2147483644
  br label %.lr.ph26

.lr.ph23:                                         ; preds = %._crit_edge, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %.lr.ph23
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #4
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %33, %.lr.ph23
  %35 = phi i32 [ %.pre, %33 ], [ %30, %.lr.ph23 ]
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %36
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %41
  store i32 %39, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr @m, align 4, !tbaa !5
  %.not17 = icmp eq i32 %43, 0
  br i1 %.not17, label %.preheader.loopexit, label %.lr.ph23, !llvm.loop !13

._crit_edge27.unr-lcssa:                          ; preds = %.lr.ph26, %.lr.ph26.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph26.preheader ], [ %indvars.iv.next.3, %.lr.ph26 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge27, label %.lr.ph26.epil

.lr.ph26.epil:                                    ; preds = %._crit_edge27.unr-lcssa, %.lr.ph26.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph26.epil ], [ %indvars.iv.unr, %._crit_edge27.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph26.epil ], [ 0, %._crit_edge27.unr-lcssa ]
  %45 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %indvars.iv.epil
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge27, label %.lr.ph26.epil, !llvm.loop !14

._crit_edge27:                                    ; preds = %.lr.ph26.epil, %._crit_edge27.unr-lcssa
  store i64 0, ptr @ans, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %51 = zext nneg i32 %26 to i64
  br label %.lr.ph30

.lr.ph26:                                         ; preds = %.lr.ph26, %.lr.ph26.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph26.preheader.new ], [ %indvars.iv.next.3, %.lr.ph26 ]
  %niter = phi i64 [ 0, %.lr.ph26.preheader.new ], [ %niter.next.3, %.lr.ph26 ]
  %52 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %indvars.iv
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %indvars.iv.next
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %64 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %indvars.iv.next.1
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %70 = getelementptr inbounds [100001 x i32], ptr @lim, i64 0, i64 %indvars.iv.next.2
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %73, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge27.unr-lcssa, label %.lr.ph26, !llvm.loop !16

._crit_edge31:                                    ; preds = %.lr.ph30, %._crit_edge27.thread
  %76 = phi i64 [ 0, %._crit_edge27.thread ], [ %91, %.lr.ph30 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.033, i64 noundef %76)
  %78 = add nuw nsw i32 %.033, 1
  %79 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.033, %79
  br i1 %.not.not, label %.lr.ph35, label %._crit_edge36, !llvm.loop !17

.lr.ph30:                                         ; preds = %._crit_edge27, %.lr.ph30
  %80 = phi i32 [ 0, %._crit_edge27 ], [ %93, %.lr.ph30 ]
  %indvars.iv38 = phi i64 [ %51, %._crit_edge27 ], [ %indvars.iv.next39, %.lr.ph30 ]
  %81 = getelementptr inbounds [100001 x i32], ptr @ctr, i64 0, i64 %indvars.iv38
  %82 = getelementptr inbounds [100001 x i32], ptr @adt, i64 0, i64 %indvars.iv38
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %80, %83
  store i32 %84, ptr %4, align 4, !tbaa !5
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %81, align 4, !tbaa !5
  %88 = sub nsw i32 %87, %86
  store i32 %88, ptr %81, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = load i64, ptr @ans, align 8, !tbaa !11
  %91 = add nsw i64 %90, %89
  store i64 %91, ptr @ans, align 8, !tbaa !11
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sub nsw i32 %92, %86
  store i32 %93, ptr %4, align 4, !tbaa !5
  %indvars.iv.next39 = add nsw i64 %indvars.iv38, -1
  %94 = icmp ugt i64 %indvars.iv38, 1
  br i1 %94, label %.lr.ph30, label %._crit_edge31, !llvm.loop !18
}

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

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

; 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 #3

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

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

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass