; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2019-20/Jan/Plat (falling)

; 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_istream" = type { ptr, i64, %"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 }
%struct.frac = type { i64, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@N = external dso_local global i32, align 4
@slope = external dso_local global [100005 x i32], align 16
@A = external dso_local global [100005 x i32], align 16
@Q = external dso_local global [100005 x i32], align 16
@ans = external dso_local global [100005 x %struct.frac], align 16

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

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %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 %struct.frac, align 8
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %14

14:                                               ; preds = %29, %0
  %15 = load i32, ptr %2, align 4, !tbaa !8
  %16 = load i32, ptr @N, align 4, !tbaa !8
  %17 = add nsw i32 %16, 1
  %18 = icmp slt i32 %15, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %32

20:                                               ; preds = %14
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100005 x i32], ptr @A, i64 0, i64 %22
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %23)
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sub nsw i32 0, %24
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100005 x i32], ptr @slope, i64 0, i64 %27
  store i32 %25, ptr %28, align 4, !tbaa !8
  br label %29

29:                                               ; preds = %20
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %2, align 4, !tbaa !8
  br label %14, !llvm.loop !11

32:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %33

33:                                               ; preds = %43, %32
  %34 = load i32, ptr %3, align 4, !tbaa !8
  %35 = load i32, ptr @N, align 4, !tbaa !8
  %36 = add nsw i32 %35, 1
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %33
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100005 x i32], ptr @Q, i64 0, i64 %41
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %42)
  br label %43

43:                                               ; preds = %39
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %3, align 4, !tbaa !8
  br label %33, !llvm.loop !13

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

47:                                               ; preds = %64, %46
  %48 = load i32, ptr %4, align 4, !tbaa !8
  %49 = load i32, ptr @N, align 4, !tbaa !8
  %50 = add nsw i32 %49, 1
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %67

53:                                               ; preds = %47
  %54 = load i32, ptr %4, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100005 x i32], ptr @A, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !8
  %58 = mul nsw i32 %57, -1
  store i32 %58, ptr %56, align 4, !tbaa !8
  %59 = load i32, ptr %4, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100005 x i32], ptr @slope, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !8
  %63 = mul nsw i32 %62, -1
  store i32 %63, ptr %61, align 4, !tbaa !8
  br label %64

64:                                               ; preds = %53
  %65 = load i32, ptr %4, align 4, !tbaa !8
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !8
  br label %47, !llvm.loop !14

67:                                               ; preds = %52
  call void @_Z5solvev()
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %68

68:                                               ; preds = %85, %67
  %69 = load i32, ptr %5, align 4, !tbaa !8
  %70 = load i32, ptr @N, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %68
  %75 = load i32, ptr %5, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100005 x %struct.frac], ptr @ans, i64 0, i64 %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef -1)
  %78 = call noundef zeroext i1 @_ZeqRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  br i1 %78, label %79, label %80

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !8
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %84

80:                                               ; preds = %74
  %81 = load i32, ptr %5, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100005 x %struct.frac], ptr @ans, i64 0, i64 %82
  call void @_ZN6output2psI4fracJEEEvRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(16) %83)
  br label %84

84:                                               ; preds = %80, %79
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %5, align 4, !tbaa !8
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !8
  br label %68, !llvm.loop !15

88:                                               ; preds = %73
  %89 = load i32, ptr %1, align 4
  ret i32 %89
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZeqRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psI4fracJEEEvRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(16)) #3

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"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 }
%struct.frac = type { i64, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@N = external dso_local global i32, align 4
@slope = external dso_local local_unnamed_addr global [100005 x i32], align 16
@A = external dso_local global [100005 x i32], align 16
@Q = external dso_local global [100005 x i32], align 16
@ans = external dso_local global [100005 x %struct.frac], align 16

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

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() local_unnamed_addr #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca %struct.frac, align 8
  %2 = alloca i32, align 4
  %3 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  tail call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  %9 = load i32, ptr @N, align 4, !tbaa !8
  %.not23 = icmp slt i32 %9, 1
  br i1 %.not23, label %._crit_edge, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph
  %10 = icmp slt i32 %15, 1
  br i1 %10, label %._crit_edge, label %.lr.ph27

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %11 = getelementptr inbounds [100005 x i32], ptr @A, i64 0, i64 %indvars.iv
  tail call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %11)
  %12 = getelementptr inbounds [100005 x i32], ptr @slope, i64 0, i64 %indvars.iv
  %13 = trunc i64 %indvars.iv to i32
  %14 = sub i32 0, %13
  store i32 %14, ptr %12, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @N, align 4, !tbaa !8
  %16 = sext i32 %15 to i64
  %.not.not = icmp slt i64 %indvars.iv, %16
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph27, %0, %.preheader
  tail call void @_Z5solvev()
  %17 = load i32, ptr @N, align 4, !tbaa !8
  %.not2128 = icmp slt i32 %17, 1
  br i1 %.not2128, label %._crit_edge32, label %.lr.ph31.preheader

.lr.ph31.preheader:                               ; preds = %._crit_edge
  %18 = add nuw i32 %17, 1
  %wide.trip.count = zext i32 %18 to i64
  %19 = zext nneg i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 8
  br i1 %min.iters.check, label %.lr.ph31.preheader52, label %vector.ph

.lr.ph31.preheader52:                             ; preds = %middle.block, %.lr.ph31.preheader
  %indvars.iv42.ph = phi i64 [ 1, %.lr.ph31.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph31

vector.ph:                                        ; preds = %.lr.ph31.preheader
  %n.vec = and i64 %19, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %20 = getelementptr inbounds [100005 x i32], ptr @A, i64 0, i64 %offset.idx
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <4 x i32>, ptr %20, align 4, !tbaa !8
  %wide.load49 = load <4 x i32>, ptr %21, align 4, !tbaa !8
  %22 = sub nsw <4 x i32> zeroinitializer, %wide.load
  %23 = sub nsw <4 x i32> zeroinitializer, %wide.load49
  store <4 x i32> %22, ptr %20, align 4, !tbaa !8
  store <4 x i32> %23, ptr %21, align 4, !tbaa !8
  %24 = getelementptr inbounds [100005 x i32], ptr @slope, i64 0, i64 %offset.idx
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load50 = load <4 x i32>, ptr %24, align 4, !tbaa !8
  %wide.load51 = load <4 x i32>, ptr %25, align 4, !tbaa !8
  %26 = sub nsw <4 x i32> zeroinitializer, %wide.load50
  %27 = sub nsw <4 x i32> zeroinitializer, %wide.load51
  store <4 x i32> %26, ptr %24, align 4, !tbaa !8
  store <4 x i32> %27, ptr %25, align 4, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %19
  br i1 %cmp.n, label %._crit_edge32, label %.lr.ph31.preheader52

.lr.ph27:                                         ; preds = %.preheader, %.lr.ph27
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %.lr.ph27 ], [ 1, %.preheader ]
  %29 = getelementptr inbounds [100005 x i32], ptr @Q, i64 0, i64 %indvars.iv39
  tail call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %29)
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %30 = load i32, ptr @N, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %.not20.not = icmp slt i64 %indvars.iv39, %31
  br i1 %.not20.not, label %.lr.ph27, label %._crit_edge, !llvm.loop !16

._crit_edge32:                                    ; preds = %.lr.ph31, %middle.block, %._crit_edge
  tail call void @_Z5solvev()
  %32 = load i32, ptr @N, align 4, !tbaa !8
  %.not2233 = icmp slt i32 %32, 1
  br i1 %.not2233, label %._crit_edge37, label %.lr.ph36

.lr.ph31:                                         ; preds = %.lr.ph31.preheader52, %.lr.ph31
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %.lr.ph31 ], [ %indvars.iv42.ph, %.lr.ph31.preheader52 ]
  %33 = getelementptr inbounds [100005 x i32], ptr @A, i64 0, i64 %indvars.iv42
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %35 = sub nsw i32 0, %34
  store i32 %35, ptr %33, align 4, !tbaa !8
  %36 = getelementptr inbounds [100005 x i32], ptr @slope, i64 0, i64 %indvars.iv42
  %37 = load i32, ptr %36, align 4, !tbaa !8
  %38 = sub nsw i32 0, %37
  store i32 %38, ptr %36, align 4, !tbaa !8
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge32, label %.lr.ph31, !llvm.loop !17

._crit_edge37:                                    ; preds = %43, %._crit_edge32
  ret i32 0

.lr.ph36:                                         ; preds = %._crit_edge32, %43
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %43 ], [ 1, %._crit_edge32 ]
  %39 = getelementptr inbounds [100005 x %struct.frac], ptr @ans, i64 0, i64 %indvars.iv45
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #5
  call void @_ZN4fracC2Ex(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef -1)
  %40 = call noundef zeroext i1 @_ZeqRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #5
  br i1 %40, label %41, label %42

41:                                               ; preds = %.lr.ph36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 -1, ptr %2, align 4, !tbaa !8
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %43

42:                                               ; preds = %.lr.ph36
  call void @_ZN6output2psI4fracJEEEvRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(16) %39)
  br label %43

43:                                               ; preds = %41, %42
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %44 = load i32, ptr @N, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %.not22.not = icmp slt i64 %indvars.iv45, %45
  br i1 %.not22.not, label %.lr.ph36, label %._crit_edge37, !llvm.loop !18
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZeqRK4fracS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psI4fracJEEEvRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12, !15, !14}
!18 = distinct !{!18, !12}


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