; LLVM IR from jermp/2i_bench :: external/CRoaring/tests (toplevel_unit)

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

@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [40 x i8], align 1
@__PRETTY_FUNCTION__.test_add_range = external hidden unnamed_addr constant [22 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [40 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

declare ptr @roaring_bitmap_from_range(i64 noundef, i64 noundef, i32 noundef) #1

declare void @roaring_bitmap_free(ptr noundef) #1

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

declare ptr @roaring_bitmap_create() #1

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

declare i64 @roaring_bitmap_get_cardinality(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare void @roaring_bitmap_set_copy_on_write(ptr noundef, i1 noundef zeroext) #2

declare ptr @roaring_bitmap_copy(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @sbs_create() #4

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_free(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_convert(ptr noundef, i8 noundef zeroext) #4

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

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_add_range(ptr noundef, i64 noundef, i64 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare void @roaring_bitmap_add_range(ptr noundef, i64 noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @sbs_check_type(ptr noundef, i8 noundef zeroext) #4

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_compare(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @test_add_range() #4 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %27 = call ptr @sbs_create()
  store ptr %27, ptr %1, align 8, !tbaa !5
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %28, i32 noundef 100)
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_convert(ptr noundef %29, i8 noundef zeroext 1)
  %30 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %30, i64 noundef 0, i64 noundef 299)
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = call zeroext i1 @sbs_check_type(ptr noundef %31, i8 noundef zeroext 1)
  %33 = zext i1 %32 to i64
  call void @_assert_true(i64 noundef %33, ptr noundef @.str.157, ptr noundef @.str.2, i32 noundef 3601)
  %34 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %34, i64 noundef 301, i64 noundef 65535)
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  %36 = call zeroext i1 @sbs_check_type(ptr noundef %35, i8 noundef zeroext 1)
  %37 = zext i1 %36 to i64
  call void @_assert_true(i64 noundef %37, ptr noundef @.str.157, ptr noundef @.str.2, i32 noundef 3603)
  %38 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %38, i64 noundef 300, i64 noundef 300)
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = call zeroext i1 @sbs_check_type(ptr noundef %39, i8 noundef zeroext 3)
  %41 = zext i1 %40 to i64
  call void @_assert_true(i64 noundef %41, ptr noundef @.str.158, ptr noundef @.str.2, i32 noundef 3606)
  %42 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %42)
  %43 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %43)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %44 = call ptr @sbs_create()
  store ptr %44, ptr %2, align 8, !tbaa !5
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %45, i32 noundef 100)
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  call void @sbs_convert(ptr noundef %46, i8 noundef zeroext 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %57, %0
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = icmp slt i32 %48, 100
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %60

51:                                               ; preds = %47
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !9
  call void @sbs_add_value(ptr noundef %52, i32 noundef %53)
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = call zeroext i1 @sbs_check_type(ptr noundef %54, i8 noundef zeroext 2)
  %56 = zext i1 %55 to i64
  call void @_assert_true(i64 noundef %56, ptr noundef @.str.159, ptr noundef @.str.2, i32 noundef 3620)
  br label %57

57:                                               ; preds = %51
  %58 = load i32, ptr %3, align 4, !tbaa !9
  %59 = add nsw i32 %58, 2
  store i32 %59, ptr %3, align 4, !tbaa !9
  br label %47, !llvm.loop !11

60:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %68, %60
  %62 = load i32, ptr %4, align 4, !tbaa !9
  %63 = icmp slt i32 %62, 65535
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %71

65:                                               ; preds = %61
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = load i32, ptr %4, align 4, !tbaa !9
  call void @sbs_add_value(ptr noundef %66, i32 noundef %67)
  br label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = add nsw i32 %69, 2
  store i32 %70, ptr %4, align 4, !tbaa !9
  br label %61, !llvm.loop !13

71:                                               ; preds = %64
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = call zeroext i1 @sbs_check_type(ptr noundef %72, i8 noundef zeroext 1)
  %74 = zext i1 %73 to i64
  call void @_assert_true(i64 noundef %74, ptr noundef @.str.157, ptr noundef @.str.2, i32 noundef 3627)
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %75)
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %76)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %77 = call ptr @sbs_create()
  store ptr %77, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %78, i64 noundef 0, i64 noundef 100)
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sbs_convert(ptr noundef %79, i8 noundef zeroext 2)
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %80, i64 noundef 100, i64 noundef 65535)
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call zeroext i1 @sbs_check_type(ptr noundef %81, i8 noundef zeroext 3)
  %83 = zext i1 %82 to i64
  call void @_assert_true(i64 noundef %83, ptr noundef @.str.158, ptr noundef @.str.2, i32 noundef 3641)
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %84)
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %85)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %86 = call ptr @sbs_create()
  store ptr %86, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %103, %71
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = icmp slt i32 %88, 100
  br i1 %89, label %91, label %90

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

91:                                               ; preds = %87
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = mul nsw i32 4, %93
  %95 = sext i32 %94 to i64
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = mul nsw i32 4, %96
  %98 = add nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  call void @sbs_add_range(ptr noundef %92, i64 noundef %95, i64 noundef %99)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call zeroext i1 @sbs_check_type(ptr noundef %100, i8 noundef zeroext 3)
  %102 = zext i1 %101 to i64
  call void @_assert_true(i64 noundef %102, ptr noundef @.str.158, ptr noundef @.str.2, i32 noundef 3652)
  br label %103

103:                                              ; preds = %91
  %104 = load i32, ptr %7, align 4, !tbaa !9
  %105 = add nsw i32 %104, 2
  store i32 %105, ptr %7, align 4, !tbaa !9
  br label %87, !llvm.loop !14

106:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %117, %106
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = icmp slt i32 %108, 65535
  br i1 %109, label %111, label %110

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

111:                                              ; preds = %107
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  call void @sbs_add_range(ptr noundef %112, i64 noundef %114, i64 noundef %116)
  br label %117

117:                                              ; preds = %111
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = add nsw i32 %118, 2
  store i32 %119, ptr %8, align 4, !tbaa !9
  br label %107, !llvm.loop !15

120:                                              ; preds = %110
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = call zeroext i1 @sbs_check_type(ptr noundef %121, i8 noundef zeroext 1)
  %123 = zext i1 %122 to i64
  call void @_assert_true(i64 noundef %123, ptr noundef @.str.157, ptr noundef @.str.2, i32 noundef 3658)
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %124)
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %126 = call ptr @sbs_create()
  store ptr %126, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %140, %120
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = icmp slt i32 %128, 100
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %143

131:                                              ; preds = %127
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  call void @sbs_add_range(ptr noundef %132, i64 noundef %134, i64 noundef %136)
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = call zeroext i1 @sbs_check_type(ptr noundef %137, i8 noundef zeroext 2)
  %139 = zext i1 %138 to i64
  call void @_assert_true(i64 noundef %139, ptr noundef @.str.159, ptr noundef @.str.2, i32 noundef 3668)
  br label %140

140:                                              ; preds = %131
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = add nsw i32 %141, 2
  store i32 %142, ptr %10, align 4, !tbaa !9
  br label %127, !llvm.loop !16

143:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %154, %143
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = icmp slt i32 %145, 65535
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %157

148:                                              ; preds = %144
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  call void @sbs_add_range(ptr noundef %149, i64 noundef %151, i64 noundef %153)
  br label %154

154:                                              ; preds = %148
  %155 = load i32, ptr %11, align 4, !tbaa !9
  %156 = add nsw i32 %155, 2
  store i32 %156, ptr %11, align 4, !tbaa !9
  br label %144, !llvm.loop !17

157:                                              ; preds = %147
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = call zeroext i1 @sbs_check_type(ptr noundef %158, i8 noundef zeroext 1)
  %160 = zext i1 %159 to i64
  call void @_assert_true(i64 noundef %160, ptr noundef @.str.157, ptr noundef @.str.2, i32 noundef 3674)
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %161)
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %162)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %163 = call ptr @sbs_create()
  store ptr %163, ptr %12, align 8, !tbaa !5
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %164, i32 noundef 5)
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %165, i64 noundef 65541, i64 noundef 65556)
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %166)
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %167)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %168 = call ptr @sbs_create()
  store ptr %168, ptr %13, align 8, !tbaa !5
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %169, i32 noundef 65541)
  %170 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %170, i64 noundef 5, i64 noundef 20)
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %171)
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %172)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %173 = call ptr @sbs_create()
  store ptr %173, ptr %14, align 8, !tbaa !5
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %174, i32 noundef 5)
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sbs_add_value(ptr noundef %175, i32 noundef 131077)
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %176, i64 noundef 65541, i64 noundef 65556)
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %177)
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %178)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %179 = call ptr @sbs_create()
  store ptr %179, ptr %15, align 8, !tbaa !5
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sbs_add_range(ptr noundef %180, i64 noundef 200, i64 noundef 100)
  %181 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %181)
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %182)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1048576, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %225, %157
  %184 = load i32, ptr %17, align 4, !tbaa !9
  %185 = icmp ult i32 %184, 16384
  br i1 %185, label %187, label %186

186:                                              ; preds = %183
  store i32 20, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %228

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %188 = call ptr @sbs_create()
  store ptr %188, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %198, %187
  %190 = load i32, ptr %20, align 4, !tbaa !9
  %191 = icmp slt i32 %190, 50
  br i1 %191, label %193, label %192

192:                                              ; preds = %189
  store i32 23, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %201

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %194 = call i32 @our_rand()
  %195 = urem i32 %194, 1048576
  store i32 %195, ptr %21, align 4, !tbaa !9
  %196 = load ptr, ptr %19, align 8, !tbaa !5
  %197 = load i32, ptr %21, align 4, !tbaa !9
  call void @sbs_add_value(ptr noundef %196, i32 noundef %197)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %198

198:                                              ; preds = %193
  %199 = load i32, ptr %20, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %20, align 4, !tbaa !9
  br label %189, !llvm.loop !18

201:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %219, %201
  %203 = load i32, ptr %22, align 4, !tbaa !9
  %204 = icmp slt i32 %203, 50
  br i1 %204, label %206, label %205

205:                                              ; preds = %202
  store i32 26, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %222

206:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %207 = call i32 @our_rand()
  %208 = load i32, ptr %17, align 4, !tbaa !9
  %209 = sub i32 1048576, %208
  %210 = urem i32 %207, %209
  %211 = zext i32 %210 to i64
  store i64 %211, ptr %23, align 8, !tbaa !19
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = load i64, ptr %23, align 8, !tbaa !19
  %214 = load i64, ptr %23, align 8, !tbaa !19
  %215 = load i32, ptr %17, align 4, !tbaa !9
  %216 = zext i32 %215 to i64
  %217 = add i64 %214, %216
  %218 = sub i64 %217, 1
  call void @sbs_add_range(ptr noundef %212, i64 noundef %213, i64 noundef %218)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %219

219:                                              ; preds = %206
  %220 = load i32, ptr %22, align 4, !tbaa !9
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %22, align 4, !tbaa !9
  br label %202, !llvm.loop !21

222:                                              ; preds = %205
  %223 = load ptr, ptr %19, align 8, !tbaa !5
  call void @sbs_compare(ptr noundef %223)
  %224 = load ptr, ptr %19, align 8, !tbaa !5
  call void @sbs_free(ptr noundef %224)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %225

225:                                              ; preds = %222
  %226 = load i32, ptr %17, align 4, !tbaa !9
  %227 = mul i32 %226, 3
  store i32 %227, ptr %17, align 4, !tbaa !9
  br label %183, !llvm.loop !22

228:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %229 = call ptr @roaring_bitmap_create()
  store ptr %229, ptr %24, align 8, !tbaa !5
  %230 = load ptr, ptr %24, align 8, !tbaa !5
  call void @roaring_bitmap_add_range(ptr noundef %230, i64 noundef 0, i64 noundef 4294967296)
  %231 = load ptr, ptr %24, align 8, !tbaa !5
  %232 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %231)
  %233 = icmp eq i64 %232, 4294967296
  %234 = zext i1 %233 to i32
  %235 = sext i32 %234 to i64
  call void @_assert_true(i64 noundef %235, ptr noundef @.str.78, ptr noundef @.str.2, i32 noundef 3735)
  %236 = load ptr, ptr %24, align 8, !tbaa !5
  call void @roaring_bitmap_free(ptr noundef %236)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %237 = call ptr @roaring_bitmap_from_range(i64 noundef 0, i64 noundef 1, i32 noundef 1)
  store ptr %237, ptr %25, align 8, !tbaa !5
  %238 = load ptr, ptr %25, align 8, !tbaa !5
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %238, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %239 = load ptr, ptr %25, align 8, !tbaa !5
  %240 = call ptr @roaring_bitmap_copy(ptr noundef %239)
  store ptr %240, ptr %26, align 8, !tbaa !5
  %241 = load ptr, ptr %25, align 8, !tbaa !5
  call void @roaring_bitmap_add_range(ptr noundef %241, i64 noundef 0, i64 noundef 1)
  %242 = load ptr, ptr %25, align 8, !tbaa !5
  %243 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %242)
  %244 = icmp eq i64 %243, 1
  br i1 %244, label %245, label %246

245:                                              ; preds = %228
  br label %247

246:                                              ; preds = %228
  call void @__assert_fail(ptr noundef @.str.160, ptr noundef @.str.2, i32 noundef 3745, ptr noundef @__PRETTY_FUNCTION__.test_add_range) #6
  unreachable

247:                                              ; preds = %245
  %248 = load ptr, ptr %26, align 8, !tbaa !5
  %249 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %248)
  %250 = icmp eq i64 %249, 1
  br i1 %250, label %251, label %252

251:                                              ; preds = %247
  br label %253

252:                                              ; preds = %247
  call void @__assert_fail(ptr noundef @.str.161, ptr noundef @.str.2, i32 noundef 3746, ptr noundef @__PRETTY_FUNCTION__.test_add_range) #6
  unreachable

253:                                              ; preds = %251
  %254 = load ptr, ptr %26, align 8, !tbaa !5
  call void @roaring_bitmap_free(ptr noundef %254)
  %255 = load ptr, ptr %25, align 8, !tbaa !5
  call void @roaring_bitmap_free(ptr noundef %255)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @our_rand() #2

attributes #0 = { 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 = { inlinehint 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 = { noreturn nounwind "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 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 }
attributes #6 = { noreturn 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/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 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !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"

@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [40 x i8], align 1
@__PRETTY_FUNCTION__.test_add_range = external hidden unnamed_addr constant [22 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [40 x i8], align 1

declare ptr @roaring_bitmap_from_range(i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

declare void @roaring_bitmap_free(ptr noundef) local_unnamed_addr #0

declare ptr @roaring_bitmap_create() local_unnamed_addr #0

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

declare i64 @roaring_bitmap_get_cardinality(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare void @roaring_bitmap_set_copy_on_write(ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare ptr @roaring_bitmap_copy(ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @sbs_create() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_free(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_convert(ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_add_value(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_add_range(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare void @roaring_bitmap_add_range(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @sbs_check_type(ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @sbs_compare(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @test_add_range() local_unnamed_addr #3 {
  %1 = tail call ptr @sbs_create()
  tail call void @sbs_add_value(ptr noundef %1, i32 noundef 100)
  tail call void @sbs_convert(ptr noundef %1, i8 noundef zeroext 1)
  tail call void @sbs_add_range(ptr noundef %1, i64 noundef 0, i64 noundef 299)
  %2 = tail call zeroext i1 @sbs_check_type(ptr noundef %1, i8 noundef zeroext 1)
  %3 = zext i1 %2 to i64
  tail call void @_assert_true(i64 noundef %3, ptr noundef nonnull @.str.157, ptr noundef nonnull @.str.2, i32 noundef 3601) #4
  tail call void @sbs_add_range(ptr noundef %1, i64 noundef 301, i64 noundef 65535)
  %4 = tail call zeroext i1 @sbs_check_type(ptr noundef %1, i8 noundef zeroext 1)
  %5 = zext i1 %4 to i64
  tail call void @_assert_true(i64 noundef %5, ptr noundef nonnull @.str.157, ptr noundef nonnull @.str.2, i32 noundef 3603) #4
  tail call void @sbs_add_range(ptr noundef %1, i64 noundef 300, i64 noundef 300)
  %6 = tail call zeroext i1 @sbs_check_type(ptr noundef %1, i8 noundef zeroext 3)
  %7 = zext i1 %6 to i64
  tail call void @_assert_true(i64 noundef %7, ptr noundef nonnull @.str.158, ptr noundef nonnull @.str.2, i32 noundef 3606) #4
  tail call void @sbs_compare(ptr noundef %1)
  tail call void @sbs_free(ptr noundef %1)
  %8 = tail call ptr @sbs_create()
  tail call void @sbs_add_value(ptr noundef %8, i32 noundef 100)
  tail call void @sbs_convert(ptr noundef %8, i8 noundef zeroext 2)
  br label %9

9:                                                ; preds = %0, %9
  %.0109 = phi i32 [ 0, %0 ], [ %12, %9 ]
  tail call void @sbs_add_value(ptr noundef %8, i32 noundef %.0109)
  %10 = tail call zeroext i1 @sbs_check_type(ptr noundef %8, i8 noundef zeroext 2)
  %11 = zext i1 %10 to i64
  tail call void @_assert_true(i64 noundef %11, ptr noundef nonnull @.str.159, ptr noundef nonnull @.str.2, i32 noundef 3620) #4
  %12 = add nuw nsw i32 %.0109, 2
  %13 = icmp ult i32 %.0109, 98
  br i1 %13, label %9, label %.preheader108, !llvm.loop !5

14:                                               ; preds = %.preheader108
  %15 = tail call zeroext i1 @sbs_check_type(ptr noundef %8, i8 noundef zeroext 1)
  %16 = zext i1 %15 to i64
  tail call void @_assert_true(i64 noundef %16, ptr noundef nonnull @.str.157, ptr noundef nonnull @.str.2, i32 noundef 3627) #4
  tail call void @sbs_compare(ptr noundef %8)
  tail call void @sbs_free(ptr noundef %8)
  %17 = tail call ptr @sbs_create()
  tail call void @sbs_add_range(ptr noundef %17, i64 noundef 0, i64 noundef 100)
  tail call void @sbs_convert(ptr noundef %17, i8 noundef zeroext 2)
  tail call void @sbs_add_range(ptr noundef %17, i64 noundef 100, i64 noundef 65535)
  %18 = tail call zeroext i1 @sbs_check_type(ptr noundef %17, i8 noundef zeroext 3)
  %19 = zext i1 %18 to i64
  tail call void @_assert_true(i64 noundef %19, ptr noundef nonnull @.str.158, ptr noundef nonnull @.str.2, i32 noundef 3641) #4
  tail call void @sbs_compare(ptr noundef %17)
  tail call void @sbs_free(ptr noundef %17)
  %20 = tail call ptr @sbs_create()
  br label %23

.preheader108:                                    ; preds = %9, %.preheader108
  %.098110 = phi i32 [ %21, %.preheader108 ], [ 0, %9 ]
  tail call void @sbs_add_value(ptr noundef %8, i32 noundef %.098110)
  %21 = add nuw nsw i32 %.098110, 2
  %22 = icmp ult i32 %.098110, 65533
  br i1 %22, label %.preheader108, label %14, !llvm.loop !7

23:                                               ; preds = %14, %23
  %indvars.iv = phi i64 [ 0, %14 ], [ %indvars.iv.next, %23 ]
  %24 = shl nuw nsw i64 %indvars.iv, 2
  %25 = or disjoint i64 %24, 1
  tail call void @sbs_add_range(ptr noundef %20, i64 noundef %24, i64 noundef %25)
  %26 = tail call zeroext i1 @sbs_check_type(ptr noundef %20, i8 noundef zeroext 3)
  %27 = zext i1 %26 to i64
  tail call void @_assert_true(i64 noundef %27, ptr noundef nonnull @.str.158, ptr noundef nonnull @.str.2, i32 noundef 3652) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %28 = icmp ult i64 %indvars.iv, 98
  br i1 %28, label %23, label %.preheader107, !llvm.loop !8

29:                                               ; preds = %.preheader107
  %30 = tail call zeroext i1 @sbs_check_type(ptr noundef %20, i8 noundef zeroext 1)
  %31 = zext i1 %30 to i64
  tail call void @_assert_true(i64 noundef %31, ptr noundef nonnull @.str.157, ptr noundef nonnull @.str.2, i32 noundef 3658) #4
  tail call void @sbs_compare(ptr noundef %20)
  tail call void @sbs_free(ptr noundef %20)
  %32 = tail call ptr @sbs_create()
  br label %34

.preheader107:                                    ; preds = %23, %.preheader107
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %.preheader107 ], [ 0, %23 ]
  tail call void @sbs_add_range(ptr noundef %20, i64 noundef %indvars.iv119, i64 noundef %indvars.iv119)
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 2
  %33 = icmp ult i64 %indvars.iv119, 65533
  br i1 %33, label %.preheader107, label %29, !llvm.loop !9

34:                                               ; preds = %29, %34
  %indvars.iv122 = phi i64 [ 0, %29 ], [ %indvars.iv.next123, %34 ]
  tail call void @sbs_add_range(ptr noundef %32, i64 noundef %indvars.iv122, i64 noundef %indvars.iv122)
  %35 = tail call zeroext i1 @sbs_check_type(ptr noundef %32, i8 noundef zeroext 2)
  %36 = zext i1 %35 to i64
  tail call void @_assert_true(i64 noundef %36, ptr noundef nonnull @.str.159, ptr noundef nonnull @.str.2, i32 noundef 3668) #4
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 2
  %37 = icmp ult i64 %indvars.iv122, 98
  br i1 %37, label %34, label %.preheader106, !llvm.loop !10

38:                                               ; preds = %.preheader106
  %39 = tail call zeroext i1 @sbs_check_type(ptr noundef %32, i8 noundef zeroext 1)
  %40 = zext i1 %39 to i64
  tail call void @_assert_true(i64 noundef %40, ptr noundef nonnull @.str.157, ptr noundef nonnull @.str.2, i32 noundef 3674) #4
  tail call void @sbs_compare(ptr noundef %32)
  tail call void @sbs_free(ptr noundef %32)
  %41 = tail call ptr @sbs_create()
  tail call void @sbs_add_value(ptr noundef %41, i32 noundef 5)
  tail call void @sbs_add_range(ptr noundef %41, i64 noundef 65541, i64 noundef 65556)
  tail call void @sbs_compare(ptr noundef %41)
  tail call void @sbs_free(ptr noundef %41)
  %42 = tail call ptr @sbs_create()
  tail call void @sbs_add_value(ptr noundef %42, i32 noundef 65541)
  tail call void @sbs_add_range(ptr noundef %42, i64 noundef 5, i64 noundef 20)
  tail call void @sbs_compare(ptr noundef %42)
  tail call void @sbs_free(ptr noundef %42)
  %43 = tail call ptr @sbs_create()
  tail call void @sbs_add_value(ptr noundef %43, i32 noundef 5)
  tail call void @sbs_add_value(ptr noundef %43, i32 noundef 131077)
  tail call void @sbs_add_range(ptr noundef %43, i64 noundef 65541, i64 noundef 65556)
  tail call void @sbs_compare(ptr noundef %43)
  tail call void @sbs_free(ptr noundef %43)
  %44 = tail call ptr @sbs_create()
  tail call void @sbs_add_range(ptr noundef %44, i64 noundef 200, i64 noundef 100)
  tail call void @sbs_compare(ptr noundef %44)
  tail call void @sbs_free(ptr noundef %44)
  %45 = tail call ptr @sbs_create()
  br label %47

.preheader106:                                    ; preds = %34, %.preheader106
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %.preheader106 ], [ 0, %34 ]
  tail call void @sbs_add_range(ptr noundef %32, i64 noundef %indvars.iv125, i64 noundef %indvars.iv125)
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 2
  %46 = icmp ult i64 %indvars.iv125, 65533
  br i1 %46, label %.preheader106, label %38, !llvm.loop !11

47:                                               ; preds = %38, %47
  %.0103115 = phi i32 [ 0, %38 ], [ %50, %47 ]
  %48 = tail call i32 @our_rand()
  %49 = and i32 %48, 1048575
  tail call void @sbs_add_value(ptr noundef %45, i32 noundef %49)
  %50 = add nuw nsw i32 %.0103115, 1
  %exitcond.not = icmp eq i32 %50, 50
  br i1 %exitcond.not, label %.preheader, label %47, !llvm.loop !12

51:                                               ; preds = %.preheader
  tail call void @sbs_compare(ptr noundef %45)
  tail call void @sbs_free(ptr noundef %45)
  %52 = tail call ptr @sbs_create()
  br label %53

53:                                               ; preds = %53, %51
  %.0103115.1 = phi i32 [ 0, %51 ], [ %56, %53 ]
  %54 = tail call i32 @our_rand()
  %55 = and i32 %54, 1048575
  tail call void @sbs_add_value(ptr noundef %52, i32 noundef %55)
  %56 = add nuw nsw i32 %.0103115.1, 1
  %exitcond.1.not = icmp eq i32 %56, 50
  br i1 %exitcond.1.not, label %.preheader.1, label %53, !llvm.loop !12

.preheader.1:                                     ; preds = %53, %.preheader.1
  %.0101116.1 = phi i32 [ %62, %.preheader.1 ], [ 0, %53 ]
  %57 = tail call i32 @our_rand()
  %58 = urem i32 %57, 1048573
  %59 = zext nneg i32 %58 to i64
  %60 = add nuw nsw i32 %58, 2
  %61 = zext nneg i32 %60 to i64
  tail call void @sbs_add_range(ptr noundef %52, i64 noundef %59, i64 noundef %61)
  %62 = add nuw nsw i32 %.0101116.1, 1
  %exitcond128.1.not = icmp eq i32 %62, 50
  br i1 %exitcond128.1.not, label %63, label %.preheader.1, !llvm.loop !13

63:                                               ; preds = %.preheader.1
  tail call void @sbs_compare(ptr noundef %52)
  tail call void @sbs_free(ptr noundef %52)
  %64 = tail call ptr @sbs_create()
  br label %65

65:                                               ; preds = %65, %63
  %.0103115.2 = phi i32 [ 0, %63 ], [ %68, %65 ]
  %66 = tail call i32 @our_rand()
  %67 = and i32 %66, 1048575
  tail call void @sbs_add_value(ptr noundef %64, i32 noundef %67)
  %68 = add nuw nsw i32 %.0103115.2, 1
  %exitcond.2.not = icmp eq i32 %68, 50
  br i1 %exitcond.2.not, label %.preheader.2, label %65, !llvm.loop !12

.preheader.2:                                     ; preds = %65, %.preheader.2
  %.0101116.2 = phi i32 [ %74, %.preheader.2 ], [ 0, %65 ]
  %69 = tail call i32 @our_rand()
  %70 = urem i32 %69, 1048567
  %71 = zext nneg i32 %70 to i64
  %72 = add nuw nsw i32 %70, 8
  %73 = zext nneg i32 %72 to i64
  tail call void @sbs_add_range(ptr noundef %64, i64 noundef %71, i64 noundef %73)
  %74 = add nuw nsw i32 %.0101116.2, 1
  %exitcond128.2.not = icmp eq i32 %74, 50
  br i1 %exitcond128.2.not, label %75, label %.preheader.2, !llvm.loop !13

75:                                               ; preds = %.preheader.2
  tail call void @sbs_compare(ptr noundef %64)
  tail call void @sbs_free(ptr noundef %64)
  %76 = tail call ptr @sbs_create()
  br label %77

77:                                               ; preds = %77, %75
  %.0103115.3 = phi i32 [ 0, %75 ], [ %80, %77 ]
  %78 = tail call i32 @our_rand()
  %79 = and i32 %78, 1048575
  tail call void @sbs_add_value(ptr noundef %76, i32 noundef %79)
  %80 = add nuw nsw i32 %.0103115.3, 1
  %exitcond.3.not = icmp eq i32 %80, 50
  br i1 %exitcond.3.not, label %.preheader.3, label %77, !llvm.loop !12

.preheader.3:                                     ; preds = %77, %.preheader.3
  %.0101116.3 = phi i32 [ %86, %.preheader.3 ], [ 0, %77 ]
  %81 = tail call i32 @our_rand()
  %82 = urem i32 %81, 1048549
  %83 = zext nneg i32 %82 to i64
  %84 = add nuw nsw i32 %82, 26
  %85 = zext nneg i32 %84 to i64
  tail call void @sbs_add_range(ptr noundef %76, i64 noundef %83, i64 noundef %85)
  %86 = add nuw nsw i32 %.0101116.3, 1
  %exitcond128.3.not = icmp eq i32 %86, 50
  br i1 %exitcond128.3.not, label %87, label %.preheader.3, !llvm.loop !13

87:                                               ; preds = %.preheader.3
  tail call void @sbs_compare(ptr noundef %76)
  tail call void @sbs_free(ptr noundef %76)
  %88 = tail call ptr @sbs_create()
  br label %89

89:                                               ; preds = %89, %87
  %.0103115.4 = phi i32 [ 0, %87 ], [ %92, %89 ]
  %90 = tail call i32 @our_rand()
  %91 = and i32 %90, 1048575
  tail call void @sbs_add_value(ptr noundef %88, i32 noundef %91)
  %92 = add nuw nsw i32 %.0103115.4, 1
  %exitcond.4.not = icmp eq i32 %92, 50
  br i1 %exitcond.4.not, label %.preheader.4, label %89, !llvm.loop !12

.preheader.4:                                     ; preds = %89, %.preheader.4
  %.0101116.4 = phi i32 [ %98, %.preheader.4 ], [ 0, %89 ]
  %93 = tail call i32 @our_rand()
  %94 = urem i32 %93, 1048495
  %95 = zext nneg i32 %94 to i64
  %96 = add nuw nsw i32 %94, 80
  %97 = zext nneg i32 %96 to i64
  tail call void @sbs_add_range(ptr noundef %88, i64 noundef %95, i64 noundef %97)
  %98 = add nuw nsw i32 %.0101116.4, 1
  %exitcond128.4.not = icmp eq i32 %98, 50
  br i1 %exitcond128.4.not, label %99, label %.preheader.4, !llvm.loop !13

99:                                               ; preds = %.preheader.4
  tail call void @sbs_compare(ptr noundef %88)
  tail call void @sbs_free(ptr noundef %88)
  %100 = tail call ptr @sbs_create()
  br label %101

101:                                              ; preds = %101, %99
  %.0103115.5 = phi i32 [ 0, %99 ], [ %104, %101 ]
  %102 = tail call i32 @our_rand()
  %103 = and i32 %102, 1048575
  tail call void @sbs_add_value(ptr noundef %100, i32 noundef %103)
  %104 = add nuw nsw i32 %.0103115.5, 1
  %exitcond.5.not = icmp eq i32 %104, 50
  br i1 %exitcond.5.not, label %.preheader.5, label %101, !llvm.loop !12

.preheader.5:                                     ; preds = %101, %.preheader.5
  %.0101116.5 = phi i32 [ %110, %.preheader.5 ], [ 0, %101 ]
  %105 = tail call i32 @our_rand()
  %106 = urem i32 %105, 1048333
  %107 = zext nneg i32 %106 to i64
  %108 = add nuw nsw i32 %106, 242
  %109 = zext nneg i32 %108 to i64
  tail call void @sbs_add_range(ptr noundef %100, i64 noundef %107, i64 noundef %109)
  %110 = add nuw nsw i32 %.0101116.5, 1
  %exitcond128.5.not = icmp eq i32 %110, 50
  br i1 %exitcond128.5.not, label %111, label %.preheader.5, !llvm.loop !13

111:                                              ; preds = %.preheader.5
  tail call void @sbs_compare(ptr noundef %100)
  tail call void @sbs_free(ptr noundef %100)
  %112 = tail call ptr @sbs_create()
  br label %113

113:                                              ; preds = %113, %111
  %.0103115.6 = phi i32 [ 0, %111 ], [ %116, %113 ]
  %114 = tail call i32 @our_rand()
  %115 = and i32 %114, 1048575
  tail call void @sbs_add_value(ptr noundef %112, i32 noundef %115)
  %116 = add nuw nsw i32 %.0103115.6, 1
  %exitcond.6.not = icmp eq i32 %116, 50
  br i1 %exitcond.6.not, label %.preheader.6, label %113, !llvm.loop !12

.preheader.6:                                     ; preds = %113, %.preheader.6
  %.0101116.6 = phi i32 [ %122, %.preheader.6 ], [ 0, %113 ]
  %117 = tail call i32 @our_rand()
  %118 = urem i32 %117, 1047847
  %119 = zext nneg i32 %118 to i64
  %120 = add nuw nsw i32 %118, 728
  %121 = zext nneg i32 %120 to i64
  tail call void @sbs_add_range(ptr noundef %112, i64 noundef %119, i64 noundef %121)
  %122 = add nuw nsw i32 %.0101116.6, 1
  %exitcond128.6.not = icmp eq i32 %122, 50
  br i1 %exitcond128.6.not, label %123, label %.preheader.6, !llvm.loop !13

123:                                              ; preds = %.preheader.6
  tail call void @sbs_compare(ptr noundef %112)
  tail call void @sbs_free(ptr noundef %112)
  %124 = tail call ptr @sbs_create()
  br label %125

125:                                              ; preds = %125, %123
  %.0103115.7 = phi i32 [ 0, %123 ], [ %128, %125 ]
  %126 = tail call i32 @our_rand()
  %127 = and i32 %126, 1048575
  tail call void @sbs_add_value(ptr noundef %124, i32 noundef %127)
  %128 = add nuw nsw i32 %.0103115.7, 1
  %exitcond.7.not = icmp eq i32 %128, 50
  br i1 %exitcond.7.not, label %.preheader.7, label %125, !llvm.loop !12

.preheader.7:                                     ; preds = %125, %.preheader.7
  %.0101116.7 = phi i32 [ %134, %.preheader.7 ], [ 0, %125 ]
  %129 = tail call i32 @our_rand()
  %130 = urem i32 %129, 1046389
  %131 = zext nneg i32 %130 to i64
  %132 = add nuw nsw i32 %130, 2186
  %133 = zext nneg i32 %132 to i64
  tail call void @sbs_add_range(ptr noundef %124, i64 noundef %131, i64 noundef %133)
  %134 = add nuw nsw i32 %.0101116.7, 1
  %exitcond128.7.not = icmp eq i32 %134, 50
  br i1 %exitcond128.7.not, label %135, label %.preheader.7, !llvm.loop !13

135:                                              ; preds = %.preheader.7
  tail call void @sbs_compare(ptr noundef %124)
  tail call void @sbs_free(ptr noundef %124)
  %136 = tail call ptr @sbs_create()
  br label %137

137:                                              ; preds = %137, %135
  %.0103115.8 = phi i32 [ 0, %135 ], [ %140, %137 ]
  %138 = tail call i32 @our_rand()
  %139 = and i32 %138, 1048575
  tail call void @sbs_add_value(ptr noundef %136, i32 noundef %139)
  %140 = add nuw nsw i32 %.0103115.8, 1
  %exitcond.8.not = icmp eq i32 %140, 50
  br i1 %exitcond.8.not, label %.preheader.8, label %137, !llvm.loop !12

.preheader.8:                                     ; preds = %137, %.preheader.8
  %.0101116.8 = phi i32 [ %146, %.preheader.8 ], [ 0, %137 ]
  %141 = tail call i32 @our_rand()
  %142 = urem i32 %141, 1042015
  %143 = zext nneg i32 %142 to i64
  %144 = add nuw nsw i32 %142, 6560
  %145 = zext nneg i32 %144 to i64
  tail call void @sbs_add_range(ptr noundef %136, i64 noundef %143, i64 noundef %145)
  %146 = add nuw nsw i32 %.0101116.8, 1
  %exitcond128.8.not = icmp eq i32 %146, 50
  br i1 %exitcond128.8.not, label %147, label %.preheader.8, !llvm.loop !13

147:                                              ; preds = %.preheader.8
  tail call void @sbs_compare(ptr noundef %136)
  tail call void @sbs_free(ptr noundef %136)
  %148 = tail call ptr @roaring_bitmap_create() #4
  tail call void @roaring_bitmap_add_range(ptr noundef %148, i64 noundef 0, i64 noundef 4294967296)
  %149 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %148) #4
  %150 = icmp eq i64 %149, 4294967296
  %151 = zext i1 %150 to i64
  tail call void @_assert_true(i64 noundef %151, ptr noundef nonnull @.str.78, ptr noundef nonnull @.str.2, i32 noundef 3735) #4
  tail call void @roaring_bitmap_free(ptr noundef %148) #4
  %152 = tail call ptr @roaring_bitmap_from_range(i64 noundef 0, i64 noundef 1, i32 noundef 1) #4
  tail call void @roaring_bitmap_set_copy_on_write(ptr noundef %152, i1 noundef zeroext true)
  %153 = tail call ptr @roaring_bitmap_copy(ptr noundef %152) #4
  tail call void @roaring_bitmap_add_range(ptr noundef %152, i64 noundef 0, i64 noundef 1)
  %154 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %152) #4
  %155 = icmp eq i64 %154, 1
  br i1 %155, label %162, label %161

.preheader:                                       ; preds = %47, %.preheader
  %.0101116 = phi i32 [ %160, %.preheader ], [ 0, %47 ]
  %156 = tail call i32 @our_rand()
  %157 = urem i32 %156, 1048575
  %158 = zext nneg i32 %157 to i64
  %159 = zext nneg i32 %157 to i64
  tail call void @sbs_add_range(ptr noundef %45, i64 noundef %158, i64 noundef %159)
  %160 = add nuw nsw i32 %.0101116, 1
  %exitcond128.not = icmp eq i32 %160, 50
  br i1 %exitcond128.not, label %51, label %.preheader, !llvm.loop !13

161:                                              ; preds = %147
  tail call void @__assert_fail(ptr noundef nonnull @.str.160, ptr noundef nonnull @.str.2, i32 noundef 3745, ptr noundef nonnull @__PRETTY_FUNCTION__.test_add_range) #5
  unreachable

162:                                              ; preds = %147
  %163 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %153) #4
  %164 = icmp eq i64 %163, 1
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  tail call void @__assert_fail(ptr noundef nonnull @.str.161, ptr noundef nonnull @.str.2, i32 noundef 3746, ptr noundef nonnull @__PRETTY_FUNCTION__.test_add_range) #5
  unreachable

166:                                              ; preds = %162
  tail call void @roaring_bitmap_free(ptr noundef %153) #4
  tail call void @roaring_bitmap_free(ptr noundef %152) #4
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @our_rand() local_unnamed_addr #1

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint 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 = { noreturn nounwind "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 = { 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 = { nounwind }
attributes #5 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}


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