; LLVM IR from kazunetakahashi/atcoder :: 2017/1105_ARC079 (E)

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

@_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 i32, align 4
  %3 = alloca [100 x i64], align 16
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 800, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %23, %0
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %26

18:                                               ; preds = %13
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %20
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %21)
  br label %23

23:                                               ; preds = %18
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %4, align 4, !tbaa !5
  br label %13, !llvm.loop !9

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !13
  br label %27

27:                                               ; preds = %116, %26
  %28 = load i8, ptr %6, align 1, !tbaa !13, !range !15, !noundef !16
  %29 = trunc i8 %28 to i1
  %30 = xor i1 %29, true
  br i1 %30, label %31, label %117

31:                                               ; preds = %27
  store i8 1, ptr %6, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %48, %31
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 7, ptr %8, align 4
  br label %51

37:                                               ; preds = %32
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = icmp sle i64 %41, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %37
  br label %48

47:                                               ; preds = %37
  store i8 0, ptr %6, align 1, !tbaa !13
  store i32 7, ptr %8, align 4
  br label %51

48:                                               ; preds = %46
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !5
  br label %32, !llvm.loop !17

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

52:                                               ; preds = %51
  %53 = load i8, ptr %6, align 1, !tbaa !13, !range !15, !noundef !16
  %54 = trunc i8 %53 to i1
  br i1 %54, label %116, label %55

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %71, %55
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %74

61:                                               ; preds = %56
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = sdiv i64 %65, %67
  %69 = load i64, ptr %9, align 8, !tbaa !11
  %70 = add nsw i64 %69, %68
  store i64 %70, ptr %9, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %61
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %10, align 4, !tbaa !5
  br label %56, !llvm.loop !18

74:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %109, %74
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %112

80:                                               ; preds = %75
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = sdiv i64 %90, %92
  %94 = mul nsw i64 %86, %93
  %95 = sub nsw i64 %84, %94
  %96 = load i64, ptr %9, align 8, !tbaa !11
  %97 = add nsw i64 %95, %96
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !11
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = sdiv i64 %101, %103
  %105 = sub nsw i64 %97, %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [100 x i64], ptr %3, i64 0, i64 %107
  store i64 %105, ptr %108, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %80
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %11, align 4, !tbaa !5
  br label %75, !llvm.loop !19

112:                                              ; preds = %79
  %113 = load i64, ptr %9, align 8, !tbaa !11
  %114 = load i64, ptr %5, align 8, !tbaa !11
  %115 = add nsw i64 %114, %113
  store i64 %115, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %116

116:                                              ; preds = %112, %52
  br label %27, !llvm.loop !20

117:                                              ; preds = %27
  %118 = load i64, ptr %5, align 8, !tbaa !11
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %118)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 800, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %121 = load i32, ptr %1, align 4
  ret i32 %121
}

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

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

; 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)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 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) #3 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)) #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 = { 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 = { 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 = { 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 #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 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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

%"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" }

@_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 i32, align 4
  %2 = alloca [100 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %2) #5
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %.split.us

.preheader38:                                     ; preds = %.lr.ph
  %6 = icmp slt i32 %47, 1
  %7 = add nsw i32 %47, -1
  %8 = sext i32 %7 to i64
  %9 = icmp sgt i32 %47, 0
  %.neg = xor i64 %48, -1
  br i1 %6, label %.split.us, label %.preheader37.us52.preheader

.preheader37.us52.preheader:                      ; preds = %.preheader38
  %wide.trip.count = zext nneg i32 %47 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %10 = icmp eq i32 %47, 1
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %wide.trip.count102.pre-phi = zext nneg i32 %47 to i64
  %xtraiter133 = and i64 %wide.trip.count102.pre-phi, 1
  %11 = icmp eq i32 %47, 1
  %unroll_iter135 = and i64 %wide.trip.count102.pre-phi, 2147483646
  %lcmp.mod134.not = icmp eq i64 %xtraiter133, 0
  br label %.preheader37.us52.outer

.preheader37.us52.outer:                          ; preds = %._crit_edge.us, %.preheader37.us52.preheader
  %.02751.us53.ph = phi i64 [ %44, %._crit_edge.us ], [ 0, %.preheader37.us52.preheader ]
  %12 = load i64, ptr %2, align 16, !tbaa !9
  %.not.us82 = icmp sgt i64 %12, %8
  br label %.preheader37.us52

.preheader37.us52:                                ; preds = %.preheader37.us52.outer, %.thread.us54
  br i1 %.not.us82, label %.preheader36.us, label %.lr.ph83

.lr.ph83:                                         ; preds = %.preheader37.us52, %13
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %13 ], [ 1, %.preheader37.us52 ]
  %exitcond = icmp eq i64 %indvars.iv91, %wide.trip.count
  br i1 %exitcond, label %.thread.us54, label %13, !llvm.loop !11

13:                                               ; preds = %.lr.ph83
  %14 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv91
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %.not.us = icmp sgt i64 %15, %8
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  br i1 %.not.us, label %.preheader36.us.loopexit, label %.lr.ph83, !llvm.loop !11

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv99 = phi i64 [ %indvars.iv.next100.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter136 = phi i64 [ %niter136.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %16 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv99
  %17 = load i64, ptr %16, align 16, !tbaa !9
  %18 = sdiv i64 %17, %48
  %19 = add i64 %17, %.024.lcssa.us
  %.neg33.us = mul i64 %18, %.neg
  %20 = add i64 %19, %.neg33.us
  store i64 %20, ptr %16, align 16, !tbaa !9
  %indvars.iv.next100 = or disjoint i64 %indvars.iv99, 1
  %21 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv.next100
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = sdiv i64 %22, %48
  %24 = add i64 %22, %.024.lcssa.us
  %.neg33.us.1 = mul i64 %23, %.neg
  %25 = add i64 %24, %.neg33.us.1
  store i64 %25, ptr %21, align 8, !tbaa !9
  %indvars.iv.next100.1 = add nuw nsw i64 %indvars.iv99, 2
  %niter136.next.1 = add i64 %niter136, 2
  %niter136.ncmp.1 = icmp eq i64 %niter136.next.1, %unroll_iter135
  br i1 %niter136.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !13

.lr.ph47.us:                                      ; preds = %.lr.ph47.us.preheader, %.lr.ph47.us
  %indvars.iv94 = phi i64 [ %indvars.iv.next95.1, %.lr.ph47.us ], [ 0, %.lr.ph47.us.preheader ]
  %.02445.us = phi i64 [ %33, %.lr.ph47.us ], [ 0, %.lr.ph47.us.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph47.us ], [ 0, %.lr.ph47.us.preheader ]
  %26 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv94
  %27 = load i64, ptr %26, align 16, !tbaa !9
  %28 = sdiv i64 %27, %48
  %29 = add nsw i64 %28, %.02445.us
  %indvars.iv.next95 = or disjoint i64 %indvars.iv94, 1
  %30 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv.next95
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = sdiv i64 %31, %48
  %33 = add nsw i64 %32, %29
  %indvars.iv.next95.1 = add nuw nsw i64 %indvars.iv94, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.us.loopexit.unr-lcssa, label %.lr.ph47.us, !llvm.loop !14

.thread.us54:                                     ; preds = %.lr.ph83
  %.not = icmp slt i64 %indvars.iv91, %48
  br i1 %.not, label %.preheader37.us52, label %.split.us, !llvm.loop !15

.preheader.us.loopexit.unr-lcssa:                 ; preds = %.lr.ph47.us, %.lr.ph47.us.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph47.us.preheader ], [ %33, %.lr.ph47.us ]
  %indvars.iv94.unr = phi i64 [ 0, %.lr.ph47.us.preheader ], [ %indvars.iv.next95.1, %.lr.ph47.us ]
  %.02445.us.unr = phi i64 [ 0, %.lr.ph47.us.preheader ], [ %33, %.lr.ph47.us ]
  br i1 %lcmp.mod.not, label %.preheader.us, label %.lr.ph47.us.epil

.lr.ph47.us.epil:                                 ; preds = %.preheader.us.loopexit.unr-lcssa
  %34 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv94.unr
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = sdiv i64 %35, %48
  %37 = add nsw i64 %36, %.02445.us.unr
  br label %.preheader.us

.preheader.us:                                    ; preds = %.lr.ph47.us.epil, %.preheader.us.loopexit.unr-lcssa, %.preheader36.us
  %.024.lcssa.us = phi i64 [ 0, %.preheader36.us ], [ %.lcssa.ph, %.preheader.us.loopexit.unr-lcssa ], [ %37, %.lr.ph47.us.epil ]
  br i1 %11, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader36.us.loopexit:                         ; preds = %13
  %38 = icmp sge i64 %indvars.iv91, %48
  br label %.preheader36.us

.preheader36.us:                                  ; preds = %.preheader37.us52, %.preheader36.us.loopexit
  %.lcssa39.us = phi i1 [ %38, %.preheader36.us.loopexit ], [ false, %.preheader37.us52 ]
  br i1 %9, label %.lr.ph47.us.preheader, label %.preheader.us

.lr.ph47.us.preheader:                            ; preds = %.preheader36.us
  br i1 %10, label %.preheader.us.loopexit.unr-lcssa, label %.lr.ph47.us

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv99.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next100.1, %.preheader.us.new ]
  br i1 %lcmp.mod134.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %39 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv99.unr
  %40 = load i64, ptr %39, align 8, !tbaa !9
  %41 = sdiv i64 %40, %48
  %42 = add i64 %40, %.024.lcssa.us
  %.neg33.us.epil = mul i64 %41, %.neg
  %43 = add i64 %42, %.neg33.us.epil
  store i64 %43, ptr %39, align 8, !tbaa !9
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %44 = add nsw i64 %.024.lcssa.us, %.02751.us53.ph
  br i1 %.lcssa39.us, label %.split.us, label %.preheader37.us52.outer, !llvm.loop !15

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %45 = getelementptr inbounds [100 x i64], ptr %2, i64 0, i64 %indvars.iv
  %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) %45)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %.lr.ph, label %.preheader38, !llvm.loop !16

.split.us:                                        ; preds = %._crit_edge.us, %.thread.us54, %0, %.preheader38
  %.us-phi = phi i64 [ 0, %.preheader38 ], [ 0, %0 ], [ %.02751.us53.ph, %.thread.us54 ], [ %44, %._crit_edge.us ]
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.us-phi)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

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 #2

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

; 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 #3 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 #3 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)) #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 = { mustprogress 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 = { 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 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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