; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #811 (Div. 3)/E. Add Modulo 10.ll (Z5solvev)

; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = call ptr @llvm.stacksave.p0()
  store ptr %17, ptr %2, align 8
  %18 = alloca i64, i64 %16, align 16
  store i64 %16, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr %18, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %19 = load ptr, ptr %5, align 8, !tbaa !11
  store ptr %19, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !11
  %21 = mul nuw i64 8, %16
  %22 = udiv i64 %21, 8
  %23 = getelementptr inbounds i64, ptr %20, i64 %22
  store ptr %23, ptr %7, align 8, !tbaa !11
  br label %24

24:                                               ; preds = %85, %0
  %25 = load ptr, ptr %6, align 8, !tbaa !11
  %26 = load ptr, ptr %7, align 8, !tbaa !11
  %27 = icmp ne ptr %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %88

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %30 = load ptr, ptr %6, align 8, !tbaa !11
  store ptr %30, ptr %8, align 8, !tbaa !11
  %31 = load ptr, ptr %8, align 8, !tbaa !11
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %33 = load ptr, ptr %8, align 8, !tbaa !11
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = srem i64 %34, 10
  store i64 %35, ptr %9, align 8, !tbaa !5
  %36 = load i64, ptr %9, align 8, !tbaa !5
  %37 = icmp eq i64 %36, 1
  br i1 %37, label %47, label %38

38:                                               ; preds = %29
  %39 = load i64, ptr %9, align 8, !tbaa !5
  %40 = icmp eq i64 %39, 2
  br i1 %40, label %47, label %41

41:                                               ; preds = %38
  %42 = load i64, ptr %9, align 8, !tbaa !5
  %43 = icmp eq i64 %42, 4
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load i64, ptr %9, align 8, !tbaa !5
  %46 = icmp eq i64 %45, 8
  br i1 %46, label %47, label %54

47:                                               ; preds = %44, %41, %38, %29
  %48 = load ptr, ptr %8, align 8, !tbaa !11
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = sdiv i64 %49, 10
  %51 = mul nsw i64 %50, 10
  %52 = add nsw i64 %51, 8
  %53 = load ptr, ptr %8, align 8, !tbaa !11
  store i64 %52, ptr %53, align 8, !tbaa !5
  br label %84

54:                                               ; preds = %44
  %55 = load i64, ptr %9, align 8, !tbaa !5
  %56 = icmp eq i64 %55, 6
  br i1 %56, label %66, label %57

57:                                               ; preds = %54
  %58 = load i64, ptr %9, align 8, !tbaa !5
  %59 = icmp eq i64 %58, 7
  br i1 %59, label %66, label %60

60:                                               ; preds = %57
  %61 = load i64, ptr %9, align 8, !tbaa !5
  %62 = icmp eq i64 %61, 3
  br i1 %62, label %66, label %63

63:                                               ; preds = %60
  %64 = load i64, ptr %9, align 8, !tbaa !5
  %65 = icmp eq i64 %64, 9
  br i1 %65, label %66, label %74

66:                                               ; preds = %63, %60, %57, %54
  %67 = load ptr, ptr %8, align 8, !tbaa !11
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = sdiv i64 %68, 10
  %70 = add nsw i64 %69, 1
  %71 = mul nsw i64 %70, 10
  %72 = add nsw i64 %71, 8
  %73 = load ptr, ptr %8, align 8, !tbaa !11
  store i64 %72, ptr %73, align 8, !tbaa !5
  br label %83

74:                                               ; preds = %63
  %75 = load i64, ptr %9, align 8, !tbaa !5
  %76 = icmp eq i64 %75, 5
  br i1 %76, label %77, label %81

77:                                               ; preds = %74
  %78 = load ptr, ptr %8, align 8, !tbaa !11
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = add nsw i64 %79, 5
  store i64 %80, ptr %78, align 8, !tbaa !5
  store i8 1, ptr %4, align 1, !tbaa !9
  br label %82

81:                                               ; preds = %74
  store i8 1, ptr %4, align 1, !tbaa !9
  br label %82

82:                                               ; preds = %81, %77
  br label %83

83:                                               ; preds = %82, %66
  br label %84

84:                                               ; preds = %83, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %6, align 8, !tbaa !11
  %87 = getelementptr inbounds i64, ptr %86, i32 1
  store ptr %87, ptr %6, align 8, !tbaa !11
  br label %24

88:                                               ; preds = %28
  %89 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %114

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %108, %91
  %93 = load i64, ptr %10, align 8, !tbaa !5
  %94 = load i64, ptr %1, align 8, !tbaa !5
  %95 = icmp slt i64 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 4, ptr %11, align 4
  br label %111

97:                                               ; preds = %92
  %98 = load i64, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds i64, ptr %18, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds i64, ptr %18, i64 0
  %102 = load i64, ptr %101, align 16, !tbaa !5
  %103 = icmp ne i64 %100, %102
  br i1 %103, label %104, label %107

104:                                              ; preds = %97
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str.1)
  store i32 1, ptr %11, align 4
  br label %111

107:                                              ; preds = %97
  br label %108

108:                                              ; preds = %107
  %109 = load i64, ptr %10, align 8, !tbaa !5
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %10, align 8, !tbaa !5
  br label %92, !llvm.loop !15

111:                                              ; preds = %104, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %112 = load i32, ptr %11, align 4
  switch i32 %112, label %149 [
    i32 4, label %113
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %115 = getelementptr inbounds i64, ptr %18, i64 0
  %116 = load i64, ptr %115, align 16, !tbaa !5
  %117 = sdiv i64 %116, 10
  store i64 %117, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %140, %114
  %119 = load i64, ptr %13, align 8, !tbaa !5
  %120 = load i64, ptr %1, align 8, !tbaa !5
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 7, ptr %11, align 4
  br label %143

123:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %124 = load i64, ptr %13, align 8, !tbaa !5
  %125 = getelementptr inbounds i64, ptr %18, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !5
  %127 = sdiv i64 %126, 10
  store i64 %127, ptr %14, align 8, !tbaa !5
  %128 = load i64, ptr %14, align 8, !tbaa !5
  %129 = srem i64 %128, 2
  %130 = load i64, ptr %12, align 8, !tbaa !5
  %131 = srem i64 %130, 2
  %132 = icmp ne i64 %129, %131
  br i1 %132, label %133, label %136

133:                                              ; preds = %123
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef @.str.1)
  store i32 1, ptr %11, align 4
  br label %137

136:                                              ; preds = %123
  store i32 0, ptr %11, align 4
  br label %137

137:                                              ; preds = %136, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %138 = load i32, ptr %11, align 4
  switch i32 %138, label %143 [
    i32 0, label %139
  ]

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139
  %141 = load i64, ptr %13, align 8, !tbaa !5
  %142 = add nsw i64 %141, 1
  store i64 %142, ptr %13, align 8, !tbaa !5
  br label %118, !llvm.loop !17

143:                                              ; preds = %137, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %144 = load i32, ptr %11, align 4
  switch i32 %144, label %148 [
    i32 7, label %145
  ]

145:                                              ; preds = %143
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef @.str.1)
  store i32 0, ptr %11, align 4
  br label %148

148:                                              ; preds = %145, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %149

149:                                              ; preds = %148, %111
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  %150 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %150)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  %151 = load i32, ptr %11, align 4
  switch i32 %151, label %153 [
    i32 0, label %152
    i32 1, label %152
  ]

152:                                              ; preds = %149, %149
  ret void

153:                                              ; preds = %149
  unreachable
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %3 = load i64, ptr %1, align 8, !tbaa !5
  %4 = call ptr @llvm.stacksave.p0()
  %5 = alloca i64, i64 %3, align 16
  %6 = getelementptr inbounds i64, ptr %5, i64 %3
  %.not61 = icmp eq i64 %3, 0
  br i1 %.not61, label %..critedge_crit_edge, label %.lr.ph

..critedge_crit_edge:                             ; preds = %0
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %.critedge

._crit_edge:                                      ; preds = %19
  %.pre70 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %.1, label %.preheader, label %.critedge

.preheader:                                       ; preds = %._crit_edge
  %.not5464 = icmp sgt i64 %.pre70, 0
  br i1 %.not5464, label %.lr.ph66, label %.critedge60

.lr.ph66:                                         ; preds = %.preheader
  %7 = load i64, ptr %5, align 16, !tbaa !5
  br label %23

.lr.ph:                                           ; preds = %0, %19
  %.063 = phi i1 [ %.1, %19 ], [ false, %0 ]
  %.04862 = phi ptr [ %20, %19 ], [ %5, %0 ]
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.04862)
  %9 = load i64, ptr %.04862, align 8, !tbaa !5
  %.fr = freeze i64 %9
  %10 = srem i64 %.fr, 10
  switch i64 %10, label %19 [
    i64 8, label %11
    i64 4, label %11
    i64 2, label %11
    i64 1, label %11
    i64 9, label %14
    i64 7, label %14
    i64 6, label %14
    i64 3, label %14
    i64 5, label %17
  ]

11:                                               ; preds = %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph
  %12 = add i64 %.fr, 8
  %13 = sub i64 %12, %10
  br label %.sink.split

14:                                               ; preds = %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph
  %15 = add i64 %.fr, 18
  %16 = sub i64 %15, %10
  br label %.sink.split

17:                                               ; preds = %.lr.ph
  %18 = add nsw i64 %.fr, 5
  br label %.sink.split

.sink.split:                                      ; preds = %11, %17, %14
  %.sink = phi i64 [ %16, %14 ], [ %18, %17 ], [ %13, %11 ]
  %.1.ph = phi i1 [ %.063, %14 ], [ true, %17 ], [ %.063, %11 ]
  store i64 %.sink, ptr %.04862, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %.sink.split, %.lr.ph
  %.1 = phi i1 [ true, %.lr.ph ], [ %.1.ph, %.sink.split ]
  %20 = getelementptr inbounds i8, ptr %.04862, i64 8
  %.not = icmp eq ptr %20, %6
  br i1 %.not, label %._crit_edge, label %.lr.ph

21:                                               ; preds = %23
  %22 = add nuw nsw i64 %.05165, 1
  %exitcond.not = icmp eq i64 %22, %.pre70
  br i1 %exitcond.not, label %.critedge, label %23, !llvm.loop !9

23:                                               ; preds = %.lr.ph66, %21
  %.05165 = phi i64 [ 0, %.lr.ph66 ], [ %22, %21 ]
  %24 = getelementptr inbounds i64, ptr %5, i64 %.05165
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %.not53 = icmp eq i64 %25, %7
  br i1 %.not53, label %21, label %.critedge60

.critedge:                                        ; preds = %21, %..critedge_crit_edge, %._crit_edge
  %26 = phi i64 [ %.pre, %..critedge_crit_edge ], [ %.pre70, %._crit_edge ], [ %.pre70, %21 ]
  %.not5667 = icmp sgt i64 %26, 0
  br i1 %.not5667, label %.critedge58.lr.ph, label %.critedge60

.critedge58.lr.ph:                                ; preds = %.critedge
  %27 = load i64, ptr %5, align 16, !tbaa !5
  %28 = sdiv i64 %27, 10
  %29 = srem i64 %28, 2
  br label %.critedge58

30:                                               ; preds = %.critedge58
  %31 = add nuw nsw i64 %.04768, 1
  %exitcond69.not = icmp eq i64 %31, %26
  br i1 %exitcond69.not, label %.critedge60, label %.critedge58, !llvm.loop !11

.critedge58:                                      ; preds = %.critedge58.lr.ph, %30
  %.04768 = phi i64 [ 0, %.critedge58.lr.ph ], [ %31, %30 ]
  %32 = getelementptr inbounds i64, ptr %5, i64 %.04768
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %34 = sdiv i64 %33, 10
  %35 = srem i64 %34, 2
  %.not55 = icmp eq i64 %35, %29
  br i1 %.not55, label %30, label %.critedge60

.critedge60:                                      ; preds = %23, %30, %.critedge58, %.critedge, %.preheader
  %.str.sink = phi ptr [ @.str.2, %.preheader ], [ @.str.2, %.critedge ], [ @.str, %.critedge58 ], [ @.str.2, %30 ], [ @.str, %23 ]
  %36 = 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.sink)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.1)
  call void @llvm.stackrestore.p0(ptr %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #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 = !{!"long", !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}


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