; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 1/1014. Product of Digits (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_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 [10 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #4
  %8 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 40, i1 false)
  %9 = 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)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %12, label %14

12:                                               ; preds = %0
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %86

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

17:                                               ; preds = %14
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %86

19:                                               ; preds = %14
  br label %20

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 9, ptr %5, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %41, %20
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = icmp sge i32 %22, 2
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %44

25:                                               ; preds = %21
  br label %26

26:                                               ; preds = %31, %25
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = srem i32 %27, %28
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %40

31:                                               ; preds = %26
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sdiv i32 %33, %32
  store i32 %34, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  br label %26, !llvm.loop !9

40:                                               ; preds = %26
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = add nsw i32 %42, -1
  store i32 %43, ptr %5, align 4, !tbaa !5
  br label %21, !llvm.loop !11

44:                                               ; preds = %24
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 1
  br i1 %46, label %47, label %56

47:                                               ; preds = %44
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 10
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %53, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %50, %47, %44
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = icmp ne i32 %57, 1
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %86

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %82, %61
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = icmp sle i32 %63, 9
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %85

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %78, %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp slt i32 %68, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %67
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %81

75:                                               ; preds = %67
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %76)
  br label %78

78:                                               ; preds = %75
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %67, !llvm.loop !12

81:                                               ; preds = %74
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %6, align 4, !tbaa !5
  br label %62, !llvm.loop !13

85:                                               ; preds = %65
  store i32 0, ptr %4, align 4
  br label %86

86:                                               ; preds = %85, %59, %17, %12
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %87 = load i32, ptr %4, align 4
  switch i32 %87, label %90 [
    i32 0, label %88
    i32 1, label %88
  ]

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

90:                                               ; preds = %86
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %2 = 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)
  %3 = load i32, ptr %1, align 4
  switch i32 %3, label %.preheader21 [
    i32 1, label %.loopexit.sink.split
    i32 0, label %6
  ]

.preheader21:                                     ; preds = %0
  %4 = srem i32 %3, 9
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %.lr.ph, label %.preheader20.1

6:                                                ; preds = %0
  br label %.loopexit.sink.split

.lr.ph:                                           ; preds = %.preheader21, %.lr.ph
  %7 = phi i32 [ %10, %.lr.ph ], [ 0, %.preheader21 ]
  %8 = phi i32 [ %9, %.lr.ph ], [ %3, %.preheader21 ]
  %9 = sdiv i32 %8, 9
  %10 = add nuw nsw i32 %7, 1
  %11 = srem i32 %9, 9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph
  store i32 %9, ptr %1, align 4, !tbaa !7
  br label %.preheader20.1

.preheader20.1:                                   ; preds = %._crit_edge, %.preheader21
  %13 = phi i32 [ %10, %._crit_edge ], [ 0, %.preheader21 ]
  %.lcssa25 = phi i32 [ %9, %._crit_edge ], [ %3, %.preheader21 ]
  %14 = and i32 %.lcssa25, 7
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %.lr.ph.1, label %.preheader20.2

.lr.ph.1:                                         ; preds = %.preheader20.1, %.lr.ph.1
  %16 = phi i32 [ %19, %.lr.ph.1 ], [ 0, %.preheader20.1 ]
  %17 = phi i32 [ %18, %.lr.ph.1 ], [ %.lcssa25, %.preheader20.1 ]
  %18 = sdiv i32 %17, 8
  %19 = add nuw nsw i32 %16, 1
  %20 = and i32 %18, 7
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !5

._crit_edge.1:                                    ; preds = %.lr.ph.1
  store i32 %18, ptr %1, align 4, !tbaa !7
  br label %.preheader20.2

.preheader20.2:                                   ; preds = %._crit_edge.1, %.preheader20.1
  %22 = phi i32 [ %19, %._crit_edge.1 ], [ 0, %.preheader20.1 ]
  %.lcssa25.1 = phi i32 [ %18, %._crit_edge.1 ], [ %.lcssa25, %.preheader20.1 ]
  %23 = srem i32 %.lcssa25.1, 7
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %.lr.ph.2, label %.preheader20.3

.lr.ph.2:                                         ; preds = %.preheader20.2, %.lr.ph.2
  %25 = phi i32 [ %28, %.lr.ph.2 ], [ 0, %.preheader20.2 ]
  %26 = phi i32 [ %27, %.lr.ph.2 ], [ %.lcssa25.1, %.preheader20.2 ]
  %27 = sdiv i32 %26, 7
  %28 = add nuw nsw i32 %25, 1
  %29 = srem i32 %27, 7
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !5

._crit_edge.2:                                    ; preds = %.lr.ph.2
  store i32 %27, ptr %1, align 4, !tbaa !7
  br label %.preheader20.3

.preheader20.3:                                   ; preds = %._crit_edge.2, %.preheader20.2
  %31 = phi i32 [ %28, %._crit_edge.2 ], [ 0, %.preheader20.2 ]
  %.lcssa25.2 = phi i32 [ %27, %._crit_edge.2 ], [ %.lcssa25.1, %.preheader20.2 ]
  %32 = srem i32 %.lcssa25.2, 6
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %.lr.ph.3, label %.preheader20.4

.lr.ph.3:                                         ; preds = %.preheader20.3, %.lr.ph.3
  %34 = phi i32 [ %37, %.lr.ph.3 ], [ 0, %.preheader20.3 ]
  %35 = phi i32 [ %36, %.lr.ph.3 ], [ %.lcssa25.2, %.preheader20.3 ]
  %36 = sdiv i32 %35, 6
  %37 = add nuw nsw i32 %34, 1
  %38 = srem i32 %36, 6
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %.lr.ph.3, label %._crit_edge.3, !llvm.loop !5

._crit_edge.3:                                    ; preds = %.lr.ph.3
  store i32 %36, ptr %1, align 4, !tbaa !7
  br label %.preheader20.4

.preheader20.4:                                   ; preds = %._crit_edge.3, %.preheader20.3
  %40 = phi i32 [ %37, %._crit_edge.3 ], [ 0, %.preheader20.3 ]
  %.lcssa25.3 = phi i32 [ %36, %._crit_edge.3 ], [ %.lcssa25.2, %.preheader20.3 ]
  %41 = srem i32 %.lcssa25.3, 5
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %.lr.ph.4, label %.preheader20.5

.lr.ph.4:                                         ; preds = %.preheader20.4, %.lr.ph.4
  %43 = phi i32 [ %46, %.lr.ph.4 ], [ 0, %.preheader20.4 ]
  %44 = phi i32 [ %45, %.lr.ph.4 ], [ %.lcssa25.3, %.preheader20.4 ]
  %45 = sdiv i32 %44, 5
  %46 = add nuw nsw i32 %43, 1
  %47 = srem i32 %45, 5
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %.lr.ph.4, label %._crit_edge.4, !llvm.loop !5

._crit_edge.4:                                    ; preds = %.lr.ph.4
  store i32 %45, ptr %1, align 4, !tbaa !7
  br label %.preheader20.5

.preheader20.5:                                   ; preds = %._crit_edge.4, %.preheader20.4
  %49 = phi i32 [ %46, %._crit_edge.4 ], [ 0, %.preheader20.4 ]
  %.lcssa25.4 = phi i32 [ %45, %._crit_edge.4 ], [ %.lcssa25.3, %.preheader20.4 ]
  %50 = and i32 %.lcssa25.4, 3
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %.lr.ph.5, label %.preheader20.6

.lr.ph.5:                                         ; preds = %.preheader20.5, %.lr.ph.5
  %52 = phi i32 [ %55, %.lr.ph.5 ], [ 0, %.preheader20.5 ]
  %53 = phi i32 [ %54, %.lr.ph.5 ], [ %.lcssa25.4, %.preheader20.5 ]
  %54 = sdiv i32 %53, 4
  %55 = add nuw nsw i32 %52, 1
  %56 = and i32 %54, 3
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %.lr.ph.5, label %._crit_edge.5, !llvm.loop !5

._crit_edge.5:                                    ; preds = %.lr.ph.5
  store i32 %54, ptr %1, align 4, !tbaa !7
  br label %.preheader20.6

.preheader20.6:                                   ; preds = %._crit_edge.5, %.preheader20.5
  %58 = phi i32 [ %55, %._crit_edge.5 ], [ 0, %.preheader20.5 ]
  %.lcssa25.5 = phi i32 [ %54, %._crit_edge.5 ], [ %.lcssa25.4, %.preheader20.5 ]
  %59 = srem i32 %.lcssa25.5, 3
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %.lr.ph.6, label %.preheader20.7

.lr.ph.6:                                         ; preds = %.preheader20.6, %.lr.ph.6
  %61 = phi i32 [ %64, %.lr.ph.6 ], [ 0, %.preheader20.6 ]
  %62 = phi i32 [ %63, %.lr.ph.6 ], [ %.lcssa25.5, %.preheader20.6 ]
  %63 = sdiv i32 %62, 3
  %64 = add nuw nsw i32 %61, 1
  %65 = srem i32 %63, 3
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %.lr.ph.6, label %._crit_edge.6, !llvm.loop !5

._crit_edge.6:                                    ; preds = %.lr.ph.6
  store i32 %63, ptr %1, align 4, !tbaa !7
  br label %.preheader20.7

.preheader20.7:                                   ; preds = %._crit_edge.6, %.preheader20.6
  %67 = phi i32 [ %64, %._crit_edge.6 ], [ 0, %.preheader20.6 ]
  %.lcssa25.6 = phi i32 [ %63, %._crit_edge.6 ], [ %.lcssa25.5, %.preheader20.6 ]
  %68 = and i32 %.lcssa25.6, 1
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %.lr.ph.7, label %76

.lr.ph.7:                                         ; preds = %.preheader20.7, %.lr.ph.7
  %70 = phi i32 [ %73, %.lr.ph.7 ], [ 0, %.preheader20.7 ]
  %71 = phi i32 [ %72, %.lr.ph.7 ], [ %.lcssa25.6, %.preheader20.7 ]
  %72 = sdiv i32 %71, 2
  %73 = add nuw nsw i32 %70, 1
  %74 = and i32 %72, 1
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %.lr.ph.7, label %._crit_edge.7, !llvm.loop !5

._crit_edge.7:                                    ; preds = %.lr.ph.7
  store i32 %72, ptr %1, align 4, !tbaa !7
  br label %76

76:                                               ; preds = %._crit_edge.7, %.preheader20.7
  %77 = phi i32 [ %73, %._crit_edge.7 ], [ 0, %.preheader20.7 ]
  %78 = phi i32 [ %72, %._crit_edge.7 ], [ %.lcssa25.6, %.preheader20.7 ]
  %.not = icmp eq i32 %78, 1
  br i1 %.not, label %.preheader.preheader, label %.loopexit.sink.split

.preheader.preheader:                             ; preds = %76
  %79 = icmp sgt i32 %77, 0
  br i1 %79, label %.lr.ph30, label %._crit_edge31

._crit_edge31:                                    ; preds = %.lr.ph30, %.preheader.preheader
  %80 = icmp sgt i32 %67, 0
  br i1 %80, label %.lr.ph30.1, label %._crit_edge31.1

.lr.ph30.1:                                       ; preds = %._crit_edge31, %.lr.ph30.1
  %.029.1 = phi i32 [ %82, %.lr.ph30.1 ], [ 0, %._crit_edge31 ]
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 3)
  %82 = add nuw nsw i32 %.029.1, 1
  %exitcond.1.not = icmp eq i32 %82, %67
  br i1 %exitcond.1.not, label %._crit_edge31.1, label %.lr.ph30.1, !llvm.loop !11

._crit_edge31.1:                                  ; preds = %.lr.ph30.1, %._crit_edge31
  %83 = icmp sgt i32 %58, 0
  br i1 %83, label %.lr.ph30.2, label %._crit_edge31.2

.lr.ph30.2:                                       ; preds = %._crit_edge31.1, %.lr.ph30.2
  %.029.2 = phi i32 [ %85, %.lr.ph30.2 ], [ 0, %._crit_edge31.1 ]
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 4)
  %85 = add nuw nsw i32 %.029.2, 1
  %exitcond.2.not = icmp eq i32 %85, %58
  br i1 %exitcond.2.not, label %._crit_edge31.2, label %.lr.ph30.2, !llvm.loop !11

._crit_edge31.2:                                  ; preds = %.lr.ph30.2, %._crit_edge31.1
  %86 = icmp sgt i32 %49, 0
  br i1 %86, label %.lr.ph30.3, label %._crit_edge31.3

.lr.ph30.3:                                       ; preds = %._crit_edge31.2, %.lr.ph30.3
  %.029.3 = phi i32 [ %88, %.lr.ph30.3 ], [ 0, %._crit_edge31.2 ]
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 5)
  %88 = add nuw nsw i32 %.029.3, 1
  %exitcond.3.not = icmp eq i32 %88, %49
  br i1 %exitcond.3.not, label %._crit_edge31.3, label %.lr.ph30.3, !llvm.loop !11

._crit_edge31.3:                                  ; preds = %.lr.ph30.3, %._crit_edge31.2
  %89 = icmp sgt i32 %40, 0
  br i1 %89, label %.lr.ph30.4, label %._crit_edge31.4

.lr.ph30.4:                                       ; preds = %._crit_edge31.3, %.lr.ph30.4
  %.029.4 = phi i32 [ %91, %.lr.ph30.4 ], [ 0, %._crit_edge31.3 ]
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 6)
  %91 = add nuw nsw i32 %.029.4, 1
  %exitcond.4.not = icmp eq i32 %91, %40
  br i1 %exitcond.4.not, label %._crit_edge31.4, label %.lr.ph30.4, !llvm.loop !11

._crit_edge31.4:                                  ; preds = %.lr.ph30.4, %._crit_edge31.3
  %92 = icmp sgt i32 %31, 0
  br i1 %92, label %.lr.ph30.5, label %._crit_edge31.5

.lr.ph30.5:                                       ; preds = %._crit_edge31.4, %.lr.ph30.5
  %.029.5 = phi i32 [ %94, %.lr.ph30.5 ], [ 0, %._crit_edge31.4 ]
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 7)
  %94 = add nuw nsw i32 %.029.5, 1
  %exitcond.5.not = icmp eq i32 %94, %31
  br i1 %exitcond.5.not, label %._crit_edge31.5, label %.lr.ph30.5, !llvm.loop !11

._crit_edge31.5:                                  ; preds = %.lr.ph30.5, %._crit_edge31.4
  %95 = icmp sgt i32 %22, 0
  br i1 %95, label %.lr.ph30.6, label %._crit_edge31.6

.lr.ph30.6:                                       ; preds = %._crit_edge31.5, %.lr.ph30.6
  %.029.6 = phi i32 [ %97, %.lr.ph30.6 ], [ 0, %._crit_edge31.5 ]
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 8)
  %97 = add nuw nsw i32 %.029.6, 1
  %exitcond.6.not = icmp eq i32 %97, %22
  br i1 %exitcond.6.not, label %._crit_edge31.6, label %.lr.ph30.6, !llvm.loop !11

._crit_edge31.6:                                  ; preds = %.lr.ph30.6, %._crit_edge31.5
  %98 = icmp sgt i32 %13, 0
  br i1 %98, label %.lr.ph30.7, label %.loopexit

.lr.ph30.7:                                       ; preds = %._crit_edge31.6, %.lr.ph30.7
  %.029.7 = phi i32 [ %100, %.lr.ph30.7 ], [ 0, %._crit_edge31.6 ]
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 9)
  %100 = add nuw nsw i32 %.029.7, 1
  %exitcond.7.not = icmp eq i32 %100, %13
  br i1 %exitcond.7.not, label %.loopexit, label %.lr.ph30.7, !llvm.loop !11

.lr.ph30:                                         ; preds = %.preheader.preheader, %.lr.ph30
  %.029 = phi i32 [ %102, %.lr.ph30 ], [ 0, %.preheader.preheader ]
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 2)
  %102 = add nuw nsw i32 %.029, 1
  %exitcond.not = icmp eq i32 %102, %77
  br i1 %exitcond.not, label %._crit_edge31, label %.lr.ph30, !llvm.loop !11

.loopexit.sink.split:                             ; preds = %76, %0, %6
  %.sink = phi i32 [ 10, %6 ], [ %3, %0 ], [ -1, %76 ]
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sink)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph30.7, %.loopexit.sink.split, %._crit_edge31.6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}


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