; LLVM IR from abeaumont/competitive-programming :: cses (2431)

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

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

19:                                               ; preds = %34, %0
  %20 = load i64, ptr %2, align 8, !tbaa !8
  %21 = icmp slt i64 %20, 18
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %39

23:                                               ; preds = %19
  %24 = load i64, ptr %2, align 8, !tbaa !8
  %25 = sub nsw i64 %24, 1
  %26 = getelementptr inbounds [20 x i64], ptr @start, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = load i64, ptr %3, align 8, !tbaa !8
  %29 = load i64, ptr %2, align 8, !tbaa !8
  %30 = mul nsw i64 %28, %29
  %31 = add nsw i64 %27, %30
  %32 = load i64, ptr %2, align 8, !tbaa !8
  %33 = getelementptr inbounds [20 x i64], ptr @start, i64 0, i64 %32
  store i64 %31, ptr %33, align 8, !tbaa !8
  br label %34

34:                                               ; preds = %23
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = add nsw i64 %35, 1
  store i64 %36, ptr %2, align 8, !tbaa !8
  %37 = load i64, ptr %3, align 8, !tbaa !8
  %38 = mul nsw i64 %37, 10
  store i64 %38, ptr %3, align 8, !tbaa !8
  br label %19, !llvm.loop !11

39:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br label %41

41:                                               ; preds = %111, %39
  %42 = load i64, ptr %4, align 8, !tbaa !8
  %43 = add nsw i64 %42, -1
  store i64 %43, ptr %4, align 8, !tbaa !8
  %44 = icmp ne i64 %42, 0
  br i1 %44, label %45, label %116

45:                                               ; preds = %41
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %47 = load i64, ptr %5, align 8, !tbaa !8
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %49

49:                                               ; preds = %62, %45
  %50 = load i32, ptr %6, align 4, !tbaa !13
  %51 = icmp slt i32 %50, 17
  br i1 %51, label %52, label %60

52:                                               ; preds = %49
  %53 = load i32, ptr %6, align 4, !tbaa !13
  %54 = add nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [20 x i64], ptr @start, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = load i64, ptr %5, align 8, !tbaa !8
  %59 = icmp sle i64 %57, %58
  br label %60

60:                                               ; preds = %52, %49
  %61 = phi i1 [ false, %49 ], [ %59, %52 ]
  br i1 %61, label %62, label %65

62:                                               ; preds = %60
  %63 = load i32, ptr %6, align 4, !tbaa !13
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %6, align 4, !tbaa !13
  br label %49, !llvm.loop !15

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %66 = load i64, ptr %5, align 8, !tbaa !8
  %67 = load i32, ptr %6, align 4, !tbaa !13
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [20 x i64], ptr @start, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !8
  %71 = sub nsw i64 %66, %70
  store i64 %71, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %72 = load i64, ptr %7, align 8, !tbaa !8
  %73 = load i32, ptr %6, align 4, !tbaa !13
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = sdiv i64 %72, %75
  store i64 %76, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %77 = load i64, ptr %7, align 8, !tbaa !8
  %78 = load i32, ptr %6, align 4, !tbaa !13
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = srem i64 %77, %80
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 1, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %83

83:                                               ; preds = %91, %65
  %84 = load i32, ptr %11, align 4, !tbaa !13
  %85 = load i32, ptr %6, align 4, !tbaa !13
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %94

88:                                               ; preds = %83
  %89 = load i64, ptr %10, align 8, !tbaa !8
  %90 = mul nsw i64 %89, 10
  store i64 %90, ptr %10, align 8, !tbaa !8
  br label %91

91:                                               ; preds = %88
  %92 = load i32, ptr %11, align 4, !tbaa !13
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %11, align 4, !tbaa !13
  br label %83, !llvm.loop !16

94:                                               ; preds = %87
  %95 = load i64, ptr %8, align 8, !tbaa !8
  %96 = load i64, ptr %10, align 8, !tbaa !8
  %97 = add nsw i64 %96, %95
  store i64 %97, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %98

98:                                               ; preds = %108, %94
  %99 = load i32, ptr %12, align 4, !tbaa !13
  %100 = load i32, ptr %6, align 4, !tbaa !13
  %101 = load i32, ptr %9, align 4, !tbaa !13
  %102 = sub nsw i32 %100, %101
  %103 = icmp slt i32 %99, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %111

105:                                              ; preds = %98
  %106 = load i64, ptr %10, align 8, !tbaa !8
  %107 = sdiv i64 %106, 10
  store i64 %107, ptr %10, align 8, !tbaa !8
  br label %108

108:                                              ; preds = %105
  %109 = load i32, ptr %12, align 4, !tbaa !13
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %12, align 4, !tbaa !13
  br label %98, !llvm.loop !17

111:                                              ; preds = %104
  %112 = load i64, ptr %10, align 8, !tbaa !8
  %113 = srem i64 %112, 10
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %41, !llvm.loop !18

116:                                              ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %117 = load i32, ptr %1, align 4
  ret i32 %117
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 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 #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 = { 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 = { 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 #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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@start = external dso_local local_unnamed_addr global [20 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 i64, align 8
  %2 = alloca i64, align 8
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load i64, ptr @start, align 16, !tbaa !8
  %10 = insertelement <2 x i64> poison, i64 %9, i64 0
  %11 = shufflevector <2 x i64> %10, <2 x i64> poison, <2 x i32> zeroinitializer
  %12 = add nsw <2 x i64> %11, <i64 9, i64 189>
  store <2 x i64> %12, ptr getelementptr inbounds (i8, ptr @start, i64 8), align 8, !tbaa !8
  %13 = add nsw <2 x i64> %11, <i64 2889, i64 38889>
  store <2 x i64> %13, ptr getelementptr inbounds (i8, ptr @start, i64 24), align 8, !tbaa !8
  %14 = add nsw <2 x i64> %11, <i64 488889, i64 5888889>
  store <2 x i64> %14, ptr getelementptr inbounds (i8, ptr @start, i64 40), align 8, !tbaa !8
  %15 = add nsw <2 x i64> %11, <i64 68888889, i64 788888889>
  store <2 x i64> %15, ptr getelementptr inbounds (i8, ptr @start, i64 56), align 8, !tbaa !8
  %16 = add nsw <2 x i64> %11, <i64 8888888889, i64 98888888889>
  store <2 x i64> %16, ptr getelementptr inbounds (i8, ptr @start, i64 72), align 8, !tbaa !8
  %17 = add nsw <2 x i64> %11, <i64 1088888888889, i64 11888888888889>
  store <2 x i64> %17, ptr getelementptr inbounds (i8, ptr @start, i64 88), align 8, !tbaa !8
  %18 = add nsw <2 x i64> %11, <i64 128888888888889, i64 1388888888888889>
  store <2 x i64> %18, ptr getelementptr inbounds (i8, ptr @start, i64 104), align 8, !tbaa !8
  %19 = add nsw <2 x i64> %11, <i64 14888888888888889, i64 158888888888888889>
  store <2 x i64> %19, ptr getelementptr inbounds (i8, ptr @start, i64 120), align 8, !tbaa !8
  %20 = add nsw i64 %9, 1688888888888888889
  store i64 %20, ptr getelementptr inbounds (i8, ptr @start, i64 136), align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %22 = load i64, ptr %1, align 8, !tbaa !8
  %23 = add nsw i64 %22, -1
  store i64 %23, ptr %1, align 8, !tbaa !8
  %.not44 = icmp eq i64 %22, 0
  br i1 %.not44, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %0, %._crit_edge42
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %25 = load i64, ptr %2, align 8, !tbaa !8
  %26 = add nsw i64 %25, -1
  store i64 %26, ptr %2, align 8, !tbaa !8
  %27 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 8), align 8, !tbaa !8
  %.not33.not.not = icmp slt i64 %27, %25
  br i1 %.not33.not.not, label %28, label %.critedge, !llvm.loop !11

28:                                               ; preds = %.lr.ph46
  %29 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 16), align 16, !tbaa !8
  %.not33.not.1 = icmp slt i64 %29, %25
  br i1 %.not33.not.1, label %30, label %.lr.ph.preheader, !llvm.loop !11

30:                                               ; preds = %28
  %31 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 24), align 8, !tbaa !8
  %.not33.not.2 = icmp slt i64 %31, %25
  br i1 %.not33.not.2, label %32, label %.lr.ph.preheader, !llvm.loop !11

32:                                               ; preds = %30
  %33 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 32), align 16, !tbaa !8
  %.not33.not.3 = icmp slt i64 %33, %25
  br i1 %.not33.not.3, label %34, label %.lr.ph.preheader, !llvm.loop !11

34:                                               ; preds = %32
  %35 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 40), align 8, !tbaa !8
  %.not33.not.4 = icmp slt i64 %35, %25
  br i1 %.not33.not.4, label %36, label %.lr.ph.preheader, !llvm.loop !11

36:                                               ; preds = %34
  %37 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 48), align 16, !tbaa !8
  %.not33.not.5 = icmp slt i64 %37, %25
  br i1 %.not33.not.5, label %38, label %.lr.ph.preheader, !llvm.loop !11

38:                                               ; preds = %36
  %39 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 56), align 8, !tbaa !8
  %.not33.not.6 = icmp slt i64 %39, %25
  br i1 %.not33.not.6, label %40, label %.lr.ph.preheader, !llvm.loop !11

40:                                               ; preds = %38
  %41 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 64), align 16, !tbaa !8
  %.not33.not.7 = icmp slt i64 %41, %25
  br i1 %.not33.not.7, label %42, label %.lr.ph.preheader, !llvm.loop !11

42:                                               ; preds = %40
  %43 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 72), align 8, !tbaa !8
  %.not33.not.8 = icmp slt i64 %43, %25
  br i1 %.not33.not.8, label %44, label %.lr.ph.preheader, !llvm.loop !11

44:                                               ; preds = %42
  %45 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 80), align 16, !tbaa !8
  %.not33.not.9 = icmp slt i64 %45, %25
  br i1 %.not33.not.9, label %46, label %.lr.ph.preheader, !llvm.loop !11

46:                                               ; preds = %44
  %47 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 88), align 8, !tbaa !8
  %.not33.not.10 = icmp slt i64 %47, %25
  br i1 %.not33.not.10, label %48, label %.lr.ph.preheader, !llvm.loop !11

48:                                               ; preds = %46
  %49 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 96), align 16, !tbaa !8
  %.not33.not.11 = icmp slt i64 %49, %25
  br i1 %.not33.not.11, label %50, label %.lr.ph.preheader, !llvm.loop !11

50:                                               ; preds = %48
  %51 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 104), align 8, !tbaa !8
  %.not33.not.12 = icmp slt i64 %51, %25
  br i1 %.not33.not.12, label %52, label %.lr.ph.preheader, !llvm.loop !11

52:                                               ; preds = %50
  %53 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 112), align 16, !tbaa !8
  %.not33.not.13 = icmp slt i64 %53, %25
  br i1 %.not33.not.13, label %54, label %.lr.ph.preheader, !llvm.loop !11

54:                                               ; preds = %52
  %55 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 120), align 8, !tbaa !8
  %.not33.not.14 = icmp slt i64 %55, %25
  br i1 %.not33.not.14, label %56, label %.lr.ph.preheader, !llvm.loop !11

56:                                               ; preds = %54
  %57 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 128), align 16, !tbaa !8
  %.not33.not.15 = icmp slt i64 %57, %25
  br i1 %.not33.not.15, label %58, label %.lr.ph.preheader, !llvm.loop !11

58:                                               ; preds = %56
  %59 = load i64, ptr getelementptr inbounds (i8, ptr @start, i64 136), align 8, !tbaa !8
  %.not33.not.16 = icmp slt i64 %59, %25
  %spec.select = select i1 %.not33.not.16, i32 17, i32 16
  br label %.lr.ph.preheader, !llvm.loop !11

.critedge:                                        ; preds = %.lr.ph46
  %60 = load i64, ptr @start, align 16, !tbaa !8
  %61 = sub nsw i64 %26, %60
  br label %._crit_edge

.lr.ph.preheader:                                 ; preds = %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28
  %.032.lcssa.ph = phi i32 [ 15, %56 ], [ 14, %54 ], [ 13, %52 ], [ 12, %50 ], [ 11, %48 ], [ 10, %46 ], [ 9, %44 ], [ 8, %42 ], [ 7, %40 ], [ 6, %38 ], [ 5, %36 ], [ 4, %34 ], [ 3, %32 ], [ 2, %30 ], [ 1, %28 ], [ %spec.select, %58 ]
  %62 = zext nneg i32 %.032.lcssa.ph to i64
  %63 = getelementptr inbounds [20 x i64], ptr @start, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !8
  %65 = sub nsw i64 %26, %64
  %66 = add nuw nsw i32 %.032.lcssa.ph, 1
  %67 = zext nneg i32 %66 to i64
  %68 = sdiv i64 %65, %67
  %69 = srem i64 %65, %67
  %70 = trunc i64 %69 to i32
  %xtraiter = and i32 %.032.lcssa.ph, 7
  %71 = icmp ult i32 %.032.lcssa.ph, 8
  br i1 %71, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %.032.lcssa.ph, 24
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph.preheader ], [ %79, %.lr.ph ]
  %.02936.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %79, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.02936.epil = phi i64 [ %72, %.lr.ph.epil ], [ %.02936.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %72 = mul nuw nsw i64 %.02936.epil, 10
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.loopexit, label %.lr.ph.epil, !llvm.loop !13

._crit_edge.loopexit:                             ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %72, %.lr.ph.epil ]
  %73 = sub nsw i32 %.032.lcssa.ph, %70
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.critedge
  %74 = phi i64 [ %61, %.critedge ], [ %68, %._crit_edge.loopexit ]
  %.029.lcssa = phi i64 [ 1, %.critedge ], [ %.lcssa, %._crit_edge.loopexit ]
  %75 = phi i32 [ 0, %.critedge ], [ %73, %._crit_edge.loopexit ]
  %76 = add nsw i64 %.029.lcssa, %74
  %77 = icmp sgt i32 %75, 0
  br i1 %77, label %.lr.ph41.preheader, label %._crit_edge42

.lr.ph41.preheader:                               ; preds = %._crit_edge
  %xtraiter59 = and i32 %75, 3
  %78 = icmp ult i32 %75, 4
  br i1 %78, label %._crit_edge42.loopexit.unr-lcssa, label %.lr.ph41.preheader.new

.lr.ph41.preheader.new:                           ; preds = %.lr.ph41.preheader
  %unroll_iter63 = and i32 %75, 2147483644
  br label %.lr.ph41

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.02936 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %79, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %79 = mul nuw i64 %.02936, 100000000
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !15

._crit_edge42.loopexit.unr-lcssa:                 ; preds = %.lr.ph41, %.lr.ph41.preheader
  %.lcssa57.ph = phi i64 [ poison, %.lr.ph41.preheader ], [ %86, %.lr.ph41 ]
  %.138.unr = phi i64 [ %76, %.lr.ph41.preheader ], [ %86, %.lr.ph41 ]
  %lcmp.mod61.not = icmp eq i32 %xtraiter59, 0
  br i1 %lcmp.mod61.not, label %._crit_edge42, label %.lr.ph41.epil

.lr.ph41.epil:                                    ; preds = %._crit_edge42.loopexit.unr-lcssa, %.lr.ph41.epil
  %.138.epil = phi i64 [ %80, %.lr.ph41.epil ], [ %.138.unr, %._crit_edge42.loopexit.unr-lcssa ]
  %epil.iter60 = phi i32 [ %epil.iter60.next, %.lr.ph41.epil ], [ 0, %._crit_edge42.loopexit.unr-lcssa ]
  %80 = sdiv i64 %.138.epil, 10
  %epil.iter60.next = add i32 %epil.iter60, 1
  %epil.iter60.cmp.not = icmp eq i32 %epil.iter60.next, %xtraiter59
  br i1 %epil.iter60.cmp.not, label %._crit_edge42, label %.lr.ph41.epil, !llvm.loop !16

._crit_edge42:                                    ; preds = %._crit_edge42.loopexit.unr-lcssa, %.lr.ph41.epil, %._crit_edge
  %.1.lcssa = phi i64 [ %76, %._crit_edge ], [ %.lcssa57.ph, %._crit_edge42.loopexit.unr-lcssa ], [ %80, %.lr.ph41.epil ]
  %81 = srem i64 %.1.lcssa, 10
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %81)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %84 = load i64, ptr %1, align 8, !tbaa !8
  %85 = add nsw i64 %84, -1
  store i64 %85, ptr %1, align 8, !tbaa !8
  %.not = icmp eq i64 %84, 0
  br i1 %.not, label %._crit_edge47, label %.lr.ph46, !llvm.loop !17

.lr.ph41:                                         ; preds = %.lr.ph41, %.lr.ph41.preheader.new
  %.138 = phi i64 [ %76, %.lr.ph41.preheader.new ], [ %86, %.lr.ph41 ]
  %niter64 = phi i32 [ 0, %.lr.ph41.preheader.new ], [ %niter64.next.3, %.lr.ph41 ]
  %86 = sdiv i64 %.138, 10000
  %niter64.next.3 = add i32 %niter64, 4
  %niter64.ncmp.3 = icmp eq i32 %niter64.next.3, %unroll_iter63
  br i1 %niter64.ncmp.3, label %._crit_edge42.loopexit.unr-lcssa, label %.lr.ph41, !llvm.loop !18

._crit_edge47:                                    ; preds = %._crit_edge42, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 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 #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 = { mustprogress 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 = { 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 #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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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