; LLVM IR from jermp/2i_bench :: external/CRoaring/tests/cpp_unit.ll (Z30test_cpp_add_remove_checked_64PPv)

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

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [18 x i8], align 1
@__const._Z30test_cpp_add_remove_checked_64PPv.values32 = external hidden unnamed_addr constant [4 x i32], align 16
@.str.44 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [35 x i8], align 1
@__const._Z30test_cpp_add_remove_checked_64PPv.values64 = external hidden unnamed_addr constant [4 x i64], align 16
@.str.46 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [35 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

declare i32 @__gxx_personality_v0(...)

declare void @_assert_true(i64 noundef, ptr noundef, ptr noundef, i32 noundef) #2

; 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 void @_ZN12Roaring64MapC2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30test_cpp_add_remove_checked_64PPv(ptr noundef %0) #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.Roaring64Map, align 8
  %4 = alloca [4 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [4 x i64], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  call void @_ZN12Roaring64MapC2Ev(ptr noundef nonnull align 8 dereferenceable(49) %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const._Z30test_cpp_add_remove_checked_64PPv.values32, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %34, %1
  %13 = load i32, ptr %5, align 4, !tbaa !9
  %14 = icmp slt i32 %13, 4
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %41

16:                                               ; preds = %12
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %3, i32 noundef %20)
          to label %22 unwind label %37

22:                                               ; preds = %16
  %23 = zext i1 %21 to i64
  invoke void @_assert_true(i64 noundef %23, ptr noundef @.str.44, ptr noundef @.str.1, i32 noundef 471)
          to label %24 unwind label %37

24:                                               ; preds = %22
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %3, i32 noundef %28)
          to label %30 unwind label %37

30:                                               ; preds = %24
  %31 = xor i1 %29, true
  %32 = zext i1 %31 to i64
  invoke void @_assert_true(i64 noundef %32, ptr noundef @.str.44, ptr noundef @.str.1, i32 noundef 472)
          to label %33 unwind label %37

33:                                               ; preds = %30
  br label %34

34:                                               ; preds = %33
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %5, align 4, !tbaa !9
  br label %12, !llvm.loop !11

37:                                               ; preds = %30, %24, %22, %16
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %141

41:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %64, %41
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 4
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %3, i32 noundef %50)
          to label %52 unwind label %67

52:                                               ; preds = %46
  %53 = zext i1 %51 to i64
  invoke void @_assert_true(i64 noundef %53, ptr noundef @.str.45, ptr noundef @.str.1, i32 noundef 475)
          to label %54 unwind label %67

54:                                               ; preds = %52
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [4 x i32], ptr %4, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %3, i32 noundef %58)
          to label %60 unwind label %67

60:                                               ; preds = %54
  %61 = xor i1 %59, true
  %62 = zext i1 %61 to i64
  invoke void @_assert_true(i64 noundef %62, ptr noundef @.str.45, ptr noundef @.str.1, i32 noundef 476)
          to label %63 unwind label %67

63:                                               ; preds = %60
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %8, align 4, !tbaa !9
  br label %42, !llvm.loop !13

67:                                               ; preds = %60, %54, %52, %46
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %6, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %141

71:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const._Z30test_cpp_add_remove_checked_64PPv.values64, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %94, %71
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = icmp slt i32 %73, 4
  br i1 %74, label %76, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %101

76:                                               ; preds = %72
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !14
  %81 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %3, i64 noundef %80)
          to label %82 unwind label %97

82:                                               ; preds = %76
  %83 = zext i1 %81 to i64
  invoke void @_assert_true(i64 noundef %83, ptr noundef @.str.46, ptr noundef @.str.1, i32 noundef 481)
          to label %84 unwind label %97

84:                                               ; preds = %82
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !14
  %89 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %3, i64 noundef %88)
          to label %90 unwind label %97

90:                                               ; preds = %84
  %91 = xor i1 %89, true
  %92 = zext i1 %91 to i64
  invoke void @_assert_true(i64 noundef %92, ptr noundef @.str.46, ptr noundef @.str.1, i32 noundef 482)
          to label %93 unwind label %97

93:                                               ; preds = %90
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !9
  br label %72, !llvm.loop !16

97:                                               ; preds = %90, %84, %82, %76
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %140

101:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %124, %101
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = icmp slt i32 %103, 4
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %131

106:                                              ; preds = %102
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !14
  %111 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %3, i64 noundef %110)
          to label %112 unwind label %127

112:                                              ; preds = %106
  %113 = zext i1 %111 to i64
  invoke void @_assert_true(i64 noundef %113, ptr noundef @.str.47, ptr noundef @.str.1, i32 noundef 485)
          to label %114 unwind label %127

114:                                              ; preds = %112
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [4 x i64], ptr %9, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !14
  %119 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %3, i64 noundef %118)
          to label %120 unwind label %127

120:                                              ; preds = %114
  %121 = xor i1 %119, true
  %122 = zext i1 %121 to i64
  invoke void @_assert_true(i64 noundef %122, ptr noundef @.str.47, ptr noundef @.str.1, i32 noundef 486)
          to label %123 unwind label %127

123:                                              ; preds = %120
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %11, align 4, !tbaa !9
  br label %102, !llvm.loop !17

127:                                              ; preds = %120, %114, %112, %106
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %140

131:                                              ; preds = %105
  %132 = invoke noundef zeroext i1 @_ZNK12Roaring64Map7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(49) %3)
          to label %133 unwind label %136

133:                                              ; preds = %131
  %134 = zext i1 %132 to i64
  invoke void @_assert_true(i64 noundef %134, ptr noundef @.str.43, ptr noundef @.str.1, i32 noundef 488)
          to label %135 unwind label %136

135:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  ret void

136:                                              ; preds = %133, %131
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %6, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %7, align 4
  br label %140

140:                                              ; preds = %136, %127, %97
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %141

141:                                              ; preds = %140, %67, %37
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %3) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %6, align 8
  %144 = load i32, ptr %7, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK12Roaring64Map7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(49)) #5 align 2

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

%class.Roaring64Map = type <{ %"class.std::map", i8, [7 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, Roaring>, std::_Select1st<std::pair<const unsigned int, Roaring>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, Roaring>, std::_Select1st<std::pair<const unsigned int, Roaring>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [18 x i8], align 1
@__const._Z30test_cpp_add_remove_checked_64PPv.values32 = external hidden unnamed_addr constant [4 x i32], align 16
@.str.44 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [35 x i8], align 1
@__const._Z30test_cpp_add_remove_checked_64PPv.values64 = external hidden unnamed_addr constant [4 x i64], align 16
@.str.46 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [35 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

declare i32 @__gxx_personality_v0(...)

declare void @_assert_true(i64 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; 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 void @_ZN12Roaring64MapC2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30test_cpp_add_remove_checked_64PPv(ptr nocapture noundef readnone %0) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.Roaring64Map, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #5
  call void @_ZN12Roaring64MapC2Ev(ptr noundef nonnull align 8 dereferenceable(49) %2) #5
  %3 = load i32, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values32, align 16, !tbaa !5
  %4 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %3)
          to label %5 unwind label %43

5:                                                ; preds = %1
  %6 = zext i1 %4 to i64
  invoke void @_assert_true(i64 noundef %6, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 471)
          to label %7 unwind label %43

7:                                                ; preds = %5
  %8 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %3)
          to label %9 unwind label %43

9:                                                ; preds = %7
  %10 = xor i1 %8, true
  %11 = zext i1 %10 to i64
  invoke void @_assert_true(i64 noundef %11, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 472)
          to label %12 unwind label %43

12:                                               ; preds = %9
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values32, i64 4), align 4, !tbaa !5
  %14 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %13)
          to label %15 unwind label %43

15:                                               ; preds = %12
  %16 = zext i1 %14 to i64
  invoke void @_assert_true(i64 noundef %16, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 471)
          to label %17 unwind label %43

17:                                               ; preds = %15
  %18 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %13)
          to label %19 unwind label %43

19:                                               ; preds = %17
  %20 = xor i1 %18, true
  %21 = zext i1 %20 to i64
  invoke void @_assert_true(i64 noundef %21, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 472)
          to label %22 unwind label %43

22:                                               ; preds = %19
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values32, i64 8), align 8, !tbaa !5
  %24 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %23)
          to label %25 unwind label %43

25:                                               ; preds = %22
  %26 = zext i1 %24 to i64
  invoke void @_assert_true(i64 noundef %26, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 471)
          to label %27 unwind label %43

27:                                               ; preds = %25
  %28 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %23)
          to label %29 unwind label %43

29:                                               ; preds = %27
  %30 = xor i1 %28, true
  %31 = zext i1 %30 to i64
  invoke void @_assert_true(i64 noundef %31, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 472)
          to label %32 unwind label %43

32:                                               ; preds = %29
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values32, i64 12), align 4, !tbaa !5
  %34 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %33)
          to label %35 unwind label %43

35:                                               ; preds = %32
  %36 = zext i1 %34 to i64
  invoke void @_assert_true(i64 noundef %36, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 471)
          to label %37 unwind label %43

37:                                               ; preds = %35
  %38 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %33)
          to label %39 unwind label %43

39:                                               ; preds = %37
  %40 = xor i1 %38, true
  %41 = zext i1 %40 to i64
  invoke void @_assert_true(i64 noundef %41, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.1, i32 noundef 472)
          to label %.preheader27.preheader unwind label %43

.preheader27.preheader:                           ; preds = %39
  %42 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %3)
          to label %45 unwind label %78

43:                                               ; preds = %39, %37, %35, %32, %29, %27, %25, %22, %19, %17, %15, %12, %9, %7, %5, %1
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %157

45:                                               ; preds = %.preheader27.preheader
  %46 = zext i1 %42 to i64
  invoke void @_assert_true(i64 noundef %46, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 475)
          to label %47 unwind label %78

47:                                               ; preds = %45
  %48 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %3)
          to label %49 unwind label %78

49:                                               ; preds = %47
  %50 = xor i1 %48, true
  %51 = zext i1 %50 to i64
  invoke void @_assert_true(i64 noundef %51, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 476)
          to label %.preheader27.1 unwind label %78

.preheader27.1:                                   ; preds = %49
  %52 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %13)
          to label %53 unwind label %78

53:                                               ; preds = %.preheader27.1
  %54 = zext i1 %52 to i64
  invoke void @_assert_true(i64 noundef %54, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 475)
          to label %55 unwind label %78

55:                                               ; preds = %53
  %56 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %13)
          to label %57 unwind label %78

57:                                               ; preds = %55
  %58 = xor i1 %56, true
  %59 = zext i1 %58 to i64
  invoke void @_assert_true(i64 noundef %59, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 476)
          to label %.preheader27.2 unwind label %78

.preheader27.2:                                   ; preds = %57
  %60 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %23)
          to label %61 unwind label %78

61:                                               ; preds = %.preheader27.2
  %62 = zext i1 %60 to i64
  invoke void @_assert_true(i64 noundef %62, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 475)
          to label %63 unwind label %78

63:                                               ; preds = %61
  %64 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %23)
          to label %65 unwind label %78

65:                                               ; preds = %63
  %66 = xor i1 %64, true
  %67 = zext i1 %66 to i64
  invoke void @_assert_true(i64 noundef %67, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 476)
          to label %.preheader27.3 unwind label %78

.preheader27.3:                                   ; preds = %65
  %68 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %33)
          to label %69 unwind label %78

69:                                               ; preds = %.preheader27.3
  %70 = zext i1 %68 to i64
  invoke void @_assert_true(i64 noundef %70, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 475)
          to label %71 unwind label %78

71:                                               ; preds = %69
  %72 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49) %2, i32 noundef %33)
          to label %73 unwind label %78

73:                                               ; preds = %71
  %74 = xor i1 %72, true
  %75 = zext i1 %74 to i64
  invoke void @_assert_true(i64 noundef %75, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.1, i32 noundef 476)
          to label %.preheader26.preheader unwind label %78

.preheader26.preheader:                           ; preds = %73
  %76 = load i64, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values64, align 16, !tbaa !9
  %77 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %76)
          to label %80 unwind label %115

78:                                               ; preds = %73, %71, %69, %.preheader27.3, %65, %63, %61, %.preheader27.2, %57, %55, %53, %.preheader27.1, %49, %47, %45, %.preheader27.preheader
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %157

80:                                               ; preds = %.preheader26.preheader
  %81 = zext i1 %77 to i64
  invoke void @_assert_true(i64 noundef %81, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 481)
          to label %82 unwind label %115

82:                                               ; preds = %80
  %83 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %76)
          to label %84 unwind label %115

84:                                               ; preds = %82
  %85 = xor i1 %83, true
  %86 = zext i1 %85 to i64
  invoke void @_assert_true(i64 noundef %86, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 482)
          to label %.preheader26.1 unwind label %115

.preheader26.1:                                   ; preds = %84
  %87 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values64, i64 8), align 8, !tbaa !9
  %88 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %87)
          to label %89 unwind label %115

89:                                               ; preds = %.preheader26.1
  %90 = zext i1 %88 to i64
  invoke void @_assert_true(i64 noundef %90, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 481)
          to label %91 unwind label %115

91:                                               ; preds = %89
  %92 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %87)
          to label %93 unwind label %115

93:                                               ; preds = %91
  %94 = xor i1 %92, true
  %95 = zext i1 %94 to i64
  invoke void @_assert_true(i64 noundef %95, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 482)
          to label %.preheader26.2 unwind label %115

.preheader26.2:                                   ; preds = %93
  %96 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values64, i64 16), align 16, !tbaa !9
  %97 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %96)
          to label %98 unwind label %115

98:                                               ; preds = %.preheader26.2
  %99 = zext i1 %97 to i64
  invoke void @_assert_true(i64 noundef %99, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 481)
          to label %100 unwind label %115

100:                                              ; preds = %98
  %101 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %96)
          to label %102 unwind label %115

102:                                              ; preds = %100
  %103 = xor i1 %101, true
  %104 = zext i1 %103 to i64
  invoke void @_assert_true(i64 noundef %104, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 482)
          to label %.preheader26.3 unwind label %115

.preheader26.3:                                   ; preds = %102
  %105 = load i64, ptr getelementptr inbounds (i8, ptr @__const._Z30test_cpp_add_remove_checked_64PPv.values64, i64 24), align 8, !tbaa !9
  %106 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %105)
          to label %107 unwind label %115

107:                                              ; preds = %.preheader26.3
  %108 = zext i1 %106 to i64
  invoke void @_assert_true(i64 noundef %108, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 481)
          to label %109 unwind label %115

109:                                              ; preds = %107
  %110 = invoke noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %105)
          to label %111 unwind label %115

111:                                              ; preds = %109
  %112 = xor i1 %110, true
  %113 = zext i1 %112 to i64
  invoke void @_assert_true(i64 noundef %113, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.1, i32 noundef 482)
          to label %.preheader.preheader unwind label %115

.preheader.preheader:                             ; preds = %111
  %114 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %76)
          to label %117 unwind label %150

115:                                              ; preds = %111, %109, %107, %.preheader26.3, %102, %100, %98, %.preheader26.2, %93, %91, %89, %.preheader26.1, %84, %82, %80, %.preheader26.preheader
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %157

117:                                              ; preds = %.preheader.preheader
  %118 = zext i1 %114 to i64
  invoke void @_assert_true(i64 noundef %118, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 485)
          to label %119 unwind label %150

119:                                              ; preds = %117
  %120 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %76)
          to label %121 unwind label %150

121:                                              ; preds = %119
  %122 = xor i1 %120, true
  %123 = zext i1 %122 to i64
  invoke void @_assert_true(i64 noundef %123, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 486)
          to label %.preheader.1 unwind label %150

.preheader.1:                                     ; preds = %121
  %124 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %87)
          to label %125 unwind label %150

125:                                              ; preds = %.preheader.1
  %126 = zext i1 %124 to i64
  invoke void @_assert_true(i64 noundef %126, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 485)
          to label %127 unwind label %150

127:                                              ; preds = %125
  %128 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %87)
          to label %129 unwind label %150

129:                                              ; preds = %127
  %130 = xor i1 %128, true
  %131 = zext i1 %130 to i64
  invoke void @_assert_true(i64 noundef %131, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 486)
          to label %.preheader.2 unwind label %150

.preheader.2:                                     ; preds = %129
  %132 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %96)
          to label %133 unwind label %150

133:                                              ; preds = %.preheader.2
  %134 = zext i1 %132 to i64
  invoke void @_assert_true(i64 noundef %134, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 485)
          to label %135 unwind label %150

135:                                              ; preds = %133
  %136 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %96)
          to label %137 unwind label %150

137:                                              ; preds = %135
  %138 = xor i1 %136, true
  %139 = zext i1 %138 to i64
  invoke void @_assert_true(i64 noundef %139, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 486)
          to label %.preheader.3 unwind label %150

.preheader.3:                                     ; preds = %137
  %140 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %105)
          to label %141 unwind label %150

141:                                              ; preds = %.preheader.3
  %142 = zext i1 %140 to i64
  invoke void @_assert_true(i64 noundef %142, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 485)
          to label %143 unwind label %150

143:                                              ; preds = %141
  %144 = invoke noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49) %2, i64 noundef %105)
          to label %145 unwind label %150

145:                                              ; preds = %143
  %146 = xor i1 %144, true
  %147 = zext i1 %146 to i64
  invoke void @_assert_true(i64 noundef %147, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.1, i32 noundef 486)
          to label %148 unwind label %150

148:                                              ; preds = %145
  %149 = invoke noundef zeroext i1 @_ZNK12Roaring64Map7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
          to label %152 unwind label %155

150:                                              ; preds = %145, %143, %141, %.preheader.3, %137, %135, %133, %.preheader.2, %129, %127, %125, %.preheader.1, %121, %119, %117, %.preheader.preheader
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %157

152:                                              ; preds = %148
  %153 = zext i1 %149 to i64
  invoke void @_assert_true(i64 noundef %153, ptr noundef nonnull @.str.43, ptr noundef nonnull @.str.1, i32 noundef 488)
          to label %154 unwind label %155

154:                                              ; preds = %152
  call void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  ret void

155:                                              ; preds = %152, %148
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %157

157:                                              ; preds = %115, %150, %155, %78, %43
  %.pn24 = phi { ptr, i32 } [ %44, %43 ], [ %79, %78 ], [ %116, %115 ], [ %151, %150 ], [ %156, %155 ]
  call void @_ZN12Roaring64MapD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn24
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map10addCheckedEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12Roaring64Map13removeCheckedEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK12Roaring64Map7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #4 align 2

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass