; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/197 Division 2/Problem C (C)

; 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::__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] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" }

@_Z6weightB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@m = external dso_local global i32, align 4
@w = external dso_local global [11 x i32], align 16
@res = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5recuriii(i32 noundef, i32 noundef, i32 noundef) #0

; 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 dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %6 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = call 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) @_Z6weightB5cxx11)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %19

19:                                               ; preds = %34, %0
  %20 = load i32, ptr %2, align 4, !tbaa !8
  %21 = icmp slt i32 %20, 10
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %37

23:                                               ; preds = %19
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef %25)
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = sext i8 %27 to i32
  %29 = sub nsw i32 %28, 48
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = add nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [11 x i32], ptr @w, i64 0, i64 %32
  store i32 %29, ptr %33, align 4, !tbaa !8
  br label %34

34:                                               ; preds = %23
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !8
  br label %19, !llvm.loop !12

37:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %38

38:                                               ; preds = %76, %37
  %39 = load i32, ptr %3, align 4, !tbaa !8
  %40 = icmp sle i32 %39, 10
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %4, align 4
  br label %79

42:                                               ; preds = %38
  %43 = load i32, ptr %3, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [11 x i32], ptr @w, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !8
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %75

48:                                               ; preds = %42
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = call noundef i32 @_Z5recuriii(i32 noundef %49, i32 noundef %50, i32 noundef 2)
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %74

53:                                               ; preds = %48
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @res, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %55 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @res) #6
  %56 = sub i64 %55, 1
  %57 = trunc i64 %56 to i32
  store i32 %57, ptr %5, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %69, %53
  %59 = load i32, ptr %5, align 4, !tbaa !8
  %60 = icmp sge i32 %59, 0
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %72

62:                                               ; preds = %58
  %63 = load i32, ptr %5, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @res, i64 noundef %64) #6
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %66)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef @.str.3)
  br label %69

69:                                               ; preds = %62
  %70 = load i32, ptr %5, align 4, !tbaa !8
  %71 = add nsw i32 %70, -1
  store i32 %71, ptr %5, align 4, !tbaa !8
  br label %58, !llvm.loop !14

72:                                               ; preds = %61
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %79

74:                                               ; preds = %48
  br label %75

75:                                               ; preds = %74, %42
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %3, align 4, !tbaa !8
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %3, align 4, !tbaa !8
  br label %38, !llvm.loop !15

79:                                               ; preds = %72, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %80 = load i32, ptr %4, align 4
  switch i32 %80, label %85 [
    i32 5, label %81
    i32 1, label %83
  ]

81:                                               ; preds = %79
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  store i32 0, ptr %1, align 4
  br label %83

83:                                               ; preds = %81, %79
  %84 = load i32, ptr %1, align 4
  ret i32 %84

85:                                               ; preds = %79
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #4 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 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 nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

; 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) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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 dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 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 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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::__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] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" }

@_Z6weightB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@m = external dso_local global i32, align 4
@w = external dso_local local_unnamed_addr global [11 x i32], align 16
@res = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5recuriii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #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 uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call 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) @_Z6weightB5cxx11)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %15 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 0)
  %16 = load i8, ptr %15, align 1, !tbaa !8
  %17 = sext i8 %16 to i32
  %18 = add nsw i32 %17, -48
  store i32 %18, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !10
  %19 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 1)
  %20 = load i8, ptr %19, align 1, !tbaa !8
  %21 = sext i8 %20 to i32
  %22 = add nsw i32 %21, -48
  store i32 %22, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !10
  %23 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 2)
  %24 = load i8, ptr %23, align 1, !tbaa !8
  %25 = sext i8 %24 to i32
  %26 = add nsw i32 %25, -48
  store i32 %26, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !10
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 3)
  %28 = load i8, ptr %27, align 1, !tbaa !8
  %29 = sext i8 %28 to i32
  %30 = add nsw i32 %29, -48
  store i32 %30, ptr getelementptr inbounds (i8, ptr @w, i64 16), align 16, !tbaa !10
  %31 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 4)
  %32 = load i8, ptr %31, align 1, !tbaa !8
  %33 = sext i8 %32 to i32
  %34 = add nsw i32 %33, -48
  store i32 %34, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !10
  %35 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 5)
  %36 = load i8, ptr %35, align 1, !tbaa !8
  %37 = sext i8 %36 to i32
  %38 = add nsw i32 %37, -48
  store i32 %38, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !10
  %39 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 6)
  %40 = load i8, ptr %39, align 1, !tbaa !8
  %41 = sext i8 %40 to i32
  %42 = add nsw i32 %41, -48
  store i32 %42, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !10
  %43 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 7)
  %44 = load i8, ptr %43, align 1, !tbaa !8
  %45 = sext i8 %44 to i32
  %46 = add nsw i32 %45, -48
  store i32 %46, ptr getelementptr inbounds (i8, ptr @w, i64 32), align 16, !tbaa !10
  %47 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 8)
  %48 = load i8, ptr %47, align 1, !tbaa !8
  %49 = sext i8 %48 to i32
  %50 = add nsw i32 %49, -48
  store i32 %50, ptr getelementptr inbounds (i8, ptr @w, i64 36), align 4, !tbaa !10
  %51 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z6weightB5cxx11, i64 noundef 9)
  %52 = load i8, ptr %51, align 1, !tbaa !8
  %53 = sext i8 %52 to i32
  %54 = add nsw i32 %53, -48
  store i32 %54, ptr getelementptr inbounds (i8, ptr @w, i64 40), align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !10
  %.not = icmp eq i32 %55, 0
  br i1 %.not, label %68, label %56

56:                                               ; preds = %0
  %57 = tail call noundef i32 @_Z5recuriii(i32 noundef 1, i32 noundef 1, i32 noundef 2)
  %.not13 = icmp eq i32 %57, 0
  br i1 %.not13, label %68, label %58

58:                                               ; preds = %102, %98, %94, %90, %86, %82, %78, %74, %70, %56
  %storemerge19.lcssa.wide = phi i32 [ 1, %56 ], [ 2, %70 ], [ 3, %74 ], [ 4, %78 ], [ 5, %82 ], [ 6, %86 ], [ 7, %90 ], [ 8, %94 ], [ 9, %98 ], [ 10, %102 ]
  store i32 %storemerge19.lcssa.wide, ptr %1, align 4, !tbaa !10
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @res, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %59 = 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)
  %60 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @res) #6
  %61 = trunc i64 %60 to i32
  %.020 = add i32 %61, -1
  %62 = icmp sgt i32 %.020, -1
  br i1 %62, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %58
  %63 = zext nneg i32 %.020 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %63, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @res, i64 noundef %indvars.iv) #6
  %65 = load i32, ptr %64, align 4, !tbaa !10
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @.str.3)
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not26 = icmp eq i64 %indvars.iv, 0
  br i1 %.not26, label %._crit_edge, label %.lr.ph, !llvm.loop !12

68:                                               ; preds = %0, %56
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !10
  %.not.1 = icmp eq i32 %69, 0
  br i1 %.not.1, label %72, label %70

70:                                               ; preds = %68
  %71 = tail call noundef i32 @_Z5recuriii(i32 noundef 2, i32 noundef 2, i32 noundef 2)
  %.not13.1 = icmp eq i32 %71, 0
  br i1 %.not13.1, label %72, label %58

72:                                               ; preds = %70, %68
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !10
  %.not.2 = icmp eq i32 %73, 0
  br i1 %.not.2, label %76, label %74

74:                                               ; preds = %72
  %75 = tail call noundef i32 @_Z5recuriii(i32 noundef 3, i32 noundef 3, i32 noundef 2)
  %.not13.2 = icmp eq i32 %75, 0
  br i1 %.not13.2, label %76, label %58

76:                                               ; preds = %74, %72
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 16), align 16, !tbaa !10
  %.not.3 = icmp eq i32 %77, 0
  br i1 %.not.3, label %80, label %78

78:                                               ; preds = %76
  %79 = tail call noundef i32 @_Z5recuriii(i32 noundef 4, i32 noundef 4, i32 noundef 2)
  %.not13.3 = icmp eq i32 %79, 0
  br i1 %.not13.3, label %80, label %58

80:                                               ; preds = %78, %76
  %81 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !10
  %.not.4 = icmp eq i32 %81, 0
  br i1 %.not.4, label %84, label %82

82:                                               ; preds = %80
  %83 = tail call noundef i32 @_Z5recuriii(i32 noundef 5, i32 noundef 5, i32 noundef 2)
  %.not13.4 = icmp eq i32 %83, 0
  br i1 %.not13.4, label %84, label %58

84:                                               ; preds = %82, %80
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !10
  %.not.5 = icmp eq i32 %85, 0
  br i1 %.not.5, label %88, label %86

86:                                               ; preds = %84
  %87 = tail call noundef i32 @_Z5recuriii(i32 noundef 6, i32 noundef 6, i32 noundef 2)
  %.not13.5 = icmp eq i32 %87, 0
  br i1 %.not13.5, label %88, label %58

88:                                               ; preds = %86, %84
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !10
  %.not.6 = icmp eq i32 %89, 0
  br i1 %.not.6, label %92, label %90

90:                                               ; preds = %88
  %91 = tail call noundef i32 @_Z5recuriii(i32 noundef 7, i32 noundef 7, i32 noundef 2)
  %.not13.6 = icmp eq i32 %91, 0
  br i1 %.not13.6, label %92, label %58

92:                                               ; preds = %90, %88
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 32), align 16, !tbaa !10
  %.not.7 = icmp eq i32 %93, 0
  br i1 %.not.7, label %96, label %94

94:                                               ; preds = %92
  %95 = tail call noundef i32 @_Z5recuriii(i32 noundef 8, i32 noundef 8, i32 noundef 2)
  %.not13.7 = icmp eq i32 %95, 0
  br i1 %.not13.7, label %96, label %58

96:                                               ; preds = %94, %92
  %97 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 36), align 4, !tbaa !10
  %.not.8 = icmp eq i32 %97, 0
  br i1 %.not.8, label %100, label %98

98:                                               ; preds = %96
  %99 = tail call noundef i32 @_Z5recuriii(i32 noundef 9, i32 noundef 9, i32 noundef 2)
  %.not13.8 = icmp eq i32 %99, 0
  br i1 %.not13.8, label %100, label %58

100:                                              ; preds = %98, %96
  %101 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 40), align 8, !tbaa !10
  %.not.9 = icmp eq i32 %101, 0
  br i1 %.not.9, label %104, label %102

102:                                              ; preds = %100
  %103 = tail call noundef i32 @_Z5recuriii(i32 noundef 10, i32 noundef 10, i32 noundef 2)
  %.not13.9 = icmp eq i32 %103, 0
  br i1 %.not13.9, label %104, label %58

104:                                              ; preds = %102, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %105 = tail 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.5)
  br label %107

._crit_edge:                                      ; preds = %.lr.ph, %58
  %106 = 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.4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %107

107:                                              ; preds = %._crit_edge, %104
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #4 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 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 nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

; 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 #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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 dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 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 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 #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 = { 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 #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !9, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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