; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/1212 (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
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [9 x i32], align 16
  %6 = alloca [9 x i32], align 16
  %7 = alloca [9 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr %6) #5
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr %7) #5
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  br label %13

13:                                               ; preds = %153, %0
  br label %14

14:                                               ; preds = %13
  store i32 0, ptr %4, align 4, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %23

19:                                               ; preds = %14
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %19
  br label %154

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

24:                                               ; preds = %56, %23
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp ugt i32 %25, 0
  br i1 %26, label %30, label %27

27:                                               ; preds = %24
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp ugt i32 %28, 0
  br label %30

30:                                               ; preds = %27, %24
  %31 = phi i1 [ true, %24 ], [ %29, %27 ]
  br i1 %31, label %32, label %61

32:                                               ; preds = %30
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = icmp ugt i32 %33, 0
  br i1 %34, label %35, label %44

35:                                               ; preds = %32
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = urem i32 %36, 10
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %9, align 4, !tbaa !5
  %40 = sext i32 %38 to i64
  %41 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %40
  store i32 %37, ptr %41, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = udiv i32 %42, 10
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %35, %32
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = icmp ugt i32 %45, 0
  br i1 %46, label %47, label %56

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

56:                                               ; preds = %47, %44
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !5
  %59 = sext i32 %57 to i64
  %60 = getelementptr inbounds [9 x i32], ptr %7, i64 0, i64 %59
  store i32 0, ptr %60, align 4, !tbaa !5
  br label %24, !llvm.loop !9

61:                                               ; preds = %30
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = icmp sgt i32 %62, %63
  br i1 %64, label %65, label %76

65:                                               ; preds = %61
  %66 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %66, ptr %8, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %70, %65
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = icmp slt i32 %68, 9
  br i1 %69, label %70, label %75

70:                                               ; preds = %67
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !5
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds [9 x i32], ptr %6, i64 0, i64 %73
  store i32 0, ptr %74, align 4, !tbaa !5
  br label %67, !llvm.loop !11

75:                                               ; preds = %67
  br label %87

76:                                               ; preds = %61
  %77 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %77, ptr %8, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %81, %76
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = icmp slt i32 %79, 9
  br i1 %80, label %81, label %86

81:                                               ; preds = %78
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !5
  %84 = sext i32 %82 to i64
  %85 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %84
  store i32 0, ptr %85, align 4, !tbaa !5
  br label %78, !llvm.loop !12

86:                                               ; preds = %78
  br label %87

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

88:                                               ; preds = %135, %87
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = icmp ult i32 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [9 x i32], ptr %6, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add i32 %97, %101
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [9 x i32], ptr %7, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = add i32 %102, %107
  %109 = icmp uge i32 %108, 10
  br i1 %109, label %110, label %132

110:                                              ; preds = %93
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [9 x i32], ptr %6, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = add i32 %114, %118
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [9 x i32], ptr %7, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add i32 %119, %124
  %126 = udiv i32 %125, 10
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [9 x i32], ptr %7, i64 0, i64 %128
  store i32 %126, ptr %129, align 4, !tbaa !5
  %130 = load i32, ptr %4, align 4, !tbaa !5
  %131 = add i32 %130, 1
  store i32 %131, ptr %4, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %110, %93
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %11, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %132
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %12, align 4, !tbaa !5
  br label %88, !llvm.loop !13

138:                                              ; preds = %92
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %143

141:                                              ; preds = %138
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %153

143:                                              ; preds = %138
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = icmp eq i32 %144, 1
  br i1 %145, label %146, label %148

146:                                              ; preds = %143
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %152

148:                                              ; preds = %143
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @.str.2)
  br label %152

152:                                              ; preds = %148, %146
  br label %153

153:                                              ; preds = %152, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %13, !llvm.loop !14

154:                                              ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

; 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

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 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [9 x i32], align 16
  %4 = alloca [9 x i32], align 16
  %5 = alloca [9 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %4, i8 0, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %5, i8 0, i64 36, i1 false)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp eq i32 %8, 0
  %10 = load i32, ptr %2, align 4
  %11 = icmp eq i32 %10, 0
  %or.cond65 = select i1 %9, i1 %11, i1 false
  br i1 %or.cond65, label %._crit_edge66, label %.preheader42

.preheader42:                                     ; preds = %0, %66
  %.promoted45 = phi i32 [ %71, %66 ], [ %10, %0 ]
  %.promoted = phi i32 [ %69, %66 ], [ %8, %0 ]
  %12 = icmp ne i32 %.promoted, 0
  %13 = icmp ne i32 %.promoted45, 0
  %14 = select i1 %12, i1 true, i1 %13
  br i1 %14, label %.lr.ph, label %.loopexit.sink.split

.lr.ph:                                           ; preds = %.preheader42, %31
  %indvars.iv = phi i64 [ %indvars.iv.next, %31 ], [ 0, %.preheader42 ]
  %15 = phi i1 [ %33, %31 ], [ %12, %.preheader42 ]
  %.02851 = phi i32 [ %.129, %31 ], [ 0, %.preheader42 ]
  %.03050 = phi i32 [ %.131, %31 ], [ 0, %.preheader42 ]
  %16 = phi i32 [ %.pr44, %31 ], [ %.promoted, %.preheader42 ]
  %17 = phi i32 [ %.pr3947, %31 ], [ %.promoted45, %.preheader42 ]
  br i1 %15, label %18, label %24

18:                                               ; preds = %.lr.ph
  %19 = urem i32 %16, 10
  %20 = add nsw i32 %.03050, 1
  %21 = sext i32 %.03050 to i64
  %22 = getelementptr inbounds [9 x i32], ptr %3, i64 0, i64 %21
  store i32 %19, ptr %22, align 4, !tbaa !5
  %23 = udiv i32 %16, 10
  store i32 %23, ptr %1, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %18, %.lr.ph
  %.pr44 = phi i32 [ %23, %18 ], [ %16, %.lr.ph ]
  %.131 = phi i32 [ %20, %18 ], [ %.03050, %.lr.ph ]
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %31, label %25

25:                                               ; preds = %24
  %26 = urem i32 %17, 10
  %27 = add nsw i32 %.02851, 1
  %28 = sext i32 %.02851 to i64
  %29 = getelementptr inbounds [9 x i32], ptr %4, i64 0, i64 %28
  store i32 %26, ptr %29, align 4, !tbaa !5
  %30 = udiv i32 %17, 10
  store i32 %30, ptr %2, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %25, %24
  %.pr3947 = phi i32 [ %30, %25 ], [ 0, %24 ]
  %.129 = phi i32 [ %27, %25 ], [ %.02851, %24 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %indvars.iv
  store i32 0, ptr %32, align 4, !tbaa !5
  %33 = icmp ne i32 %.pr44, 0
  %34 = icmp ne i32 %.pr3947, 0
  %35 = select i1 %33, i1 true, i1 %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %31
  %36 = icmp sgt i32 %.131, %.129
  br i1 %36, label %.preheader, label %.preheader40

.preheader40:                                     ; preds = %._crit_edge
  %37 = icmp slt i32 %.131, 9
  br i1 %37, label %.loopexit.sink.split, label %.loopexit

.preheader:                                       ; preds = %._crit_edge
  %38 = icmp slt i32 %.129, 9
  br i1 %38, label %.loopexit.sink.split, label %.loopexit

.loopexit.sink.split:                             ; preds = %.preheader, %.preheader40, %.preheader42
  %.030.lcssa8590.sink96 = phi i32 [ %.131, %.preheader40 ], [ 0, %.preheader42 ], [ %.129, %.preheader ]
  %.sink = phi ptr [ %3, %.preheader40 ], [ %3, %.preheader42 ], [ %4, %.preheader ]
  %.033.ph = phi i32 [ %.129, %.preheader40 ], [ 0, %.preheader42 ], [ %.131, %.preheader ]
  %39 = sext i32 %.030.lcssa8590.sink96 to i64
  %40 = shl nsw i64 %39, 2
  %scevgep = getelementptr i8, ptr %.sink, i64 %40
  %41 = sub i32 8, %.030.lcssa8590.sink96
  %42 = zext i32 %41 to i64
  %43 = shl nuw nsw i64 %42, 2
  %44 = add nuw nsw i64 %43, 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %44, i1 false), !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %.preheader40, %.preheader
  %.033 = phi i32 [ %.131, %.preheader ], [ %.129, %.preheader40 ], [ %.033.ph, %.loopexit.sink.split ]
  %.not67 = icmp eq i32 %.033, 0
  br i1 %.not67, label %._crit_edge63.thread, label %.lr.ph62.preheader

.lr.ph62.preheader:                               ; preds = %.loopexit
  %wide.trip.count = zext i32 %.033 to i64
  br label %.lr.ph62

._crit_edge63:                                    ; preds = %59
  switch i32 %.135, label %63 [
    i32 0, label %._crit_edge63.thread
    i32 1, label %61
  ]

.lr.ph62:                                         ; preds = %.lr.ph62.preheader, %59
  %indvars.iv78 = phi i64 [ 1, %.lr.ph62.preheader ], [ %indvars.iv.next79, %59 ]
  %indvars.iv76 = phi i64 [ 0, %.lr.ph62.preheader ], [ %indvars.iv.next77, %59 ]
  %.03458 = phi i32 [ 0, %.lr.ph62.preheader ], [ %.135, %59 ]
  %45 = getelementptr inbounds [9 x i32], ptr %3, i64 0, i64 %indvars.iv76
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = getelementptr inbounds [9 x i32], ptr %4, i64 0, i64 %indvars.iv76
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add i32 %48, %46
  %50 = add nsw i64 %indvars.iv78, -1
  %51 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add i32 %49, %52
  %54 = icmp ugt i32 %53, 9
  br i1 %54, label %55, label %59

55:                                               ; preds = %.lr.ph62
  %56 = udiv i32 %53, 10
  %57 = getelementptr inbounds [9 x i32], ptr %5, i64 0, i64 %indvars.iv78
  store i32 %56, ptr %57, align 4, !tbaa !5
  %58 = add i32 %.03458, 1
  br label %59

59:                                               ; preds = %55, %.lr.ph62
  %.135 = phi i32 [ %58, %55 ], [ %.03458, %.lr.ph62 ]
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge63, label %.lr.ph62, !llvm.loop !11

._crit_edge63.thread:                             ; preds = %.loopexit, %._crit_edge63
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %66

61:                                               ; preds = %._crit_edge63
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  br label %66

63:                                               ; preds = %._crit_edge63
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.135)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @.str.2)
  br label %66

66:                                               ; preds = %61, %63, %._crit_edge63.thread
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 0
  %71 = load i32, ptr %2, align 4
  %72 = icmp eq i32 %71, 0
  %or.cond = select i1 %70, i1 %72, i1 false
  br i1 %or.cond, label %._crit_edge66, label %.preheader42, !llvm.loop !12

._crit_edge66:                                    ; preds = %66, %0
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, 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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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