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

%struct.roaring_uint32_iterator_s = type { ptr, i32, i32, i32, i32, i8, ptr, i8, i32 }

@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test_example.values = external hidden unnamed_addr constant [3 x i32], align 4
@.str.49 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.test_example = external hidden unnamed_addr constant [25 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @roaring_iterator_sumall(i32 noundef, ptr noundef) #0

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

declare i32 @printf(ptr noundef, ...) #2

declare void @roaring_bitmap_free(ptr noundef) #2

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

declare ptr @roaring_bitmap_create() #2

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

; Function Attrs: inlinehint nounwind uwtable
declare zeroext i1 @roaring_bitmap_contains(ptr noundef, i32 noundef) #3

declare void @roaring_bitmap_or_inplace(ptr noundef, ptr noundef) #2

declare i64 @roaring_bitmap_get_cardinality(ptr noundef) #2

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

declare ptr @roaring_bitmap_copy(ptr noundef) #2

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

declare void @roaring_bitmap_add(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

declare void @roaring_bitmap_to_uint32_array(ptr noundef, ptr noundef) #2

declare void @roaring_bitmap_printf(ptr noundef) #2

declare ptr @roaring_bitmap_or(ptr noundef, ptr noundef) #2

declare ptr @roaring_bitmap_xor(ptr noundef, ptr noundef) #2

declare ptr @roaring_bitmap_and(ptr noundef, ptr noundef) #2

declare zeroext i1 @roaring_bitmap_equals(ptr noundef, ptr noundef) #2

declare ptr @roaring_bitmap_of(i64 noundef, ...) #2

declare zeroext i1 @roaring_advance_uint32_iterator(ptr noundef) #2

declare zeroext i1 @roaring_bitmap_run_optimize(ptr noundef) #2

declare i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef) #2

declare i64 @roaring_bitmap_portable_serialize(ptr noundef, ptr noundef) #2

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

declare ptr @roaring_bitmap_portable_deserialize(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test_example(i1 noundef zeroext %0) #0 {
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [3 x i32], align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [3 x ptr], align 16
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca [3 x ptr], align 16
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca [256 x i32], align 16
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = zext i1 %0 to i8
  store i8 %37, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %38 = call ptr @roaring_bitmap_create()
  store ptr %38, ptr %3, align 8, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !9
  %40 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %41 = trunc i8 %40 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %39, i1 noundef zeroext %41)
  %42 = load ptr, ptr %3, align 8, !tbaa !9
  %43 = ptrtoint ptr %42 to i64
  call void @_assert_true(i64 noundef %43, ptr noundef @.str.23, ptr noundef @.str.2, i32 noundef 456)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 100, ptr %4, align 4, !tbaa !13
  br label %44

44:                                               ; preds = %51, %1
  %45 = load i32, ptr %4, align 4, !tbaa !13
  %46 = icmp ult i32 %45, 1000
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %44
  %49 = load ptr, ptr %3, align 8, !tbaa !9
  %50 = load i32, ptr %4, align 4, !tbaa !13
  call void @roaring_bitmap_add(ptr noundef %49, i32 noundef %50)
  br label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %4, align 4, !tbaa !13
  %53 = add i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !13
  br label %44, !llvm.loop !15

54:                                               ; preds = %47
  %55 = load ptr, ptr %3, align 8, !tbaa !9
  %56 = call zeroext i1 @roaring_bitmap_contains(ptr noundef %55, i32 noundef 500)
  %57 = zext i1 %56 to i64
  call void @_assert_true(i64 noundef %57, ptr noundef @.str.45, ptr noundef @.str.2, i32 noundef 464)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %58 = load ptr, ptr %3, align 8, !tbaa !9
  %59 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %58)
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %5, align 4, !tbaa !13
  %61 = load i32, ptr %5, align 4, !tbaa !13
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.46, i32 noundef %61)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %63 = load ptr, ptr %3, align 8, !tbaa !9
  %64 = call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %63)
  %65 = trunc i64 %64 to i32
  store i32 %65, ptr %6, align 4, !tbaa !13
  %66 = load ptr, ptr %3, align 8, !tbaa !9
  %67 = call zeroext i1 @roaring_bitmap_run_optimize(ptr noundef %66)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %68 = load ptr, ptr %3, align 8, !tbaa !9
  %69 = call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %68)
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %7, align 4, !tbaa !13
  %71 = load i32, ptr %6, align 4, !tbaa !13
  %72 = load i32, ptr %7, align 4, !tbaa !13
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.47, i32 noundef %71, i32 noundef %72)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %74 = call ptr (i64, ...) @roaring_bitmap_of(i64 noundef 5, i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 5, i32 noundef 6)
  store ptr %74, ptr %8, align 8, !tbaa !9
  %75 = load ptr, ptr %8, align 8, !tbaa !9
  %76 = ptrtoint ptr %75 to i64
  call void @_assert_true(i64 noundef %76, ptr noundef @.str.48, ptr noundef @.str.2, i32 noundef 481)
  %77 = load ptr, ptr %8, align 8, !tbaa !9
  call void @roaring_bitmap_printf(ptr noundef %77)
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 @__const.test_example.values, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %78 = getelementptr inbounds [3 x i32], ptr %9, i64 0, i64 0
  %79 = call ptr @roaring_bitmap_of_ptr(i64 noundef 3, ptr noundef %78)
  store ptr %79, ptr %10, align 8, !tbaa !9
  %80 = load ptr, ptr %10, align 8, !tbaa !9
  %81 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %82 = trunc i8 %81 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %80, i1 noundef zeroext %82)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %83 = load ptr, ptr %3, align 8, !tbaa !9
  %84 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %83)
  store i64 %84, ptr %11, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %85 = load i64, ptr %11, align 8, !tbaa !17
  %86 = mul i64 %85, 4
  %87 = call noalias ptr @malloc(i64 noundef %86) #9
  store ptr %87, ptr %12, align 8, !tbaa !9
  %88 = load ptr, ptr %12, align 8, !tbaa !9
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %91

90:                                               ; preds = %54
  br label %92

91:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.49, ptr noundef @.str.2, i32 noundef 493, ptr noundef @__PRETTY_FUNCTION__.test_example) #10
  unreachable

92:                                               ; preds = %90
  %93 = load ptr, ptr %3, align 8, !tbaa !9
  %94 = load ptr, ptr %12, align 8, !tbaa !9
  call void @roaring_bitmap_to_uint32_array(ptr noundef %93, ptr noundef %94)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 100, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 1000, ptr %14, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %95 = load i64, ptr %14, align 8, !tbaa !17
  %96 = mul i64 %95, 4
  %97 = call noalias ptr @malloc(i64 noundef %96) #9
  store ptr %97, ptr %15, align 8, !tbaa !9
  %98 = load ptr, ptr %15, align 8, !tbaa !9
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %101

100:                                              ; preds = %92
  br label %102

101:                                              ; preds = %92
  call void @__assert_fail(ptr noundef @.str.50, ptr noundef @.str.2, i32 noundef 500, ptr noundef @__PRETTY_FUNCTION__.test_example) #10
  unreachable

102:                                              ; preds = %100
  %103 = load ptr, ptr %3, align 8, !tbaa !9
  %104 = load i64, ptr %13, align 8, !tbaa !17
  %105 = load i64, ptr %14, align 8, !tbaa !17
  %106 = load ptr, ptr %15, align 8, !tbaa !9
  %107 = call zeroext i1 @roaring_bitmap_range_uint32_array(ptr noundef %103, i64 noundef %104, i64 noundef %105, ptr noundef %106)
  %108 = load ptr, ptr %15, align 8, !tbaa !9
  call void @free(ptr noundef %108) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %109 = load i64, ptr %11, align 8, !tbaa !17
  %110 = load ptr, ptr %12, align 8, !tbaa !9
  %111 = call ptr @roaring_bitmap_of_ptr(i64 noundef %109, ptr noundef %110)
  store ptr %111, ptr %16, align 8, !tbaa !9
  %112 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %112) #8
  %113 = load ptr, ptr %16, align 8, !tbaa !9
  %114 = ptrtoint ptr %113 to i64
  call void @_assert_true(i64 noundef %114, ptr noundef @.str.51, ptr noundef @.str.2, i32 noundef 507)
  %115 = load ptr, ptr %3, align 8, !tbaa !9
  %116 = load ptr, ptr %16, align 8, !tbaa !9
  %117 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %115, ptr noundef %116)
  %118 = zext i1 %117 to i64
  call void @_assert_true(i64 noundef %118, ptr noundef @.str.52, ptr noundef @.str.2, i32 noundef 510)
  %119 = load ptr, ptr %16, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %119)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %120 = load ptr, ptr %10, align 8, !tbaa !9
  %121 = call ptr @roaring_bitmap_copy(ptr noundef %120)
  store ptr %121, ptr %17, align 8, !tbaa !9
  %122 = load ptr, ptr %17, align 8, !tbaa !9
  %123 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %124 = trunc i8 %123 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %122, i1 noundef zeroext %124)
  %125 = load ptr, ptr %10, align 8, !tbaa !9
  %126 = load ptr, ptr %17, align 8, !tbaa !9
  %127 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %125, ptr noundef %126)
  %128 = zext i1 %127 to i64
  call void @_assert_true(i64 noundef %128, ptr noundef @.str.53, ptr noundef @.str.2, i32 noundef 516)
  %129 = load ptr, ptr %17, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %129)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %130 = load ptr, ptr %3, align 8, !tbaa !9
  %131 = load ptr, ptr %8, align 8, !tbaa !9
  %132 = call ptr @roaring_bitmap_or(ptr noundef %130, ptr noundef %131)
  store ptr %132, ptr %18, align 8, !tbaa !9
  %133 = load ptr, ptr %18, align 8, !tbaa !9
  %134 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %133)
  %135 = load ptr, ptr %3, align 8, !tbaa !9
  %136 = load ptr, ptr %8, align 8, !tbaa !9
  %137 = call i64 @roaring_bitmap_or_cardinality(ptr noundef %135, ptr noundef %136)
  %138 = icmp eq i64 %134, %137
  %139 = zext i1 %138 to i32
  %140 = sext i32 %139 to i64
  call void @_assert_true(i64 noundef %140, ptr noundef @.str.54, ptr noundef @.str.2, i32 noundef 523)
  %141 = load ptr, ptr %18, align 8, !tbaa !9
  %142 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %143 = trunc i8 %142 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %141, i1 noundef zeroext %143)
  %144 = load ptr, ptr %18, align 8, !tbaa !9
  %145 = load ptr, ptr %10, align 8, !tbaa !9
  call void @roaring_bitmap_or_inplace(ptr noundef %144, ptr noundef %145)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  %146 = load ptr, ptr %3, align 8, !tbaa !9
  store ptr %146, ptr %19, align 8, !tbaa !9
  %147 = getelementptr inbounds ptr, ptr %19, i64 1
  %148 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %148, ptr %147, align 8, !tbaa !9
  %149 = getelementptr inbounds ptr, ptr %19, i64 2
  %150 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %150, ptr %149, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %151 = getelementptr inbounds [3 x ptr], ptr %19, i64 0, i64 0
  %152 = call ptr @roaring_bitmap_or_many(i64 noundef 3, ptr noundef %151)
  store ptr %152, ptr %20, align 8, !tbaa !9
  %153 = load ptr, ptr %18, align 8, !tbaa !9
  %154 = load ptr, ptr %20, align 8, !tbaa !9
  %155 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %153, ptr noundef %154)
  %156 = zext i1 %155 to i64
  call void @_assert_true(i64 noundef %156, ptr noundef @.str.55, ptr noundef @.str.2, i32 noundef 531)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %157 = getelementptr inbounds [3 x ptr], ptr %19, i64 0, i64 0
  %158 = call ptr @roaring_bitmap_or_many_heap(i32 noundef 3, ptr noundef %157)
  store ptr %158, ptr %21, align 8, !tbaa !9
  %159 = load ptr, ptr %18, align 8, !tbaa !9
  %160 = load ptr, ptr %21, align 8, !tbaa !9
  %161 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %159, ptr noundef %160)
  %162 = zext i1 %161 to i64
  call void @_assert_true(i64 noundef %162, ptr noundef @.str.56, ptr noundef @.str.2, i32 noundef 534)
  %163 = load ptr, ptr %18, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %163)
  %164 = load ptr, ptr %20, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %164)
  %165 = load ptr, ptr %21, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %165)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %166 = load ptr, ptr %3, align 8, !tbaa !9
  %167 = load ptr, ptr %8, align 8, !tbaa !9
  %168 = call ptr @roaring_bitmap_xor(ptr noundef %166, ptr noundef %167)
  store ptr %168, ptr %22, align 8, !tbaa !9
  %169 = load ptr, ptr %22, align 8, !tbaa !9
  %170 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %171 = trunc i8 %170 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %169, i1 noundef zeroext %171)
  %172 = load ptr, ptr %22, align 8, !tbaa !9
  %173 = load ptr, ptr %10, align 8, !tbaa !9
  call void @roaring_bitmap_xor_inplace(ptr noundef %172, ptr noundef %173)
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  %174 = load ptr, ptr %3, align 8, !tbaa !9
  store ptr %174, ptr %23, align 8, !tbaa !9
  %175 = getelementptr inbounds ptr, ptr %23, i64 1
  %176 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %176, ptr %175, align 8, !tbaa !9
  %177 = getelementptr inbounds ptr, ptr %23, i64 2
  %178 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %178, ptr %177, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %179 = getelementptr inbounds [3 x ptr], ptr %23, i64 0, i64 0
  %180 = call ptr @roaring_bitmap_xor_many(i64 noundef 3, ptr noundef %179)
  store ptr %180, ptr %24, align 8, !tbaa !9
  %181 = load ptr, ptr %22, align 8, !tbaa !9
  %182 = load ptr, ptr %24, align 8, !tbaa !9
  %183 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %181, ptr noundef %182)
  %184 = zext i1 %183 to i64
  call void @_assert_true(i64 noundef %184, ptr noundef @.str.57, ptr noundef @.str.2, i32 noundef 547)
  %185 = load ptr, ptr %22, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %185)
  %186 = load ptr, ptr %24, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %186)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %187 = load ptr, ptr %3, align 8, !tbaa !9
  %188 = load ptr, ptr %8, align 8, !tbaa !9
  %189 = call ptr @roaring_bitmap_and(ptr noundef %187, ptr noundef %188)
  store ptr %189, ptr %25, align 8, !tbaa !9
  %190 = load ptr, ptr %25, align 8, !tbaa !9
  %191 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %190)
  %192 = load ptr, ptr %3, align 8, !tbaa !9
  %193 = load ptr, ptr %8, align 8, !tbaa !9
  %194 = call i64 @roaring_bitmap_and_cardinality(ptr noundef %192, ptr noundef %193)
  %195 = icmp eq i64 %191, %194
  %196 = zext i1 %195 to i32
  %197 = sext i32 %196 to i64
  call void @_assert_true(i64 noundef %197, ptr noundef @.str.58, ptr noundef @.str.2, i32 noundef 555)
  %198 = load ptr, ptr %25, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %198)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %199 = load ptr, ptr %3, align 8, !tbaa !9
  %200 = call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %199)
  %201 = trunc i64 %200 to i32
  store i32 %201, ptr %26, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %202 = load i32, ptr %26, align 4, !tbaa !13
  %203 = zext i32 %202 to i64
  %204 = call noalias ptr @malloc(i64 noundef %203) #9
  store ptr %204, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %205 = load ptr, ptr %3, align 8, !tbaa !9
  %206 = load ptr, ptr %27, align 8, !tbaa !9
  %207 = call i64 @roaring_bitmap_portable_serialize(ptr noundef %205, ptr noundef %206)
  store i64 %207, ptr %28, align 8, !tbaa !17
  %208 = load i64, ptr %28, align 8, !tbaa !17
  %209 = load i32, ptr %26, align 4, !tbaa !13
  %210 = zext i32 %209 to i64
  call void @_assert_int_equal(i64 noundef %208, i64 noundef %210, ptr noundef @.str.2, i32 noundef 563)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %211 = load ptr, ptr %27, align 8, !tbaa !9
  %212 = call ptr @roaring_bitmap_portable_deserialize(ptr noundef %211)
  store ptr %212, ptr %29, align 8, !tbaa !9
  %213 = load ptr, ptr %3, align 8, !tbaa !9
  %214 = load ptr, ptr %29, align 8, !tbaa !9
  %215 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %213, ptr noundef %214)
  %216 = zext i1 %215 to i64
  call void @_assert_true(i64 noundef %216, ptr noundef @.str.44, ptr noundef @.str.2, i32 noundef 565)
  %217 = load ptr, ptr %29, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %217)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %218 = load ptr, ptr %27, align 8, !tbaa !9
  %219 = load i32, ptr %26, align 4, !tbaa !13
  %220 = zext i32 %219 to i64
  %221 = call i64 @roaring_bitmap_portable_deserialize_size(ptr noundef %218, i64 noundef %220)
  store i64 %221, ptr %30, align 8, !tbaa !17
  %222 = load i64, ptr %30, align 8, !tbaa !17
  %223 = load i32, ptr %26, align 4, !tbaa !13
  %224 = zext i32 %223 to i64
  %225 = icmp eq i64 %222, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %102
  br label %228

227:                                              ; preds = %102
  call void @__assert_fail(ptr noundef @.str.59, ptr noundef @.str.2, i32 noundef 569, ptr noundef @__PRETTY_FUNCTION__.test_example) #10
  unreachable

228:                                              ; preds = %226
  %229 = load ptr, ptr %27, align 8, !tbaa !9
  %230 = load i32, ptr %26, align 4, !tbaa !13
  %231 = zext i32 %230 to i64
  %232 = call ptr @roaring_bitmap_portable_deserialize_safe(ptr noundef %229, i64 noundef %231)
  store ptr %232, ptr %29, align 8, !tbaa !9
  %233 = load ptr, ptr %3, align 8, !tbaa !9
  %234 = load ptr, ptr %29, align 8, !tbaa !9
  %235 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %233, ptr noundef %234)
  br i1 %235, label %236, label %237

236:                                              ; preds = %228
  br label %238

237:                                              ; preds = %228
  call void @__assert_fail(ptr noundef @.str.44, ptr noundef @.str.2, i32 noundef 572, ptr noundef @__PRETTY_FUNCTION__.test_example) #10
  unreachable

238:                                              ; preds = %236
  %239 = load ptr, ptr %29, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %239)
  %240 = load ptr, ptr %27, align 8, !tbaa !9
  call void @free(ptr noundef %240) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !13
  %241 = load ptr, ptr %3, align 8, !tbaa !9
  %242 = call zeroext i1 @roaring_iterate(ptr noundef %241, ptr noundef @roaring_iterator_sumall, ptr noundef %31)
  store i32 0, ptr %31, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %243 = load ptr, ptr %3, align 8, !tbaa !9
  %244 = call ptr @roaring_create_iterator(ptr noundef %243)
  store ptr %244, ptr %32, align 8, !tbaa !9
  br label %245

245:                                              ; preds = %250, %238
  %246 = load ptr, ptr %32, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.roaring_uint32_iterator_s, ptr %246, i32 0, i32 5
  %248 = load i8, ptr %247, align 8, !tbaa !19, !range !11, !noundef !12
  %249 = trunc i8 %248 to i1
  br i1 %249, label %250, label %255

250:                                              ; preds = %245
  %251 = load i32, ptr %31, align 4, !tbaa !13
  %252 = add i32 %251, 1
  store i32 %252, ptr %31, align 4, !tbaa !13
  %253 = load ptr, ptr %32, align 8, !tbaa !9
  %254 = call zeroext i1 @roaring_advance_uint32_iterator(ptr noundef %253)
  br label %245, !llvm.loop !21

255:                                              ; preds = %245
  %256 = load ptr, ptr %32, align 8, !tbaa !9
  call void @roaring_free_uint32_iterator(ptr noundef %256)
  %257 = load ptr, ptr %3, align 8, !tbaa !9
  %258 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %257)
  %259 = load i32, ptr %31, align 4, !tbaa !13
  %260 = zext i32 %259 to i64
  %261 = icmp eq i64 %258, %260
  %262 = zext i1 %261 to i32
  %263 = sext i32 %262 to i64
  call void @_assert_true(i64 noundef %263, ptr noundef @.str.60, ptr noundef @.str.2, i32 noundef 596)
  %264 = load ptr, ptr %3, align 8, !tbaa !9
  %265 = call ptr @roaring_create_iterator(ptr noundef %264)
  store ptr %265, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %33) #8
  br label %266

266:                                              ; preds = %293, %255
  br label %267

267:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %268 = load ptr, ptr %32, align 8, !tbaa !9
  %269 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 0
  %270 = call i32 @roaring_read_uint32_iterator(ptr noundef %268, ptr noundef %269, i32 noundef 256)
  store i32 %270, ptr %34, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !13
  br label %271

271:                                              ; preds = %283, %267
  %272 = load i32, ptr %35, align 4, !tbaa !13
  %273 = load i32, ptr %34, align 4, !tbaa !13
  %274 = icmp ult i32 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %286

276:                                              ; preds = %271
  %277 = load i32, ptr %35, align 4, !tbaa !13
  %278 = zext i32 %277 to i64
  %279 = getelementptr inbounds [256 x i32], ptr %33, i64 0, i64 %278
  %280 = load i32, ptr %279, align 4, !tbaa !13
  %281 = load i32, ptr %31, align 4, !tbaa !13
  %282 = add i32 %281, %280
  store i32 %282, ptr %31, align 4, !tbaa !13
  br label %283

283:                                              ; preds = %276
  %284 = load i32, ptr %35, align 4, !tbaa !13
  %285 = add i32 %284, 1
  store i32 %285, ptr %35, align 4, !tbaa !13
  br label %271, !llvm.loop !22

286:                                              ; preds = %275
  %287 = load i32, ptr %34, align 4, !tbaa !13
  %288 = icmp ult i32 %287, 256
  br i1 %288, label %289, label %290

289:                                              ; preds = %286
  store i32 8, ptr %36, align 4
  br label %291

290:                                              ; preds = %286
  store i32 0, ptr %36, align 4
  br label %291

291:                                              ; preds = %290, %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  %292 = load i32, ptr %36, align 4
  switch i32 %292, label %299 [
    i32 0, label %293
    i32 8, label %294
  ]

293:                                              ; preds = %291
  br label %266

294:                                              ; preds = %291
  %295 = load ptr, ptr %32, align 8, !tbaa !9
  call void @roaring_free_uint32_iterator(ptr noundef %295)
  %296 = load ptr, ptr %3, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %296)
  %297 = load ptr, ptr %8, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %297)
  %298 = load ptr, ptr %10, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %298)
  call void @llvm.lifetime.end.p0(i64 1024, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void

299:                                              ; preds = %291
  unreachable
}

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

declare ptr @roaring_bitmap_of_ptr(i64 noundef, ptr noundef) #2

declare zeroext i1 @roaring_bitmap_range_uint32_array(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i64 @roaring_bitmap_or_cardinality(ptr noundef, ptr noundef) #2

declare ptr @roaring_bitmap_or_many(i64 noundef, ptr noundef) #2

declare ptr @roaring_bitmap_or_many_heap(i32 noundef, ptr noundef) #2

declare void @roaring_bitmap_xor_inplace(ptr noundef, ptr noundef) #2

declare ptr @roaring_bitmap_xor_many(i64 noundef, ptr noundef) #2

declare i64 @roaring_bitmap_and_cardinality(ptr noundef, ptr noundef) #2

declare i64 @roaring_bitmap_portable_deserialize_size(ptr noundef, i64 noundef) #2

declare ptr @roaring_bitmap_portable_deserialize_safe(ptr noundef, i64 noundef) #2

declare zeroext i1 @roaring_iterate(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @roaring_create_iterator(ptr noundef) #2

declare void @roaring_free_uint32_iterator(ptr noundef) #2

declare i32 @roaring_read_uint32_iterator(ptr noundef, ptr noundef, i32 noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { 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 #5 = { nounwind allocsize(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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { 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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !6, i64 24}
!20 = !{!"roaring_uint32_iterator_s", !10, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !6, i64 24, !10, i64 32, !7, i64 40, !14, i64 44}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


; 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.23 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@__const.test_example.values = external hidden unnamed_addr constant [3 x i32], align 4
@.str.49 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.test_example = external hidden unnamed_addr constant [25 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @roaring_iterator_sumall(i32 noundef, ptr noundef) #0

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare void @roaring_bitmap_free(ptr noundef) local_unnamed_addr #3

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

declare ptr @roaring_bitmap_create() local_unnamed_addr #3

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

; Function Attrs: inlinehint nounwind uwtable
declare zeroext i1 @roaring_bitmap_contains(ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @roaring_bitmap_or_inplace(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_get_cardinality(ptr noundef) local_unnamed_addr #3

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

declare ptr @roaring_bitmap_copy(ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

declare void @roaring_bitmap_to_uint32_array(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @roaring_bitmap_printf(ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_or(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_xor(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_and(ptr noundef, ptr noundef) local_unnamed_addr #3

declare zeroext i1 @roaring_bitmap_equals(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_of(i64 noundef, ...) local_unnamed_addr #3

declare zeroext i1 @roaring_advance_uint32_iterator(ptr noundef) local_unnamed_addr #3

declare zeroext i1 @roaring_bitmap_run_optimize(ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_portable_serialize(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare ptr @roaring_bitmap_portable_deserialize(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @test_example(i1 noundef zeroext %0) local_unnamed_addr #0 {
  %2 = alloca [3 x i32], align 4
  %3 = alloca [3 x ptr], align 16
  %4 = alloca [3 x ptr], align 16
  %5 = alloca i32, align 4
  %6 = alloca [256 x i32], align 16
  %7 = tail call ptr @roaring_bitmap_create() #10
  tail call void @roaring_bitmap_set_copy_on_write(ptr noundef %7, i1 noundef zeroext %0)
  %8 = ptrtoint ptr %7 to i64
  tail call void @_assert_true(i64 noundef %8, ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.2, i32 noundef 456) #10
  br label %27

9:                                                ; preds = %27
  %10 = tail call zeroext i1 @roaring_bitmap_contains(ptr noundef %7, i32 noundef 500)
  %11 = zext i1 %10 to i64
  tail call void @_assert_true(i64 noundef %11, ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.2, i32 noundef 464) #10
  %12 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %7) #10
  %13 = trunc i64 %12 to i32
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46, i32 noundef %13)
  %15 = tail call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %7) #10
  %16 = trunc i64 %15 to i32
  %17 = tail call zeroext i1 @roaring_bitmap_run_optimize(ptr noundef %7) #10
  %18 = tail call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %7) #10
  %19 = trunc i64 %18 to i32
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47, i32 noundef %16, i32 noundef %19)
  %21 = tail call ptr (i64, ...) @roaring_bitmap_of(i64 noundef 5, i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 5, i32 noundef 6) #10
  %22 = ptrtoint ptr %21 to i64
  tail call void @_assert_true(i64 noundef %22, ptr noundef nonnull @.str.48, ptr noundef nonnull @.str.2, i32 noundef 481) #10
  tail call void @roaring_bitmap_printf(ptr noundef %21) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) @__const.test_example.values, i64 12, i1 false)
  %23 = call ptr @roaring_bitmap_of_ptr(i64 noundef 3, ptr noundef nonnull %2) #10
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %23, i1 noundef zeroext %0)
  %24 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %7) #10
  %25 = shl i64 %24, 2
  %26 = call noalias ptr @malloc(i64 noundef %25) #11
  %.not = icmp eq ptr %26, null
  br i1 %.not, label %29, label %30

27:                                               ; preds = %1, %27
  %.0120126 = phi i32 [ 100, %1 ], [ %28, %27 ]
  tail call void @roaring_bitmap_add(ptr noundef %7, i32 noundef %.0120126) #10
  %28 = add nuw nsw i32 %.0120126, 1
  %exitcond.not = icmp eq i32 %28, 1000
  br i1 %exitcond.not, label %9, label %27, !llvm.loop !5

29:                                               ; preds = %9
  call void @__assert_fail(ptr noundef nonnull @.str.49, ptr noundef nonnull @.str.2, i32 noundef 493, ptr noundef nonnull @__PRETTY_FUNCTION__.test_example) #12
  unreachable

30:                                               ; preds = %9
  call void @roaring_bitmap_to_uint32_array(ptr noundef %7, ptr noundef nonnull %26) #10
  %31 = call noalias dereferenceable_or_null(4000) ptr @malloc(i64 noundef 4000) #11
  %.not125 = icmp eq ptr %31, null
  br i1 %.not125, label %32, label %33

32:                                               ; preds = %30
  call void @__assert_fail(ptr noundef nonnull @.str.50, ptr noundef nonnull @.str.2, i32 noundef 500, ptr noundef nonnull @__PRETTY_FUNCTION__.test_example) #12
  unreachable

33:                                               ; preds = %30
  %34 = call zeroext i1 @roaring_bitmap_range_uint32_array(ptr noundef %7, i64 noundef 100, i64 noundef 1000, ptr noundef nonnull %31) #10
  call void @free(ptr noundef nonnull %31) #10
  %35 = call ptr @roaring_bitmap_of_ptr(i64 noundef %24, ptr noundef nonnull %26) #10
  call void @free(ptr noundef nonnull %26) #10
  %36 = ptrtoint ptr %35 to i64
  call void @_assert_true(i64 noundef %36, ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.2, i32 noundef 507) #10
  %37 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %7, ptr noundef %35) #10
  %38 = zext i1 %37 to i64
  call void @_assert_true(i64 noundef %38, ptr noundef nonnull @.str.52, ptr noundef nonnull @.str.2, i32 noundef 510) #10
  call void @roaring_bitmap_free(ptr noundef %35) #10
  %39 = call ptr @roaring_bitmap_copy(ptr noundef %23) #10
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %39, i1 noundef zeroext %0)
  %40 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %23, ptr noundef %39) #10
  %41 = zext i1 %40 to i64
  call void @_assert_true(i64 noundef %41, ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.2, i32 noundef 516) #10
  call void @roaring_bitmap_free(ptr noundef %39) #10
  %42 = call ptr @roaring_bitmap_or(ptr noundef %7, ptr noundef %21) #10
  %43 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %42) #10
  %44 = call i64 @roaring_bitmap_or_cardinality(ptr noundef %7, ptr noundef %21) #10
  %45 = icmp eq i64 %43, %44
  %46 = zext i1 %45 to i64
  call void @_assert_true(i64 noundef %46, ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.2, i32 noundef 523) #10
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %42, i1 noundef zeroext %0)
  call void @roaring_bitmap_or_inplace(ptr noundef %42, ptr noundef %23) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #10
  store ptr %7, ptr %3, align 16, !tbaa !7
  %47 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %21, ptr %47, align 8, !tbaa !7
  %48 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %23, ptr %48, align 16, !tbaa !7
  %49 = call ptr @roaring_bitmap_or_many(i64 noundef 3, ptr noundef nonnull %3) #10
  %50 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %42, ptr noundef %49) #10
  %51 = zext i1 %50 to i64
  call void @_assert_true(i64 noundef %51, ptr noundef nonnull @.str.55, ptr noundef nonnull @.str.2, i32 noundef 531) #10
  %52 = call ptr @roaring_bitmap_or_many_heap(i32 noundef 3, ptr noundef nonnull %3) #10
  %53 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %42, ptr noundef %52) #10
  %54 = zext i1 %53 to i64
  call void @_assert_true(i64 noundef %54, ptr noundef nonnull @.str.56, ptr noundef nonnull @.str.2, i32 noundef 534) #10
  call void @roaring_bitmap_free(ptr noundef %42) #10
  call void @roaring_bitmap_free(ptr noundef %49) #10
  call void @roaring_bitmap_free(ptr noundef %52) #10
  %55 = call ptr @roaring_bitmap_xor(ptr noundef %7, ptr noundef %21) #10
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %55, i1 noundef zeroext %0)
  call void @roaring_bitmap_xor_inplace(ptr noundef %55, ptr noundef %23) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #10
  store ptr %7, ptr %4, align 16, !tbaa !7
  %56 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %21, ptr %56, align 8, !tbaa !7
  %57 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %23, ptr %57, align 16, !tbaa !7
  %58 = call ptr @roaring_bitmap_xor_many(i64 noundef 3, ptr noundef nonnull %4) #10
  %59 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %55, ptr noundef %58) #10
  %60 = zext i1 %59 to i64
  call void @_assert_true(i64 noundef %60, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.2, i32 noundef 547) #10
  call void @roaring_bitmap_free(ptr noundef %55) #10
  call void @roaring_bitmap_free(ptr noundef %58) #10
  %61 = call ptr @roaring_bitmap_and(ptr noundef %7, ptr noundef %21) #10
  %62 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %61) #10
  %63 = call i64 @roaring_bitmap_and_cardinality(ptr noundef %7, ptr noundef %21) #10
  %64 = icmp eq i64 %62, %63
  %65 = zext i1 %64 to i64
  call void @_assert_true(i64 noundef %65, ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.2, i32 noundef 555) #10
  call void @roaring_bitmap_free(ptr noundef %61) #10
  %66 = call i64 @roaring_bitmap_portable_size_in_bytes(ptr noundef %7) #10
  %67 = and i64 %66, 4294967295
  %68 = call noalias ptr @malloc(i64 noundef %67) #11
  %69 = call i64 @roaring_bitmap_portable_serialize(ptr noundef %7, ptr noundef %68) #10
  call void @_assert_int_equal(i64 noundef %69, i64 noundef %67, ptr noundef nonnull @.str.2, i32 noundef 563) #10
  %70 = call ptr @roaring_bitmap_portable_deserialize(ptr noundef %68) #10
  %71 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %7, ptr noundef %70) #10
  %72 = zext i1 %71 to i64
  call void @_assert_true(i64 noundef %72, ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.2, i32 noundef 565) #10
  call void @roaring_bitmap_free(ptr noundef %70) #10
  %73 = call i64 @roaring_bitmap_portable_deserialize_size(ptr noundef %68, i64 noundef %67) #10
  %74 = icmp eq i64 %73, %67
  br i1 %74, label %76, label %75

75:                                               ; preds = %33
  call void @__assert_fail(ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.2, i32 noundef 569, ptr noundef nonnull @__PRETTY_FUNCTION__.test_example) #12
  unreachable

76:                                               ; preds = %33
  %77 = call ptr @roaring_bitmap_portable_deserialize_safe(ptr noundef %68, i64 noundef %67) #10
  %78 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %7, ptr noundef %77) #10
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  call void @__assert_fail(ptr noundef nonnull @.str.44, ptr noundef nonnull @.str.2, i32 noundef 572, ptr noundef nonnull @__PRETTY_FUNCTION__.test_example) #12
  unreachable

80:                                               ; preds = %76
  call void @roaring_bitmap_free(ptr noundef %77) #10
  call void @free(ptr noundef %68) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  store i32 0, ptr %5, align 4, !tbaa !11
  %81 = call zeroext i1 @roaring_iterate(ptr noundef %7, ptr noundef nonnull @roaring_iterator_sumall, ptr noundef nonnull %5) #10
  store i32 0, ptr %5, align 4, !tbaa !11
  %82 = call ptr @roaring_create_iterator(ptr noundef %7) #10
  %83 = getelementptr inbounds i8, ptr %82, i64 24
  %84 = load i8, ptr %83, align 8, !tbaa !13, !range !16, !noundef !17
  %85 = trunc nuw i8 %84 to i1
  br i1 %85, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %80, %.lr.ph
  %86 = load i32, ptr %5, align 4, !tbaa !11
  %87 = add i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !11
  %88 = call zeroext i1 @roaring_advance_uint32_iterator(ptr noundef nonnull %82) #10
  %89 = load i8, ptr %83, align 8, !tbaa !13, !range !16, !noundef !17
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %80
  call void @roaring_free_uint32_iterator(ptr noundef nonnull %82) #10
  %91 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %7) #10
  %92 = load i32, ptr %5, align 4, !tbaa !11
  %93 = zext i32 %92 to i64
  %94 = icmp eq i64 %91, %93
  %95 = zext i1 %94 to i64
  call void @_assert_true(i64 noundef %95, ptr noundef nonnull @.str.60, ptr noundef nonnull @.str.2, i32 noundef 596) #10
  %96 = call ptr @roaring_create_iterator(ptr noundef %7) #10
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %6) #10
  br label %97

97:                                               ; preds = %.loopexit, %._crit_edge
  %98 = call i32 @roaring_read_uint32_iterator(ptr noundef %96, ptr noundef nonnull %6, i32 noundef 256) #10
  %.not131 = icmp eq i32 %98, 0
  br i1 %.not131, label %.thread, label %.lr.ph129.preheader

.lr.ph129.preheader:                              ; preds = %97
  %.promoted = load i32, ptr %5, align 4, !tbaa !11
  %wide.trip.count = zext i32 %98 to i64
  %min.iters.check = icmp ult i32 %98, 8
  br i1 %min.iters.check, label %.lr.ph129.preheader136, label %vector.ph

.lr.ph129.preheader136:                           ; preds = %middle.block, %.lr.ph129.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph129.preheader ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %.promoted, %.lr.ph129.preheader ], [ %105, %middle.block ]
  br label %.lr.ph129

vector.ph:                                        ; preds = %.lr.ph129.preheader
  %n.vec = and i64 %wide.trip.count, 4294967288
  %99 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.promoted, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %99, %vector.ph ], [ %102, %vector.body ]
  %vec.phi134 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %103, %vector.body ]
  %100 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %index
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %wide.load = load <4 x i32>, ptr %100, align 16, !tbaa !11
  %wide.load135 = load <4 x i32>, ptr %101, align 16, !tbaa !11
  %102 = add <4 x i32> %vec.phi, %wide.load
  %103 = add <4 x i32> %vec.phi134, %wide.load135
  %index.next = add nuw i64 %index, 8
  %104 = icmp eq i64 %index.next, %n.vec
  br i1 %104, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %103, %102
  %105 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %.lr.ph129.preheader136

.loopexit:                                        ; preds = %.lr.ph129, %middle.block
  %.lcssa = phi i32 [ %105, %middle.block ], [ %110, %.lr.ph129 ]
  store i32 %.lcssa, ptr %5, align 4, !tbaa !11
  %106 = icmp ult i32 %98, 256
  br i1 %106, label %.thread, label %97

.lr.ph129:                                        ; preds = %.lr.ph129.preheader136, %.lr.ph129
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph129 ], [ %indvars.iv.ph, %.lr.ph129.preheader136 ]
  %107 = phi i32 [ %110, %.lr.ph129 ], [ %.ph, %.lr.ph129.preheader136 ]
  %108 = getelementptr inbounds [256 x i32], ptr %6, i64 0, i64 %indvars.iv
  %109 = load i32, ptr %108, align 4, !tbaa !11
  %110 = add i32 %107, %109
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond133.not, label %.loopexit, label %.lr.ph129, !llvm.loop !22

.thread:                                          ; preds = %97, %.loopexit
  call void @roaring_free_uint32_iterator(ptr noundef %96) #10
  call void @roaring_bitmap_free(ptr noundef %7) #10
  call void @roaring_bitmap_free(ptr noundef %21) #10
  call void @roaring_bitmap_free(ptr noundef %23) #10
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #10
  ret void
}

; Function Attrs: mustprogress 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) #8

declare ptr @roaring_bitmap_of_ptr(i64 noundef, ptr noundef) local_unnamed_addr #3

declare zeroext i1 @roaring_bitmap_range_uint32_array(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_or_cardinality(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_or_many(i64 noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_or_many_heap(i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @roaring_bitmap_xor_inplace(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_xor_many(i64 noundef, ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_and_cardinality(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i64 @roaring_bitmap_portable_deserialize_size(ptr noundef, i64 noundef) local_unnamed_addr #3

declare ptr @roaring_bitmap_portable_deserialize_safe(ptr noundef, i64 noundef) local_unnamed_addr #3

declare zeroext i1 @roaring_iterate(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @roaring_create_iterator(ptr noundef) local_unnamed_addr #3

declare void @roaring_free_uint32_iterator(ptr noundef) local_unnamed_addr #3

declare i32 @roaring_read_uint32_iterator(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #9

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 = { "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 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 = { 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 #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { 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 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !15, i64 24}
!14 = !{!"roaring_uint32_iterator_s", !8, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !15, i64 24, !8, i64 32, !9, i64 40, !12, i64 44}
!15 = !{!"_Bool", !9, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !6, !21, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass