; LLVM IR from hao14293/2021-Postgraduate-408 :: PAT/PAT-B/CPP/1016.部分A+B (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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  %16 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %17 unwind label %30

17:                                               ; preds = %0
  %18 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %19 unwind label %30

19:                                               ; preds = %17
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %21 unwind label %30

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %23 unwind label %30

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

24:                                               ; preds = %52, %23
  %25 = load i32, ptr %12, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %28 = icmp ult i64 %26, %27
  br i1 %28, label %34, label %29

29:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %55

30:                                               ; preds = %121, %21, %19, %17, %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %10, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %11, align 4
  br label %128

34:                                               ; preds = %24
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = load i32, ptr %12, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %37)
          to label %39 unwind label %47

39:                                               ; preds = %34
  %40 = load i8, ptr %38, align 1, !tbaa !9
  %41 = sext i8 %40 to i32
  %42 = sub nsw i32 %41, 48
  %43 = icmp eq i32 %35, %42
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %6, align 4, !tbaa !5
  br label %51

47:                                               ; preds = %34
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %128

51:                                               ; preds = %44, %39
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %12, align 4, !tbaa !5
  br label %24, !llvm.loop !10

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

56:                                               ; preds = %80, %55
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %60 = icmp ult i64 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %83

62:                                               ; preds = %56
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = load i32, ptr %13, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %65)
          to label %67 unwind label %75

67:                                               ; preds = %62
  %68 = load i8, ptr %66, align 1, !tbaa !9
  %69 = sext i8 %68 to i32
  %70 = sub nsw i32 %69, 48
  %71 = icmp eq i32 %63, %70
  br i1 %71, label %72, label %79

72:                                               ; preds = %67
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %7, align 4, !tbaa !5
  br label %79

75:                                               ; preds = %62
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %128

79:                                               ; preds = %72, %67
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %13, align 4, !tbaa !5
  br label %56, !llvm.loop !12

83:                                               ; preds = %61
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %88

86:                                               ; preds = %83
  %87 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %87, ptr %8, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %86, %83
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %88
  %92 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %92, ptr %9, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %91, %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %104, %93
  %95 = load i32, ptr %14, align 4, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %107

99:                                               ; preds = %94
  %100 = load i32, ptr %8, align 4, !tbaa !5
  %101 = mul nsw i32 10, %100
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = add nsw i32 %101, %102
  store i32 %103, ptr %8, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %99
  %105 = load i32, ptr %14, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %14, align 4, !tbaa !5
  br label %94, !llvm.loop !13

107:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %118, %107
  %109 = load i32, ptr %15, align 4, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %121

113:                                              ; preds = %108
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = mul nsw i32 10, %114
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = add nsw i32 %115, %116
  store i32 %117, ptr %9, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %113
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %15, align 4, !tbaa !5
  br label %108, !llvm.loop !14

121:                                              ; preds = %112
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = add nsw i32 %122, %123
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %124)
          to label %126 unwind label %30

126:                                              ; preds = %121
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  %127 = load i32, ptr %1, align 4
  ret i32 %127

128:                                              ; preds = %75, %47, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %10, align 8
  %131 = load i32, ptr %11, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}


; 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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %5 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %6 unwind label %16

6:                                                ; preds = %0
  %7 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %8 unwind label %16

8:                                                ; preds = %6
  %9 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %10 unwind label %16

10:                                               ; preds = %8
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %.preheader38 unwind label %16

.preheader38:                                     ; preds = %10
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %.not55 = icmp eq i64 %12, 0
  br i1 %.not55, label %.preheader37, label %.lr.ph

.preheader37:                                     ; preds = %.lr.ph, %.preheader38
  %.025.lcssa = phi i32 [ 0, %.preheader38 ], [ %spec.select, %.lr.ph ]
  %13 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %.not56 = icmp eq i64 %13, 0
  br i1 %.not56, label %._crit_edge.thread, label %.lr.ph43

._crit_edge.thread:                               ; preds = %.preheader37
  %.not64 = icmp eq i32 %.025.lcssa, 0
  %14 = load i32, ptr %3, align 4
  %spec.select3565 = select i1 %.not64, i32 0, i32 %14
  %15 = load i32, ptr %4, align 4
  br label %29

16:                                               ; preds = %._crit_edge53, %10, %8, %6, %0
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  resume { ptr, i32 } %17

.lr.ph:                                           ; preds = %.preheader38, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader38 ]
  %.02539 = phi i32 [ %spec.select, %.lr.ph ], [ 0, %.preheader38 ]
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = sext i8 %20 to i32
  %22 = add nsw i32 %21, -48
  %23 = icmp eq i32 %18, %22
  %24 = zext i1 %23 to i32
  %spec.select = add nuw nsw i32 %.02539, %24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %26 = icmp ugt i64 %25, %indvars.iv.next
  br i1 %26, label %.lr.ph, label %.preheader37, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph43
  %.not = icmp eq i32 %.025.lcssa, 0
  %27 = load i32, ptr %3, align 4
  %spec.select35 = select i1 %.not, i32 0, i32 %27
  %.not34 = icmp eq i32 %spec.select36, 0
  %28 = load i32, ptr %4, align 4
  %spec.select73 = select i1 %.not34, i32 0, i32 %28
  br label %29

29:                                               ; preds = %._crit_edge, %._crit_edge.thread
  %30 = phi i32 [ %15, %._crit_edge.thread ], [ %28, %._crit_edge ]
  %spec.select3570 = phi i32 [ %spec.select3565, %._crit_edge.thread ], [ %spec.select35, %._crit_edge ]
  %31 = phi i32 [ %14, %._crit_edge.thread ], [ %27, %._crit_edge ]
  %.030.lcssa68 = phi i32 [ 0, %._crit_edge.thread ], [ %spec.select36, %._crit_edge ]
  %32 = phi i32 [ 0, %._crit_edge.thread ], [ %spec.select73, %._crit_edge ]
  %33 = icmp sgt i32 %.025.lcssa, 1
  br i1 %33, label %.lr.ph48.preheader, label %.preheader

.lr.ph48.preheader:                               ; preds = %29
  %34 = add nsw i32 %.025.lcssa, -1
  %35 = add nsw i32 %.025.lcssa, -2
  %xtraiter = and i32 %34, 7
  %36 = icmp ult i32 %35, 7
  br i1 %36, label %.preheader.loopexit.unr-lcssa, label %.lr.ph48.preheader.new

.lr.ph48.preheader.new:                           ; preds = %.lr.ph48.preheader
  %unroll_iter = and i32 %34, -8
  br label %.lr.ph48

.lr.ph43:                                         ; preds = %.preheader37, %.lr.ph43
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph43 ], [ 0, %.preheader37 ]
  %.03041 = phi i32 [ %spec.select36, %.lr.ph43 ], [ 0, %.preheader37 ]
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv59)
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = add nsw i32 %40, -48
  %42 = icmp eq i32 %37, %41
  %.fr74 = freeze i1 %42
  %43 = zext i1 %.fr74 to i32
  %spec.select36 = add i32 %.03041, %43
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %44 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %45 = icmp ugt i64 %44, %indvars.iv.next60
  br i1 %45, label %.lr.ph43, label %._crit_edge, !llvm.loop !12

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph48, %.lr.ph48.preheader
  %.lcssa76.ph = phi i32 [ poison, %.lr.ph48.preheader ], [ %67, %.lr.ph48 ]
  %.12945.unr = phi i32 [ %spec.select3570, %.lr.ph48.preheader ], [ %67, %.lr.ph48 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph48.epil

.lr.ph48.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph48.epil
  %.12945.epil = phi i32 [ %47, %.lr.ph48.epil ], [ %.12945.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph48.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %46 = mul nsw i32 %.12945.epil, 10
  %47 = add nsw i32 %46, %31
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph48.epil, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph48.epil, %29
  %.129.lcssa = phi i32 [ %spec.select3570, %29 ], [ %.lcssa76.ph, %.preheader.loopexit.unr-lcssa ], [ %47, %.lr.ph48.epil ]
  %48 = icmp sgt i32 %.030.lcssa68, 1
  br i1 %48, label %.lr.ph52.preheader, label %._crit_edge53

.lr.ph52.preheader:                               ; preds = %.preheader
  %49 = add nsw i32 %.030.lcssa68, -1
  %50 = add nsw i32 %.030.lcssa68, -2
  %xtraiter78 = and i32 %49, 7
  %51 = icmp ult i32 %50, 7
  br i1 %51, label %._crit_edge53.loopexit.unr-lcssa, label %.lr.ph52.preheader.new

.lr.ph52.preheader.new:                           ; preds = %.lr.ph52.preheader
  %unroll_iter82 = and i32 %49, -8
  br label %.lr.ph52

.lr.ph48:                                         ; preds = %.lr.ph48, %.lr.ph48.preheader.new
  %.12945 = phi i32 [ %spec.select3570, %.lr.ph48.preheader.new ], [ %67, %.lr.ph48 ]
  %niter = phi i32 [ 0, %.lr.ph48.preheader.new ], [ %niter.next.7, %.lr.ph48 ]
  %52 = mul nsw i32 %.12945, 10
  %53 = add nsw i32 %52, %31
  %54 = mul nsw i32 %53, 10
  %55 = add nsw i32 %54, %31
  %56 = mul nsw i32 %55, 10
  %57 = add nsw i32 %56, %31
  %58 = mul nsw i32 %57, 10
  %59 = add nsw i32 %58, %31
  %60 = mul nsw i32 %59, 10
  %61 = add nsw i32 %60, %31
  %62 = mul nsw i32 %61, 10
  %63 = add nsw i32 %62, %31
  %64 = mul nsw i32 %63, 10
  %65 = add nsw i32 %64, %31
  %66 = mul nsw i32 %65, 10
  %67 = add nsw i32 %66, %31
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader.loopexit.unr-lcssa, label %.lr.ph48, !llvm.loop !15

._crit_edge53.loopexit.unr-lcssa:                 ; preds = %.lr.ph52, %.lr.ph52.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph52.preheader ], [ %87, %.lr.ph52 ]
  %.12750.unr = phi i32 [ %32, %.lr.ph52.preheader ], [ %87, %.lr.ph52 ]
  %lcmp.mod80.not = icmp eq i32 %xtraiter78, 0
  br i1 %lcmp.mod80.not, label %._crit_edge53, label %.lr.ph52.epil

.lr.ph52.epil:                                    ; preds = %._crit_edge53.loopexit.unr-lcssa, %.lr.ph52.epil
  %.12750.epil = phi i32 [ %69, %.lr.ph52.epil ], [ %.12750.unr, %._crit_edge53.loopexit.unr-lcssa ]
  %epil.iter79 = phi i32 [ %epil.iter79.next, %.lr.ph52.epil ], [ 0, %._crit_edge53.loopexit.unr-lcssa ]
  %68 = mul nsw i32 %.12750.epil, 10
  %69 = add nsw i32 %68, %30
  %epil.iter79.next = add i32 %epil.iter79, 1
  %epil.iter79.cmp.not = icmp eq i32 %epil.iter79.next, %xtraiter78
  br i1 %epil.iter79.cmp.not, label %._crit_edge53, label %.lr.ph52.epil, !llvm.loop !16

._crit_edge53:                                    ; preds = %._crit_edge53.loopexit.unr-lcssa, %.lr.ph52.epil, %.preheader
  %.127.lcssa = phi i32 [ %32, %.preheader ], [ %.lcssa.ph, %._crit_edge53.loopexit.unr-lcssa ], [ %69, %.lr.ph52.epil ]
  %70 = add nsw i32 %.127.lcssa, %.129.lcssa
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %70)
          to label %88 unwind label %16

.lr.ph52:                                         ; preds = %.lr.ph52, %.lr.ph52.preheader.new
  %.12750 = phi i32 [ %32, %.lr.ph52.preheader.new ], [ %87, %.lr.ph52 ]
  %niter83 = phi i32 [ 0, %.lr.ph52.preheader.new ], [ %niter83.next.7, %.lr.ph52 ]
  %72 = mul nsw i32 %.12750, 10
  %73 = add nsw i32 %72, %30
  %74 = mul nsw i32 %73, 10
  %75 = add nsw i32 %74, %30
  %76 = mul nsw i32 %75, 10
  %77 = add nsw i32 %76, %30
  %78 = mul nsw i32 %77, 10
  %79 = add nsw i32 %78, %30
  %80 = mul nsw i32 %79, 10
  %81 = add nsw i32 %80, %30
  %82 = mul nsw i32 %81, 10
  %83 = add nsw i32 %82, %30
  %84 = mul nsw i32 %83, 10
  %85 = add nsw i32 %84, %30
  %86 = mul nsw i32 %85, 10
  %87 = add nsw i32 %86, %30
  %niter83.next.7 = add i32 %niter83, 8
  %niter83.ncmp.7 = icmp eq i32 %niter83.next.7, %unroll_iter82
  br i1 %niter83.ncmp.7, label %._crit_edge53.loopexit.unr-lcssa, label %.lr.ph52, !llvm.loop !17

88:                                               ; preds = %._crit_edge53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !11}


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