; LLVM IR from VastoLorde95/Competitive-Programming :: Timus/1276/A.ll (Z5solveRx)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, long long>, std::_Select1st<std::pair<const std::vector<int>, long long>>, std::less<std::vector<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, long long>, std::_Select1st<std::pair<const std::vector<int>, long long>>, std::less<std::vector<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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] }

@K = external dso_local global i32, align 4
@dp = external dso_local global %"class.std::map", align 8
@_Z4locoB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@cnt = external dso_local global [4 x i32], align 16

; 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) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5solveiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveRx(ptr noundef nonnull align 8 dereferenceable(8) %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @_ZNSt3mapISt6vectorIiSaIiEExSt4lessIS2_ESaISt4pairIKS2_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @dp) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %114, %1
  %9 = load i32, ptr %3, align 4, !tbaa !9
  %10 = load i32, ptr @cnt, align 16, !tbaa !9
  %11 = icmp sle i32 %9, %10
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %117

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

14:                                               ; preds = %110, %13
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cnt, i64 0, i64 1), align 4, !tbaa !9
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %113

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

20:                                               ; preds = %106, %19
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cnt, i64 0, i64 2), align 8, !tbaa !9
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %109

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %102, %25
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @cnt, i64 0, i64 3), align 4, !tbaa !9
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %105

31:                                               ; preds = %26
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = add nsw i32 %32, %33
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = add nsw i32 %34, %35
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add nsw i32 %36, %37
  %39 = load i32, ptr @K, align 4, !tbaa !9
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %101

41:                                               ; preds = %31
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z4locoB5cxx11, i64 noundef 1)
  %43 = load i8, ptr %42, align 1, !tbaa !11
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 65
  br i1 %45, label %46, label %73

46:                                               ; preds = %41
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %49, label %59

49:                                               ; preds = %46
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = sub nsw i32 %50, 1
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = call noundef i64 @_Z5solveiiiii(i32 noundef %51, i32 noundef %52, i32 noundef %53, i32 noundef %54, i32 noundef 0)
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = load i64, ptr %56, align 8, !tbaa !12
  %58 = add nsw i64 %57, %55
  store i64 %58, ptr %56, align 8, !tbaa !12
  br label %59

59:                                               ; preds = %49, %46
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %62, label %72

62:                                               ; preds = %59
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = sub nsw i32 %65, 1
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = call noundef i64 @_Z5solveiiiii(i32 noundef %63, i32 noundef %64, i32 noundef %66, i32 noundef %67, i32 noundef 2)
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = load i64, ptr %69, align 8, !tbaa !12
  %71 = add nsw i64 %70, %68
  store i64 %71, ptr %69, align 8, !tbaa !12
  br label %72

72:                                               ; preds = %62, %59
  br label %100

73:                                               ; preds = %41
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %76, label %86

76:                                               ; preds = %73
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = load i32, ptr %5, align 4, !tbaa !9
  %79 = sub nsw i32 %78, 1
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = load i32, ptr %7, align 4, !tbaa !9
  %82 = call noundef i64 @_Z5solveiiiii(i32 noundef %77, i32 noundef %79, i32 noundef %80, i32 noundef %81, i32 noundef 1)
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = load i64, ptr %83, align 8, !tbaa !12
  %85 = add nsw i64 %84, %82
  store i64 %85, ptr %83, align 8, !tbaa !12
  br label %86

86:                                               ; preds = %76, %73
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %99

89:                                               ; preds = %86
  %90 = load i32, ptr %3, align 4, !tbaa !9
  %91 = load i32, ptr %5, align 4, !tbaa !9
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = sub nsw i32 %93, 1
  %95 = call noundef i64 @_Z5solveiiiii(i32 noundef %90, i32 noundef %91, i32 noundef %92, i32 noundef %94, i32 noundef 3)
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = load i64, ptr %96, align 8, !tbaa !12
  %98 = add nsw i64 %97, %95
  store i64 %98, ptr %96, align 8, !tbaa !12
  br label %99

99:                                               ; preds = %89, %86
  br label %100

100:                                              ; preds = %99, %72
  br label %101

101:                                              ; preds = %100, %31
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %7, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %7, align 4, !tbaa !9
  br label %26, !llvm.loop !14

105:                                              ; preds = %30
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !9
  br label %20, !llvm.loop !16

109:                                              ; preds = %24
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %5, align 4, !tbaa !9
  br label %14, !llvm.loop !17

113:                                              ; preds = %18
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %3, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %3, align 4, !tbaa !9
  br label %8, !llvm.loop !18

117:                                              ; preds = %12
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt6vectorIiSaIiEExSt4lessIS2_ESaISt4pairIKS2_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, long long>, std::_Select1st<std::pair<const std::vector<int>, long long>>, std::less<std::vector<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::vector<int>, std::pair<const std::vector<int>, long long>, std::_Select1st<std::pair<const std::vector<int>, long long>>, std::less<std::vector<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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] }

@K = external dso_local local_unnamed_addr global i32, align 4
@dp = external dso_local global %"class.std::map", align 8
@_Z4locoB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@cnt = external dso_local local_unnamed_addr global [4 x i32], align 16

; 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5solveiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveRx(ptr nocapture noundef nonnull align 8 dereferenceable(8) %0) local_unnamed_addr #1 {
  tail call void @_ZNSt3mapISt6vectorIiSaIiEExSt4lessIS2_ESaISt4pairIKS2_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @dp) #2
  %2 = load i32, ptr @cnt, align 16, !tbaa !5
  %.not56 = icmp slt i32 %2, 0
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4
  %4 = icmp slt i32 %3, 0
  %or.cond = select i1 %.not56, i1 true, i1 %4
  br i1 %or.cond, label %._crit_edge59, label %.preheader46

.preheader46:                                     ; preds = %1, %._crit_edge55
  %5 = phi i32 [ %18, %._crit_edge55 ], [ %2, %1 ]
  %6 = phi i32 [ %19, %._crit_edge55 ], [ %3, %1 ]
  %7 = phi i32 [ %20, %._crit_edge55 ], [ %3, %1 ]
  %.03757 = phi i32 [ %21, %._crit_edge55 ], [ 0, %1 ]
  %.not3852 = icmp slt i32 %7, 0
  br i1 %.not3852, label %._crit_edge55, label %.preheader45.lr.ph

.preheader45.lr.ph:                               ; preds = %.preheader46
  %.not43 = icmp eq i32 %.03757, 0
  %8 = add nsw i32 %.03757, -1
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %._crit_edge55, label %.preheader45

._crit_edge59:                                    ; preds = %._crit_edge55, %1
  ret void

.preheader45:                                     ; preds = %.preheader45.lr.ph, %._crit_edge51
  %11 = phi i32 [ %47, %._crit_edge51 ], [ %6, %.preheader45.lr.ph ]
  %12 = phi i32 [ %48, %._crit_edge51 ], [ %9, %.preheader45.lr.ph ]
  %13 = phi i32 [ %49, %._crit_edge51 ], [ %9, %.preheader45.lr.ph ]
  %.03653 = phi i32 [ %50, %._crit_edge51 ], [ 0, %.preheader45.lr.ph ]
  %.not3949 = icmp slt i32 %13, 0
  br i1 %.not3949, label %._crit_edge51, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader45
  %14 = add nuw nsw i32 %.03653, %.03757
  %.not41 = icmp eq i32 %.03653, 0
  %15 = add nsw i32 %.03653, -1
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %17 = icmp slt i32 %16, 0
  br i1 %17, label %._crit_edge51, label %.preheader

._crit_edge55.loopexit61:                         ; preds = %._crit_edge51
  %.pre66 = load i32, ptr @cnt, align 16, !tbaa !5
  br label %._crit_edge55

._crit_edge55:                                    ; preds = %.preheader45.lr.ph, %._crit_edge55.loopexit61, %.preheader46
  %18 = phi i32 [ %.pre66, %._crit_edge55.loopexit61 ], [ %5, %.preheader46 ], [ %5, %.preheader45.lr.ph ]
  %19 = phi i32 [ %47, %._crit_edge55.loopexit61 ], [ %6, %.preheader46 ], [ %6, %.preheader45.lr.ph ]
  %20 = phi i32 [ %47, %._crit_edge55.loopexit61 ], [ %7, %.preheader46 ], [ %7, %.preheader45.lr.ph ]
  %21 = add nuw nsw i32 %.03757, 1
  %.not.not = icmp slt i32 %.03757, %18
  br i1 %.not.not, label %.preheader46, label %._crit_edge59, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %22 = phi i32 [ %52, %._crit_edge ], [ %12, %.preheader.lr.ph ]
  %23 = phi i32 [ %53, %._crit_edge ], [ %16, %.preheader.lr.ph ]
  %.03550 = phi i32 [ %54, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.not4047 = icmp slt i32 %23, 0
  br i1 %.not4047, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %24 = add nuw nsw i32 %14, %.03550
  %.not44 = icmp eq i32 %.03550, 0
  %25 = add nsw i32 %.03550, -1
  %26 = load i32, ptr @K, align 4, !tbaa !5
  %27 = icmp eq i32 %24, %26
  br i1 %27, label %28, label %45

28:                                               ; preds = %.lr.ph
  %29 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z4locoB5cxx11, i64 noundef 1)
  %30 = load i8, ptr %29, align 1, !tbaa !12
  %31 = icmp eq i8 %30, 65
  br i1 %31, label %35, label %32

32:                                               ; preds = %28
  br i1 %.not41, label %45, label %33

33:                                               ; preds = %32
  %34 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %.03757, i32 noundef %15, i32 noundef %.03550, i32 noundef 0, i32 noundef 1)
  br label %.sink.split

35:                                               ; preds = %28
  br i1 %.not43, label %40, label %36

36:                                               ; preds = %35
  %37 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %8, i32 noundef %.03653, i32 noundef %.03550, i32 noundef 0, i32 noundef 0)
  %38 = load i64, ptr %0, align 8, !tbaa !13
  %39 = add nsw i64 %38, %37
  store i64 %39, ptr %0, align 8, !tbaa !13
  br label %40

40:                                               ; preds = %36, %35
  br i1 %.not44, label %45, label %41

41:                                               ; preds = %40
  %42 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %.03757, i32 noundef %.03653, i32 noundef %25, i32 noundef 0, i32 noundef 2)
  br label %.sink.split

.sink.split:                                      ; preds = %41, %33
  %.sink70 = phi i64 [ %34, %33 ], [ %42, %41 ]
  %43 = load i64, ptr %0, align 8, !tbaa !13
  %44 = add nsw i64 %43, %.sink70
  store i64 %44, ptr %0, align 8, !tbaa !13
  br label %45

45:                                               ; preds = %.sink.split, %32, %40, %.lr.ph
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %.not40.not.peel = icmp sgt i32 %46, 0
  br i1 %.not40.not.peel, label %.peel.next, label %._crit_edge.loopexit

._crit_edge51.loopexit60:                         ; preds = %._crit_edge
  %.pre65 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  br label %._crit_edge51

._crit_edge51:                                    ; preds = %.preheader.lr.ph, %._crit_edge51.loopexit60, %.preheader45
  %47 = phi i32 [ %.pre65, %._crit_edge51.loopexit60 ], [ %11, %.preheader45 ], [ %11, %.preheader.lr.ph ]
  %48 = phi i32 [ %52, %._crit_edge51.loopexit60 ], [ %12, %.preheader45 ], [ %12, %.preheader.lr.ph ]
  %49 = phi i32 [ %52, %._crit_edge51.loopexit60 ], [ %13, %.preheader45 ], [ %13, %.preheader.lr.ph ]
  %50 = add nuw nsw i32 %.03653, 1
  %.not38.not = icmp slt i32 %.03653, %47
  br i1 %.not38.not, label %.preheader45, label %._crit_edge55.loopexit61, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %80, %45
  %51 = phi i32 [ %46, %45 ], [ %82, %80 ]
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %52 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %22, %.preheader ]
  %53 = phi i32 [ %51, %._crit_edge.loopexit ], [ %23, %.preheader ]
  %54 = add nuw nsw i32 %.03550, 1
  %.not39.not = icmp slt i32 %.03550, %52
  br i1 %.not39.not, label %.preheader, label %._crit_edge51.loopexit60, !llvm.loop !16

.peel.next:                                       ; preds = %45, %80
  %.048 = phi i32 [ %81, %80 ], [ 1, %45 ]
  %55 = add nuw nsw i32 %24, %.048
  %56 = load i32, ptr @K, align 4, !tbaa !5
  %57 = icmp eq i32 %55, %56
  br i1 %57, label %58, label %80

58:                                               ; preds = %.peel.next
  %59 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z4locoB5cxx11, i64 noundef 1)
  %60 = load i8, ptr %59, align 1, !tbaa !12
  %61 = icmp eq i8 %60, 65
  br i1 %61, label %62, label %70

62:                                               ; preds = %58
  br i1 %.not43, label %67, label %63

63:                                               ; preds = %62
  %64 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %8, i32 noundef %.03653, i32 noundef %.03550, i32 noundef %.048, i32 noundef 0)
  %65 = load i64, ptr %0, align 8, !tbaa !13
  %66 = add nsw i64 %65, %64
  store i64 %66, ptr %0, align 8, !tbaa !13
  br label %67

67:                                               ; preds = %63, %62
  br i1 %.not44, label %80, label %68

68:                                               ; preds = %67
  %69 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %.03757, i32 noundef %.03653, i32 noundef %25, i32 noundef %.048, i32 noundef 2)
  br label %.sink.split71

70:                                               ; preds = %58
  br i1 %.not41, label %75, label %71

71:                                               ; preds = %70
  %72 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %.03757, i32 noundef %15, i32 noundef %.03550, i32 noundef %.048, i32 noundef 1)
  %73 = load i64, ptr %0, align 8, !tbaa !13
  %74 = add nsw i64 %73, %72
  store i64 %74, ptr %0, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %70, %71
  %76 = add nsw i32 %.048, -1
  %77 = tail call noundef i64 @_Z5solveiiiii(i32 noundef %.03757, i32 noundef %.03653, i32 noundef %.03550, i32 noundef %76, i32 noundef 3)
  br label %.sink.split71

.sink.split71:                                    ; preds = %68, %75
  %.sink73 = phi i64 [ %77, %75 ], [ %69, %68 ]
  %78 = load i64, ptr %0, align 8, !tbaa !13
  %79 = add nsw i64 %78, %.sink73
  store i64 %79, ptr %0, align 8, !tbaa !13
  br label %80

80:                                               ; preds = %.sink.split71, %.peel.next, %67
  %81 = add nuw nsw i32 %.048, 1
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %.not40.not = icmp slt i32 %.048, %82
  br i1 %.not40.not, label %.peel.next, label %._crit_edge.loopexit, !llvm.loop !17
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt6vectorIiSaIiEExSt4lessIS2_ESaISt4pairIKS2_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { 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 #2 = { 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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !10, !11}
!17 = distinct !{!17, !10, !18}
!18 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass