; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/CodeCraft-22 and Codeforces Round #795 (Div. 2)/B. Shoe Shuffling.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" }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %13 = 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)
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = call ptr @llvm.stacksave.p0()
  store ptr %15, ptr %2, align 8
  %16 = alloca i64, i64 %14, align 16
  store i64 %14, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %26, %0
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %20 = icmp slt i64 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %29

22:                                               ; preds = %17
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds i64, ptr %16, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %22
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %4, align 8, !tbaa !5
  br label %17, !llvm.loop !9

29:                                               ; preds = %21
  %30 = load i64, ptr %1, align 8, !tbaa !5
  %31 = alloca i64, i64 %30, align 16
  store i64 %30, ptr %5, align 8
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = getelementptr inbounds i64, ptr %31, i64 %32
  call void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef %31, ptr noundef %33, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = sub nsw i64 %34, 1
  store i64 %35, ptr %6, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %81, %29
  %37 = load i64, ptr %6, align 8, !tbaa !5
  %38 = icmp sge i64 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 5, ptr %7, align 4
  br label %84

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %41 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %41, ptr %8, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %55, %40
  %43 = load i64, ptr %8, align 8, !tbaa !5
  %44 = icmp sge i64 %43, 0
  br i1 %44, label %45, label %53

45:                                               ; preds = %42
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds i64, ptr %16, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = load i64, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds i64, ptr %16, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = icmp eq i64 %48, %51
  br label %53

53:                                               ; preds = %45, %42
  %54 = phi i1 [ false, %42 ], [ %52, %45 ]
  br i1 %54, label %55, label %58

55:                                               ; preds = %53
  %56 = load i64, ptr %8, align 8, !tbaa !5
  %57 = add nsw i64 %56, -1
  store i64 %57, ptr %8, align 8, !tbaa !5
  br label %42, !llvm.loop !11

58:                                               ; preds = %53
  %59 = load i64, ptr %8, align 8, !tbaa !5
  %60 = add nsw i64 %59, 1
  store i64 %60, ptr %8, align 8, !tbaa !5
  %61 = load i64, ptr %6, align 8, !tbaa !5
  %62 = load i64, ptr %8, align 8, !tbaa !5
  %63 = icmp eq i64 %61, %62
  br i1 %63, label %64, label %67

64:                                               ; preds = %58
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef @.str)
  store i32 1, ptr %7, align 4
  br label %78

67:                                               ; preds = %58
  %68 = load i64, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds i64, ptr %31, i64 %68
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds i64, ptr %31, i64 %70
  %72 = getelementptr inbounds i64, ptr %71, i64 1
  %73 = load i64, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %31, i64 %73
  %75 = getelementptr inbounds i64, ptr %74, i64 1
  %76 = call noundef ptr @_ZNSt3_V26rotateIPlEET_S2_S2_S2_(ptr noundef %69, ptr noundef %72, ptr noundef %75)
  %77 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %77, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %7, align 4
  br label %78

78:                                               ; preds = %67, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %79 = load i32, ptr %7, align 4
  switch i32 %79, label %84 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %6, align 8, !tbaa !5
  %83 = add nsw i64 %82, -1
  store i64 %83, ptr %6, align 8, !tbaa !5
  br label %36, !llvm.loop !12

84:                                               ; preds = %78, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %85 = load i32, ptr %7, align 4
  switch i32 %85, label %108 [
    i32 5, label %86
  ]

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr %31, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %87 = load ptr, ptr %9, align 8, !tbaa !13
  store ptr %87, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %88 = load ptr, ptr %9, align 8, !tbaa !13
  %89 = mul nuw i64 8, %30
  %90 = udiv i64 %89, 8
  %91 = getelementptr inbounds i64, ptr %88, i64 %90
  store ptr %91, ptr %11, align 8, !tbaa !13
  br label %92

92:                                               ; preds = %103, %86
  %93 = load ptr, ptr %10, align 8, !tbaa !13
  %94 = load ptr, ptr %11, align 8, !tbaa !13
  %95 = icmp ne ptr %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %106

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %98 = load ptr, ptr %10, align 8, !tbaa !13
  %99 = load i64, ptr %98, align 8, !tbaa !5
  store i64 %99, ptr %12, align 8, !tbaa !5
  %100 = load i64, ptr %12, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str.1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %103

103:                                              ; preds = %97
  %104 = load ptr, ptr %10, align 8, !tbaa !13
  %105 = getelementptr inbounds i64, ptr %104, i32 1
  store ptr %105, ptr %10, align 8, !tbaa !13
  br label %92

106:                                              ; preds = %96
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %7, align 4
  br label %108

108:                                              ; preds = %106, %84
  %109 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  %110 = load i32, ptr %7, align 4
  switch i32 %110, label %112 [
    i32 0, label %111
    i32 1, label %111
  ]

111:                                              ; preds = %108, %108
  ret void

112:                                              ; preds = %108
  unreachable
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPlEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) #1

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn }
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 = { "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 = !{!"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}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}


; 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" }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %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 = load i64, ptr %1, align 8, !tbaa !5
  %7 = icmp sgt i64 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %6, %0 ], [ %15, %.lr.ph ]
  %8 = alloca i64, i64 %.lcssa, align 16
  %9 = getelementptr inbounds i64, ptr %8, i64 %.lcssa
  call void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef nonnull %8, ptr noundef nonnull %9, i32 noundef 1)
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp slt i64 %10, 1
  br i1 %11, label %.critedge36, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.038 = phi i64 [ %14, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds i64, ptr %5, i64 %.038
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %14 = add nuw nsw i64 %.038, 1
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = icmp slt i64 %14, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %._crit_edge, %27
  %.02741.in = phi i64 [ %26, %27 ], [ %10, %._crit_edge ]
  %.02741 = add nsw i64 %.02741.in, -1
  %17 = getelementptr inbounds i64, ptr %5, i64 %.02741
  %18 = load i64, ptr %17, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %.preheader, %23
  %.03139 = phi i64 [ %.02741, %.preheader ], [ %24, %23 ]
  %20 = getelementptr inbounds i64, ptr %5, i64 %.03139
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %22 = icmp eq i64 %21, %18
  br i1 %22, label %23, label %.critedge

23:                                               ; preds = %19
  %24 = add nsw i64 %.03139, -1
  %25 = icmp sgt i64 %.03139, 0
  br i1 %25, label %19, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %23, %19
  %.031.lcssa = phi i64 [ -1, %23 ], [ %.03139, %19 ]
  %26 = add nsw i64 %.031.lcssa, 1
  %.not = icmp eq i64 %.02741, %26
  br i1 %.not, label %32, label %27

27:                                               ; preds = %.critedge
  %28 = getelementptr inbounds i64, ptr %8, i64 %26
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %gep = getelementptr i64, ptr %8, i64 %.02741.in
  %30 = call noundef ptr @_ZNSt3_V26rotateIPlEET_S2_S2_S2_(ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %gep)
  %31 = icmp slt i64 %.031.lcssa, 0
  br i1 %31, label %.critedge36, label %.preheader

32:                                               ; preds = %.critedge
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %._crit_edge45

.critedge36:                                      ; preds = %27, %._crit_edge
  %.not3442 = icmp eq i64 %.lcssa, 0
  br i1 %.not3442, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %.critedge36, %.lr.ph44
  %.02843 = phi ptr [ %37, %.lr.ph44 ], [ %8, %.critedge36 ]
  %34 = load i64, ptr %.02843, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @.str.1)
  %37 = getelementptr inbounds i8, ptr %.02843, i64 8
  %.not34 = icmp eq ptr %37, %9
  br i1 %.not34, label %._crit_edge45, label %.lr.ph44

._crit_edge45:                                    ; preds = %.lr.ph44, %.critedge36, %32
  %.sink = phi ptr [ %33, %32 ], [ @_ZSt4cout, %.critedge36 ], [ @_ZSt4cout, %.lr.ph44 ]
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @.str)
  call void @llvm.stackrestore.p0(ptr %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNSt3_V26rotateIPlEET_S2_S2_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = { "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 = !{!"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: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass