; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1791_F.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"

%struct.BIT = type { i64, [200010 x i64] }
%"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" }

@a = external dso_local global [200010 x i64], align 16
@t = external dso_local global %struct.BIT, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6dg_sumx(i64 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = add nsw i64 %13, 5
  store i64 %14, ptr @t, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %23, %0
  %16 = load i64, ptr %3, align 8, !tbaa !5
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp sle i64 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %26

20:                                               ; preds = %15
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds [200010 x i64], ptr getelementptr inbounds (%struct.BIT, ptr @t, i32 0, i32 1), i64 0, i64 %21
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %20
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = add nsw i64 %24, 1
  store i64 %25, ptr %3, align 8, !tbaa !5
  br label %15, !llvm.loop !11

26:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 1, ptr %4, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %36, %26
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp sle i64 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %39

32:                                               ; preds = %27
  %33 = load i64, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %33
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %36

36:                                               ; preds = %32
  %37 = load i64, ptr %4, align 8, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %4, align 8, !tbaa !5
  br label %27, !llvm.loop !13

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 1, ptr %5, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %81, %39
  %41 = load i64, ptr %5, align 8, !tbaa !5
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = icmp sle i64 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %84

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %47 = load i64, ptr %6, align 8, !tbaa !5
  %48 = icmp eq i64 %47, 1
  br i1 %48, label %49, label %54

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %52 = load i64, ptr %7, align 8, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !5
  call void @_ZN3BIT6updateExxx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %52, i64 noundef %53, i64 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %80

54:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %56 = load i64, ptr %9, align 8, !tbaa !5
  %57 = call noundef i64 @_ZN3BIT5queryEx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %56)
  store i64 %57, ptr %10, align 8, !tbaa !5
  %58 = load i64, ptr %10, align 8, !tbaa !5
  %59 = icmp sgt i64 %58, 3
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  store i64 3, ptr %10, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %60, %54
  br label %62

62:                                               ; preds = %66, %61
  %63 = load i64, ptr %10, align 8, !tbaa !5
  %64 = add nsw i64 %63, -1
  store i64 %64, ptr %10, align 8, !tbaa !5
  %65 = icmp ne i64 %63, 0
  br i1 %65, label %66, label %73

66:                                               ; preds = %62
  %67 = load i64, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = call noundef i64 @_Z6dg_sumx(i64 noundef %69)
  %71 = load i64, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %71
  store i64 %70, ptr %72, align 8, !tbaa !5
  br label %62, !llvm.loop !14

73:                                               ; preds = %62
  %74 = load i64, ptr %9, align 8, !tbaa !5
  call void @_ZN3BIT7to_zeroEx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %74)
  %75 = load i64, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %78, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %80

80:                                               ; preds = %73, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %81

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

84:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3BIT5queryEx(ptr noundef nonnull align 8 dereferenceable(1600088), i64 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


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

%struct.BIT = type { i64, [200010 x i64] }
%"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" }

@a = external dso_local global [200010 x i64], align 16
@t = external dso_local global %struct.BIT, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z6dg_sumx(i64 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = add nsw i64 %9, 5
  store i64 %10, ptr @t, align 8, !tbaa !9
  %.not17 = icmp slt i64 %9, 0
  br i1 %.not17, label %.preheader, label %.preheader16

.preheader16:                                     ; preds = %0
  %11 = shl i64 %9, 3
  %12 = add i64 %11, 8
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @t, i64 8), i8 0, i64 %12, i1 false), !tbaa !5
  %.not1319 = icmp eq i64 %9, 0
  br i1 %.not1319, label %.preheader, label %.lr.ph21

.preheader:                                       ; preds = %.lr.ph21, %0, %.preheader16
  %13 = load i64, ptr %2, align 8, !tbaa !5
  %.not1425 = icmp slt i64 %13, 1
  br i1 %.not1425, label %._crit_edge28, label %.lr.ph27

.lr.ph21:                                         ; preds = %.preheader16, %.lr.ph21
  %.01120 = phi i64 [ %16, %.lr.ph21 ], [ 1, %.preheader16 ]
  %14 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.01120
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = add nuw nsw i64 %.01120, 1
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %.not13.not = icmp slt i64 %.01120, %17
  br i1 %.not13.not, label %.lr.ph21, label %.preheader, !llvm.loop !11

._crit_edge28:                                    ; preds = %41, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void

.lr.ph27:                                         ; preds = %.preheader, %41
  %.01026 = phi i64 [ %42, %41 ], [ 1, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = icmp eq i64 %19, 1
  br i1 %20, label %21, label %26

21:                                               ; preds = %.lr.ph27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %24 = load i64, ptr %4, align 8, !tbaa !5
  %25 = load i64, ptr %5, align 8, !tbaa !5
  call void @_ZN3BIT6updateExxx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %24, i64 noundef %25, i64 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %41

26:                                               ; preds = %.lr.ph27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %28 = load i64, ptr %6, align 8, !tbaa !5
  %29 = call noundef i64 @_ZN3BIT5queryEx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %28)
  %.not1522 = icmp eq i64 %29, 0
  %.pre30 = load i64, ptr %6, align 8, !tbaa !5
  br i1 %.not1522, label %._crit_edge, label %.lr.ph24.preheader

.lr.ph24.preheader:                               ; preds = %26
  %spec.store.select = call i64 @llvm.smin.i64(i64 %29, i64 3)
  %.phi.trans.insert = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.pre30
  %.pre29 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !5
  br label %.lr.ph24

.lr.ph24:                                         ; preds = %.lr.ph24.preheader, %.lr.ph24
  %30 = phi i64 [ %32, %.lr.ph24 ], [ %.pre29, %.lr.ph24.preheader ]
  %.023 = phi i64 [ %31, %.lr.ph24 ], [ %spec.store.select, %.lr.ph24.preheader ]
  %31 = add nsw i64 %.023, -1
  %32 = call noundef i64 @_Z6dg_sumx(i64 noundef %30)
  %33 = load i64, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %33
  store i64 %32, ptr %34, align 8, !tbaa !5
  %.not15 = icmp eq i64 %31, 0
  br i1 %.not15, label %._crit_edge, label %.lr.ph24, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph24, %26
  %35 = phi i64 [ %.pre30, %26 ], [ %33, %.lr.ph24 ]
  call void @_ZN3BIT7to_zeroEx(ptr noundef nonnull align 8 dereferenceable(1600088) @t, i64 noundef %35)
  %36 = load i64, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %38)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %39, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %41

41:                                               ; preds = %._crit_edge, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %42 = add nuw nsw i64 %.01026, 1
  %43 = load i64, ptr %2, align 8, !tbaa !5
  %.not14.not = icmp slt i64 %.01026, %43
  br i1 %.not14.not, label %.lr.ph27, label %._crit_edge28, !llvm.loop !14
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3BIT5queryEx(ptr noundef nonnull align 8 dereferenceable(1600088), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS3BIT", !6, i64 0, !7, i64 8}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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