; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/355 Division 2/Problem B (B)

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@h = external dso_local global i32, align 4
@a = external dso_local global [100100 x i64], align 16
@ans = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", 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 i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %6 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @h)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %20

20:                                               ; preds = %30, %0
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = load i32, ptr @n, align 4, !tbaa !8
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %33

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %28)
  br label %30

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

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %34 = load i32, ptr @h, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  store i64 %35, ptr %3, align 8, !tbaa !13
  store i64 0, ptr @ans, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %116, %33
  %37 = load i32, ptr %4, align 4, !tbaa !8
  %38 = load i32, ptr @n, align 4, !tbaa !8
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %119

41:                                               ; preds = %36
  %42 = load i64, ptr %3, align 8, !tbaa !13
  %43 = load i32, ptr %4, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !13
  %47 = icmp sge i64 %42, %46
  br i1 %47, label %48, label %55

48:                                               ; preds = %41
  %49 = load i32, ptr %4, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !13
  %53 = load i64, ptr %3, align 8, !tbaa !13
  %54 = sub nsw i64 %53, %52
  store i64 %54, ptr %3, align 8, !tbaa !13
  br label %115

55:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %56 = load i32, ptr %4, align 4, !tbaa !8
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !13
  %60 = load i64, ptr %3, align 8, !tbaa !13
  %61 = sub nsw i64 %59, %60
  %62 = sitofp i64 %61 to double
  %63 = load i32, ptr @k, align 4, !tbaa !8
  %64 = sitofp i32 %63 to double
  %65 = fdiv double %62, %64
  %66 = call double @llvm.ceil.f64(double %65)
  %67 = fptosi double %66 to i64
  store i64 %67, ptr %5, align 8, !tbaa !13
  %68 = load i64, ptr %3, align 8, !tbaa !13
  %69 = load i64, ptr %5, align 8, !tbaa !13
  %70 = load i32, ptr @k, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = mul nsw i64 %69, %71
  %73 = add nsw i64 %68, %72
  %74 = load i32, ptr @h, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = icmp sgt i64 %73, %75
  br i1 %76, label %77, label %98

77:                                               ; preds = %55
  %78 = load i32, ptr @h, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = load i64, ptr %3, align 8, !tbaa !13
  %81 = sub nsw i64 %79, %80
  %82 = sitofp i64 %81 to double
  %83 = load i32, ptr @k, align 4, !tbaa !8
  %84 = sitofp i32 %83 to double
  %85 = fdiv double %82, %84
  %86 = call double @llvm.ceil.f64(double %85)
  %87 = fptosi double %86 to i64
  store i64 %87, ptr %5, align 8, !tbaa !13
  %88 = load i64, ptr %5, align 8, !tbaa !13
  %89 = load i64, ptr @ans, align 8, !tbaa !13
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr @ans, align 8, !tbaa !13
  %91 = load i32, ptr @h, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = load i32, ptr %4, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !13
  %97 = sub nsw i64 %92, %96
  store i64 %97, ptr %3, align 8, !tbaa !13
  br label %114

98:                                               ; preds = %55
  %99 = load i64, ptr %5, align 8, !tbaa !13
  %100 = load i64, ptr @ans, align 8, !tbaa !13
  %101 = add nsw i64 %100, %99
  store i64 %101, ptr @ans, align 8, !tbaa !13
  %102 = load i64, ptr %5, align 8, !tbaa !13
  %103 = load i32, ptr @k, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = mul nsw i64 %102, %104
  %106 = load i64, ptr %3, align 8, !tbaa !13
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr %3, align 8, !tbaa !13
  %108 = load i32, ptr %4, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !13
  %112 = load i64, ptr %3, align 8, !tbaa !13
  %113 = sub nsw i64 %112, %111
  store i64 %113, ptr %3, align 8, !tbaa !13
  br label %114

114:                                              ; preds = %98, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %115

115:                                              ; preds = %114, %48
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %4, align 4, !tbaa !8
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %4, align 4, !tbaa !8
  br label %36, !llvm.loop !15

119:                                              ; preds = %40
  %120 = load i32, ptr @h, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = load i64, ptr %3, align 8, !tbaa !13
  %123 = sub nsw i64 %121, %122
  %124 = sitofp i64 %123 to double
  %125 = load i32, ptr @k, align 4, !tbaa !8
  %126 = sitofp i32 %125 to double
  %127 = fdiv double %124, %126
  %128 = call double @llvm.ceil.f64(double %127)
  %129 = load i64, ptr @ans, align 8, !tbaa !13
  %130 = sitofp i64 %129 to double
  %131 = fadd double %130, %128
  %132 = fptosi double %131 to i64
  store i64 %132, ptr @ans, align 8, !tbaa !13
  %133 = load i64, ptr @ans, align 8, !tbaa !13
  call void @_Z2trIxJEEvT_DpRKT0_(i64 noundef %133)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret i32 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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIxJEEvT_DpRKT0_(i64 noundef) #4

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!14, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!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_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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@h = external dso_local global i32, align 4
@a = external dso_local global [100100 x i64], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @h)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %15 = load i32, ptr @n, align 4, !tbaa !8
  %.not29 = icmp slt i32 %15, 1
  br i1 %.not29, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  %16 = load i32, ptr @h, align 4, !tbaa !8
  %17 = sext i32 %16 to i64
  %.pre46 = load i32, ptr @k, align 4
  br label %._crit_edge.._crit_edge36_crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  %18 = load i32, ptr @h, align 4, !tbaa !8
  %19 = sext i32 %18 to i64
  %.not2731 = icmp slt i32 %26, 1
  %.pre = load i32, ptr @k, align 4
  br i1 %.not2731, label %._crit_edge.._crit_edge36_crit_edge, label %.lr.ph35

._crit_edge.._crit_edge36_crit_edge:              ; preds = %._crit_edge.thread, %._crit_edge
  %.pre47 = phi i32 [ %.pre46, %._crit_edge.thread ], [ %.pre, %._crit_edge ]
  %20 = phi i64 [ %17, %._crit_edge.thread ], [ %19, %._crit_edge ]
  %.pre43 = sitofp i32 %.pre47 to double
  br label %._crit_edge36

.lr.ph35:                                         ; preds = %._crit_edge
  %21 = sitofp i32 %.pre to double
  %22 = sext i32 %.pre to i64
  %23 = add nuw i32 %26, 1
  %wide.trip.count = zext i32 %23 to i64
  br label %37

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %24 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr @n, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %.not.not = icmp slt i64 %indvars.iv, %27
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge36.loopexit:                           ; preds = %59
  %28 = sitofp i64 %60 to double
  br label %._crit_edge36

._crit_edge36:                                    ; preds = %._crit_edge.._crit_edge36_crit_edge, %._crit_edge36.loopexit
  %29 = phi i64 [ %20, %._crit_edge.._crit_edge36_crit_edge ], [ %19, %._crit_edge36.loopexit ]
  %.pre-phi = phi double [ %.pre43, %._crit_edge.._crit_edge36_crit_edge ], [ %21, %._crit_edge36.loopexit ]
  %30 = phi double [ 0.000000e+00, %._crit_edge.._crit_edge36_crit_edge ], [ %28, %._crit_edge36.loopexit ]
  %.022.lcssa = phi i64 [ %20, %._crit_edge.._crit_edge36_crit_edge ], [ %.2, %._crit_edge36.loopexit ]
  %31 = sub nsw i64 %29, %.022.lcssa
  %32 = sitofp i64 %31 to double
  %33 = fdiv double %32, %.pre-phi
  %34 = tail call double @llvm.ceil.f64(double %33)
  %35 = fadd double %34, %30
  %36 = fptosi double %35 to i64
  store i64 %36, ptr @ans, align 8, !tbaa !13
  tail call void @_Z2trIxJEEvT_DpRKT0_(i64 noundef %36)
  ret i32 0

37:                                               ; preds = %.lr.ph35, %59
  %indvars.iv40 = phi i64 [ 1, %.lr.ph35 ], [ %indvars.iv.next41, %59 ]
  %.02232 = phi i64 [ %19, %.lr.ph35 ], [ %.2, %59 ]
  %38 = phi i64 [ 0, %.lr.ph35 ], [ %60, %59 ]
  %39 = getelementptr inbounds [100100 x i64], ptr @a, i64 0, i64 %indvars.iv40
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %.not28 = icmp slt i64 %.02232, %40
  br i1 %.not28, label %41, label %59

41:                                               ; preds = %37
  %42 = sub nsw i64 %40, %.02232
  %43 = sitofp i64 %42 to double
  %44 = fdiv double %43, %21
  %45 = tail call double @llvm.ceil.f64(double %44)
  %46 = fptosi double %45 to i64
  %47 = mul nsw i64 %46, %22
  %48 = add nsw i64 %47, %.02232
  %49 = icmp sgt i64 %48, %19
  br i1 %49, label %50, label %57

50:                                               ; preds = %41
  %51 = sub nsw i64 %19, %.02232
  %52 = sitofp i64 %51 to double
  %53 = fdiv double %52, %21
  %54 = tail call double @llvm.ceil.f64(double %53)
  %55 = fptosi double %54 to i64
  %56 = add nsw i64 %38, %55
  store i64 %56, ptr @ans, align 8, !tbaa !13
  br label %59

57:                                               ; preds = %41
  %58 = add nsw i64 %38, %46
  br label %59

59:                                               ; preds = %37, %50, %57
  %60 = phi i64 [ %56, %50 ], [ %58, %57 ], [ %38, %37 ]
  %.022.pn = phi i64 [ %19, %50 ], [ %48, %57 ], [ %.02232, %37 ]
  %.2 = sub nsw i64 %.022.pn, %40
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next41, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge36.loopexit, label %37, !llvm.loop !15
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIxJEEvT_DpRKT0_(i64 noundef) local_unnamed_addr #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 = { 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 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 = !{!"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 = !{!14, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!15 = distinct !{!15, !12}


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