; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 8/1726. Visits (main)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [100005 x i64], align 16
  %4 = alloca [100005 x i64], align 16
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 800040, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 800040, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %18

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

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

23:                                               ; preds = %18
  %24 = load i32, ptr %12, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %25
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 %28
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %26, ptr noundef %29)
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = load i64, ptr %5, align 8, !tbaa !5
  %36 = add i64 %35, %34
  store i64 %36, ptr %5, align 8, !tbaa !5
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %42 = add i64 %41, %40
  store i64 %42, ptr %6, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %23
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %12, align 4, !tbaa !9
  br label %18, !llvm.loop !11

46:                                               ; preds = %22
  %47 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 0
  %48 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 0
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i64, ptr %48, i64 %50
  call void @_ZSt4sortIPyEvT_S1_(ptr noundef %47, ptr noundef %51)
  %52 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 0
  %53 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 0
  %54 = load i32, ptr %2, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i64, ptr %53, i64 %55
  call void @_ZSt4sortIPyEvT_S1_(ptr noundef %52, ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  store i64 %58, ptr %13, align 8, !tbaa !5
  %59 = load i64, ptr %13, align 8, !tbaa !5
  %60 = load i64, ptr %13, align 8, !tbaa !5
  %61 = sub i64 %60, 1
  %62 = mul i64 %59, %61
  %63 = udiv i64 %62, 2
  store i64 %63, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %102, %46
  %65 = load i32, ptr %15, align 4, !tbaa !9
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  %70 = load i32, ptr %15, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = load i64, ptr %7, align 8, !tbaa !5
  %75 = add i64 %74, %73
  store i64 %75, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = load i64, ptr %5, align 8, !tbaa !5
  %81 = sub i64 %80, %79
  store i64 %81, ptr %5, align 8, !tbaa !5
  %82 = load i64, ptr %9, align 8, !tbaa !5
  %83 = add i64 %82, 1
  store i64 %83, ptr %9, align 8, !tbaa !5
  %84 = load i64, ptr %9, align 8, !tbaa !5
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = mul i64 %84, %88
  %90 = load i64, ptr %7, align 8, !tbaa !5
  %91 = sub i64 %89, %90
  %92 = load i64, ptr %11, align 8, !tbaa !5
  %93 = add i64 %92, %91
  store i64 %93, ptr %11, align 8, !tbaa !5
  %94 = load i64, ptr %11, align 8, !tbaa !5
  %95 = load i64, ptr %13, align 8, !tbaa !5
  %96 = udiv i64 %94, %95
  %97 = load i64, ptr %14, align 8, !tbaa !5
  %98 = add i64 %97, %96
  store i64 %98, ptr %14, align 8, !tbaa !5
  %99 = load i64, ptr %13, align 8, !tbaa !5
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = urem i64 %100, %99
  store i64 %101, ptr %11, align 8, !tbaa !5
  br label %102

102:                                              ; preds = %69
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %15, align 4, !tbaa !9
  br label %64, !llvm.loop !13

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

106:                                              ; preds = %144, %105
  %107 = load i32, ptr %16, align 4, !tbaa !9
  %108 = load i32, ptr %2, align 4, !tbaa !9
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %147

111:                                              ; preds = %106
  %112 = load i32, ptr %16, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = load i64, ptr %8, align 8, !tbaa !5
  %117 = add i64 %116, %115
  store i64 %117, ptr %8, align 8, !tbaa !5
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = load i64, ptr %6, align 8, !tbaa !5
  %123 = sub i64 %122, %121
  store i64 %123, ptr %6, align 8, !tbaa !5
  %124 = load i64, ptr %10, align 8, !tbaa !5
  %125 = add i64 %124, 1
  store i64 %125, ptr %10, align 8, !tbaa !5
  %126 = load i64, ptr %10, align 8, !tbaa !5
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100005 x i64], ptr %4, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !5
  %131 = mul i64 %126, %130
  %132 = load i64, ptr %8, align 8, !tbaa !5
  %133 = sub i64 %131, %132
  %134 = load i64, ptr %11, align 8, !tbaa !5
  %135 = add i64 %134, %133
  store i64 %135, ptr %11, align 8, !tbaa !5
  %136 = load i64, ptr %11, align 8, !tbaa !5
  %137 = load i64, ptr %13, align 8, !tbaa !5
  %138 = udiv i64 %136, %137
  %139 = load i64, ptr %14, align 8, !tbaa !5
  %140 = add i64 %139, %138
  store i64 %140, ptr %14, align 8, !tbaa !5
  %141 = load i64, ptr %13, align 8, !tbaa !5
  %142 = load i64, ptr %11, align 8, !tbaa !5
  %143 = urem i64 %142, %141
  store i64 %143, ptr %11, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %111
  %145 = load i32, ptr %16, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %16, align 4, !tbaa !9
  br label %106, !llvm.loop !14

147:                                              ; preds = %110
  %148 = load i64, ptr %14, align 8, !tbaa !5
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %148)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 800040, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 800040, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %150 = load i32, ptr %1, align 4
  ret i32 %150
}

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPyEvT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 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 = { inlinehint mustprogress 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 = { mustprogress 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 = !{!"long long", !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}
!14 = distinct !{!14, !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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100005 x i64], align 16
  %3 = alloca [100005 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 800040, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 800040, ptr nonnull %3) #5
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %5 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %21, %.lr.ph ]
  %7 = getelementptr inbounds i64, ptr %2, i64 %.pre-phi
  call void @_ZSt4sortIPyEvT_S1_(ptr noundef nonnull %2, ptr noundef nonnull %7)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = getelementptr inbounds i64, ptr %3, i64 %9
  call void @_ZSt4sortIPyEvT_S1_(ptr noundef nonnull %3, ptr noundef nonnull %10)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = add nsw i64 %12, -1
  %14 = mul nsw i64 %13, %12
  %15 = lshr i64 %14, 1
  %16 = icmp sgt i32 %11, 0
  br i1 %16, label %.lr.ph65.preheader, label %._crit_edge74

.lr.ph65.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.lr.ph65

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %17 = getelementptr inbounds [100005 x i64], ptr %2, i64 0, i64 %indvars.iv
  %18 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %indvars.iv
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %17, ptr noundef nonnull %18)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph65
  br i1 %16, label %.lr.ph73.preheader, label %._crit_edge74

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

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %.lr.ph65
  %.04562 = phi i64 [ %31, %.lr.ph65 ], [ 0, %.lr.ph65.preheader ]
  %.04761 = phi i64 [ %32, %.lr.ph65 ], [ 0, %.lr.ph65.preheader ]
  %.05060 = phi i64 [ %26, %.lr.ph65 ], [ 0, %.lr.ph65.preheader ]
  %.05259 = phi i64 [ %25, %.lr.ph65 ], [ 0, %.lr.ph65.preheader ]
  %23 = getelementptr inbounds [100005 x i64], ptr %2, i64 0, i64 %.05060
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = add i64 %24, %.05259
  %26 = add nuw nsw i64 %.05060, 1
  %27 = mul i64 %24, %26
  %28 = sub i64 %27, %25
  %29 = add i64 %28, %.04761
  %30 = udiv i64 %29, %15
  %31 = add i64 %30, %.04562
  %32 = urem i64 %29, %15
  %exitcond.not = icmp eq i64 %26, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph65, !llvm.loop !13

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge, %.preheader
  %.1.lcssa = phi i64 [ %31, %.preheader ], [ 0, %._crit_edge ], [ %42, %.lr.ph73 ]
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.1.lcssa)
  call void @llvm.lifetime.end.p0(i64 800040, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 800040, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %.lr.ph73
  %.171 = phi i64 [ %42, %.lr.ph73 ], [ %31, %.lr.ph73.preheader ]
  %.14870 = phi i64 [ %43, %.lr.ph73 ], [ %32, %.lr.ph73.preheader ]
  %.04969 = phi i64 [ %37, %.lr.ph73 ], [ 0, %.lr.ph73.preheader ]
  %.05168 = phi i64 [ %36, %.lr.ph73 ], [ 0, %.lr.ph73.preheader ]
  %34 = getelementptr inbounds [100005 x i64], ptr %3, i64 0, i64 %.04969
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = add i64 %35, %.05168
  %37 = add nuw nsw i64 %.04969, 1
  %38 = mul i64 %35, %37
  %39 = sub i64 %38, %36
  %40 = add i64 %39, %.14870
  %41 = udiv i64 %40, %15
  %42 = add i64 %41, %.171
  %43 = urem i64 %40, %15
  %exitcond84.not = icmp eq i64 %37, %wide.trip.count83
  br i1 %exitcond84.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !14
}

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPyEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #4 align 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 = { 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 = { inlinehint mustprogress 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 = { mustprogress 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 = 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, !10}


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