; LLVM IR from facebookresearch/baspacho :: baspacho/testing (TestingUtils)

; 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.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>

@.str.10 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils26naiveAddEliminationEntriesERSt6vectorISt3setIlSt4lessIlESaIlEESaIS6_EEll(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, i64 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %20 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %20, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef i64 @_ZNKSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  store i64 %22, ptr %8, align 8, !tbaa !9
  %23 = load i64, ptr %7, align 8, !tbaa !9
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = icmp ule i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %3
  call void @_ZN8BaSpaCho10throwErrorIlmEEvPKciS2_RKT_RKT0_(ptr noundef @.str.10, i32 noundef 198, ptr noundef @.str.13, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br label %27

27:                                               ; preds = %26, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %28 = load i64, ptr %5, align 8, !tbaa !9
  %29 = trunc i64 %28 to i32
  store i32 %29, ptr %9, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %87, %27
  %31 = load i32, ptr %9, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = load i64, ptr %6, align 8, !tbaa !9
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %90

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #5
  store ptr %40, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %41) #5
  %43 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %44) #5
  %46 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  %48 = xor i1 %47, true
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br i1 %48, label %49, label %50

49:                                               ; preds = %36
  call void @_ZN8BaSpaCho10throwErrorEPKciS1_(ptr noundef @.str.10, i32 noundef 202, ptr noundef @.str.14)
  br label %50

50:                                               ; preds = %49, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %51 = load i32, ptr %9, align 4, !tbaa !11
  store i32 %51, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %53 = load i64, ptr %52, align 8, !tbaa !9
  store i64 %53, ptr %14, align 8, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = load i64, ptr %14, align 8, !tbaa !9
  %57 = icmp eq i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %50
  call void @_ZN8BaSpaCho10throwErrorIilEEvPKciS2_RKT_RKT0_(ptr noundef @.str.10, i32 noundef 203, ptr noundef @.str.15, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  br label %59

59:                                               ; preds = %58, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %60

60:                                               ; preds = %85, %59
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %62) #5
  %64 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  %65 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br i1 %65, label %66, label %86

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %11, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #5
  store ptr %70, ptr %17, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %77, %66
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %73) #5
  %75 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  %76 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br i1 %76, label %77, label %85

77:                                               ; preds = %71
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  %80 = call { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %78, ptr noundef nonnull align 8 dereferenceable(8) %79)
  %81 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 0
  %82 = extractvalue { ptr, i8 } %80, 0
  store ptr %82, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 1
  %84 = extractvalue { ptr, i8 } %80, 1
  store i8 %84, ptr %83, align 8
  br label %71, !llvm.loop !14

85:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %60, !llvm.loop !16

86:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %9, align 4, !tbaa !11
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !11
  br label %30, !llvm.loop !17

90:                                               ; preds = %35
  ret void
}

declare void @_ZN8BaSpaCho10throwErrorEPKciS1_(ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8BaSpaCho10throwErrorIilEEvPKciS2_RKT_RKT0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !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"

%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str.10 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils26naiveAddEliminationEntriesERSt6vectorISt3setIlSt4lessIlESaIlEESaIS6_EEll(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store i64 %2, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %13 = tail call noundef i64 @_ZNKSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  store i64 %13, ptr %5, align 8, !tbaa !5
  %.not = icmp ult i64 %13, %2
  br i1 %.not, label %14, label %15

14:                                               ; preds = %3
  call void @_ZN8BaSpaCho10throwErrorIlmEEvPKciS2_RKT_RKT0_(ptr noundef nonnull @.str.10, i32 noundef 198, ptr noundef nonnull @.str.13, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br label %15

15:                                               ; preds = %14, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %sext = shl i64 %1, 32
  %16 = ashr exact i64 %sext, 32
  %17 = icmp slt i64 %16, %2
  br i1 %17, label %.lr.ph20, label %._crit_edge21

._crit_edge21:                                    ; preds = %._crit_edge17, %15
  ret void

.lr.ph20:                                         ; preds = %15, %._crit_edge17
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge17 ], [ %16, %15 ]
  %18 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %19 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %19, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %20 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %20, ptr %7, align 8
  %21 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %21, label %23, label %22

22:                                               ; preds = %.lr.ph20
  call void @_ZN8BaSpaCho10throwErrorEPKciS1_(ptr noundef nonnull @.str.10, i32 noundef 202, ptr noundef nonnull @.str.14)
  br label %23

23:                                               ; preds = %22, %.lr.ph20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %24 = trunc nsw i64 %indvars.iv to i32
  store i32 %24, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %26 = load i64, ptr %25, align 8, !tbaa !5
  store i64 %26, ptr %9, align 8, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = icmp eq i64 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %23
  call void @_ZN8BaSpaCho10throwErrorIilEEvPKciS2_RKT_RKT0_(ptr noundef nonnull @.str.10, i32 noundef 203, ptr noundef nonnull @.str.15, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  br label %31

31:                                               ; preds = %30, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %33 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %33, ptr %10, align 8
  %34 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %34, label %.lr.ph16, label %._crit_edge17

.lr.ph16:                                         ; preds = %31, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %35 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %35, ptr %11, align 8, !tbaa !11
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %37) #4
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %40 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %40, ptr %12, align 8
  %41 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  br i1 %41, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph16, %.lr.ph
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %43 = call { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %38, ptr noundef nonnull align 8 dereferenceable(8) %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %45 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %45, ptr %12, align 8
  %46 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %48 = call ptr @_ZNKSt3setIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #4
  store ptr %48, ptr %10, align 8
  %49 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %49, label %.lr.ph16, label %._crit_edge17, !llvm.loop !15

._crit_edge17:                                    ; preds = %._crit_edge, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %50 = icmp slt i64 %indvars.iv.next, %2
  br i1 %50, label %.lr.ph20, label %._crit_edge21, !llvm.loop !16
}

declare void @_ZN8BaSpaCho10throwErrorEPKciS1_(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8BaSpaCho10throwErrorIilEEvPKciS2_RKT_RKT0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass