; LLVM IR from ravireddy07/cpp-book :: src/Subsequences (CountSubSeq)

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

@mod = external dso_local global i32, align 4
@s = external dso_local global [100005 x i8], align 16
@previous_count = external dso_local global [200 x i32], align 16
@dp = external dso_local global [100005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

17:                                               ; preds = %89, %0
  %18 = load i32, ptr %3, align 4, !tbaa !8
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr %3, align 4, !tbaa !8
  %20 = icmp ne i32 %18, 0
  br i1 %20, label %21, label %96

21:                                               ; preds = %17
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef @s)
  call void @llvm.memset.p0.i64(ptr align 16 @previous_count, i8 -1, i64 800, i1 false)
  %23 = call i64 @strlen(ptr noundef @s) #9
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %2, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 0, i64 800040, i1 false)
  store i64 1, ptr @dp, align 16, !tbaa !11
  %25 = load i8, ptr @s, align 16, !tbaa !13
  %26 = sext i8 %25 to i64
  %27 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %26
  store i32 0, ptr %27, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 1, ptr %4, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %86, %21
  %29 = load i64, ptr %4, align 8, !tbaa !11
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = icmp sle i64 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %89

34:                                               ; preds = %28
  %35 = load i64, ptr %4, align 8, !tbaa !11
  %36 = sub nsw i64 %35, 1
  %37 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = mul nsw i64 2, %38
  %40 = load i32, ptr @mod, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = srem i64 %39, %41
  %43 = load i64, ptr %4, align 8, !tbaa !11
  %44 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %43
  store i64 %42, ptr %44, align 8, !tbaa !11
  %45 = load i64, ptr %4, align 8, !tbaa !11
  %46 = sub nsw i64 %45, 1
  %47 = getelementptr inbounds [100005 x i8], ptr @s, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !13
  %49 = sext i8 %48 to i64
  %50 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !8
  %52 = icmp ne i32 %51, -1
  br i1 %52, label %53, label %77

53:                                               ; preds = %34
  %54 = load i64, ptr %4, align 8, !tbaa !11
  %55 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = load i64, ptr %4, align 8, !tbaa !11
  %58 = sub nsw i64 %57, 1
  %59 = getelementptr inbounds [100005 x i8], ptr @s, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !13
  %61 = sext i8 %60 to i64
  %62 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = sub nsw i64 %56, %67
  %69 = load i32, ptr @mod, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = add nsw i64 %68, %70
  %72 = load i32, ptr @mod, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = srem i64 %71, %73
  %75 = load i64, ptr %4, align 8, !tbaa !11
  %76 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %75
  store i64 %74, ptr %76, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %53, %34
  %78 = load i64, ptr %4, align 8, !tbaa !11
  %79 = trunc i64 %78 to i32
  %80 = load i64, ptr %4, align 8, !tbaa !11
  %81 = sub nsw i64 %80, 1
  %82 = getelementptr inbounds [100005 x i8], ptr @s, i64 0, i64 %81
  %83 = load i8, ptr %82, align 1, !tbaa !13
  %84 = sext i8 %83 to i64
  %85 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %84
  store i32 %79, ptr %85, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %77
  %87 = load i64, ptr %4, align 8, !tbaa !11
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %4, align 8, !tbaa !11
  br label %28, !llvm.loop !14

89:                                               ; preds = %33
  %90 = load i32, ptr %2, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %93)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %94, i8 noundef signext 10)
  br label %17, !llvm.loop !16

96:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) #4

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(read) "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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !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::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" }

@mod = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local global [100005 x i8], align 16
@previous_count = external dso_local local_unnamed_addr global [200 x i32], align 16
@dp = external dso_local local_unnamed_addr global [100005 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %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)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = load i32, ptr %1, align 4, !tbaa !8
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %1, align 4, !tbaa !8
  %.not18 = icmp eq i32 %14, 0
  br i1 %.not18, label %._crit_edge21, label %.lr.ph20

.lr.ph20:                                         ; preds = %0, %._crit_edge
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef @s)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800) @previous_count, i8 -1, i64 800, i1 false)
  %17 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800040) @dp, i8 0, i64 800040, i1 false)
  store i64 1, ptr @dp, align 16, !tbaa !11
  %18 = load i8, ptr @s, align 16, !tbaa !13
  %19 = sext i8 %18 to i64
  %20 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %19
  store i32 0, ptr %20, align 4, !tbaa !8
  %sext = shl i64 %17, 32
  %21 = ashr exact i64 %sext, 32
  %.not1416 = icmp slt i64 %21, 1
  br i1 %.not1416, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph20
  %22 = load i32, ptr @mod, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  br label %30

._crit_edge:                                      ; preds = %49, %.lr.ph20
  %24 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %21
  %25 = load i64, ptr %24, align 8, !tbaa !11
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %25)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %26, i8 noundef signext 10)
  %28 = load i32, ptr %1, align 4, !tbaa !8
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr %1, align 4, !tbaa !8
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %._crit_edge21, label %.lr.ph20, !llvm.loop !14

30:                                               ; preds = %.lr.ph, %49
  %31 = phi i64 [ 1, %.lr.ph ], [ %50, %49 ]
  %.017 = phi i64 [ 1, %.lr.ph ], [ %52, %49 ]
  %32 = add nsw i64 %.017, -1
  %33 = shl nsw i64 %31, 1
  %34 = srem i64 %33, %23
  %35 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %.017
  store i64 %34, ptr %35, align 8, !tbaa !11
  %36 = getelementptr inbounds [100005 x i8], ptr @s, i64 0, i64 %32
  %37 = load i8, ptr %36, align 1, !tbaa !13
  %38 = sext i8 %37 to i64
  %39 = getelementptr inbounds [200 x i32], ptr @previous_count, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !8
  %.not15 = icmp eq i32 %40, -1
  br i1 %.not15, label %49, label %41

41:                                               ; preds = %30
  %42 = add nsw i32 %40, -1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100005 x i64], ptr @dp, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = add nsw i64 %34, %23
  %47 = sub i64 %46, %45
  %48 = srem i64 %47, %23
  store i64 %48, ptr %35, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %41, %30
  %50 = phi i64 [ %48, %41 ], [ %34, %30 ]
  %51 = trunc i64 %.017 to i32
  store i32 %51, ptr %39, align 4, !tbaa !8
  %52 = add nuw nsw i64 %.017, 1
  %exitcond.not = icmp eq i64 %.017, %21
  br i1 %exitcond.not, label %._crit_edge, label %30, !llvm.loop !16

._crit_edge21:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass