; LLVM IR from jermp/2i_bench :: external/CRoaring/benchmarks (adversarialunions_benchmark)

; 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.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1

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

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

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

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

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

declare void @roaring_bitmap_remove(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind
declare i32 @rand() #3

declare zeroext i1 @roaring_bitmap_run_optimize(ptr noundef) #1

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

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

declare ptr @roaring_bitmap_copy(ptr noundef) #1

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

declare void @roaring_bitmap_free(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @notsofull() #4 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 100, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 1000000, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = mul i64 8, %27
  %29 = call noalias ptr @malloc(i64 noundef %28) #6
  store ptr %29, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %65, %0
  %31 = load i64, ptr %6, align 8, !tbaa !5
  %32 = load i64, ptr %3, align 8, !tbaa !5
  %33 = icmp ult i64 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %68

35:                                               ; preds = %30
  %36 = call ptr @roaring_bitmap_from_range(i64 noundef 0, i64 noundef 1000000, i32 noundef 100)
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = load i64, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds ptr, ptr %37, i64 %38
  store ptr %36, ptr %39, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %56, %35
  %41 = load i64, ptr %8, align 8, !tbaa !5
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = udiv i64 %42, 20
  %44 = icmp ult i64 %41, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %59

46:                                               ; preds = %40
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = load i64, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds ptr, ptr %47, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = call i32 @rand() #5
  %52 = sext i32 %51 to i64
  %53 = load i64, ptr %4, align 8, !tbaa !5
  %54 = urem i64 %52, %53
  %55 = trunc i64 %54 to i32
  call void @roaring_bitmap_remove(ptr noundef %50, i32 noundef %55)
  br label %56

56:                                               ; preds = %46
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = add i64 %57, 1
  store i64 %58, ptr %8, align 8, !tbaa !5
  br label %40, !llvm.loop !11

59:                                               ; preds = %45
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = load i64, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = call zeroext i1 @roaring_bitmap_run_optimize(ptr noundef %63)
  br label %65

65:                                               ; preds = %59
  %66 = load i64, ptr %6, align 8, !tbaa !5
  %67 = add i64 %66, 1
  store i64 %67, ptr %6, align 8, !tbaa !5
  br label %30, !llvm.loop !13

68:                                               ; preds = %34
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %70 = call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !14
  %71 = extractvalue { i32, i32 } %70, 0
  %72 = extractvalue { i32, i32 } %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !15
  store i32 %72, ptr %10, align 4, !tbaa !15
  %73 = load i32, ptr %9, align 4, !tbaa !15
  %74 = zext i32 %73 to i64
  %75 = shl i64 %74, 32
  %76 = load i32, ptr %10, align 4, !tbaa !15
  %77 = zext i32 %76 to i64
  %78 = or i64 %75, %77
  store i64 %78, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %79

79:                                               ; preds = %69
  br label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %81 = load i64, ptr %3, align 8, !tbaa !5
  %82 = trunc i64 %81 to i32
  %83 = load ptr, ptr %5, align 8, !tbaa !9
  %84 = call ptr @roaring_bitmap_or_many_heap(i32 noundef %82, ptr noundef %83)
  store ptr %84, ptr %11, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %86 = call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !17
  %87 = extractvalue { i32, i32 } %86, 0
  %88 = extractvalue { i32, i32 } %86, 1
  store i32 %87, ptr %12, align 4, !tbaa !15
  store i32 %88, ptr %13, align 4, !tbaa !15
  %89 = load i32, ptr %12, align 4, !tbaa !15
  %90 = zext i32 %89 to i64
  %91 = shl i64 %90, 32
  %92 = load i32, ptr %13, align 4, !tbaa !15
  %93 = zext i32 %92 to i64
  %94 = or i64 %91, %93
  store i64 %94, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %95

95:                                               ; preds = %85
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %2, align 8, !tbaa !5
  %98 = load i64, ptr %1, align 8, !tbaa !5
  %99 = sub i64 %97, %98
  %100 = uitofp i64 %99 to double
  %101 = fmul double %100, 1.000000e+00
  %102 = load i64, ptr %3, align 8, !tbaa !5
  %103 = uitofp i64 %102 to double
  %104 = fdiv double %101, %103
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %104)
  br label %106

106:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %107 = call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !18
  %108 = extractvalue { i32, i32 } %107, 0
  %109 = extractvalue { i32, i32 } %107, 1
  store i32 %108, ptr %14, align 4, !tbaa !15
  store i32 %109, ptr %15, align 4, !tbaa !15
  %110 = load i32, ptr %14, align 4, !tbaa !15
  %111 = zext i32 %110 to i64
  %112 = shl i64 %111, 32
  %113 = load i32, ptr %15, align 4, !tbaa !15
  %114 = zext i32 %113 to i64
  %115 = or i64 %112, %114
  store i64 %115, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %116

116:                                              ; preds = %106
  br label %117

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %118 = load i64, ptr %3, align 8, !tbaa !5
  %119 = load ptr, ptr %5, align 8, !tbaa !9
  %120 = call ptr @roaring_bitmap_or_many(i64 noundef %118, ptr noundef %119)
  store ptr %120, ptr %16, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %122 = call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !19
  %123 = extractvalue { i32, i32 } %122, 0
  %124 = extractvalue { i32, i32 } %122, 1
  store i32 %123, ptr %17, align 4, !tbaa !15
  store i32 %124, ptr %18, align 4, !tbaa !15
  %125 = load i32, ptr %17, align 4, !tbaa !15
  %126 = zext i32 %125 to i64
  %127 = shl i64 %126, 32
  %128 = load i32, ptr %18, align 4, !tbaa !15
  %129 = zext i32 %128 to i64
  %130 = or i64 %127, %129
  store i64 %130, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %131

131:                                              ; preds = %121
  br label %132

132:                                              ; preds = %131
  %133 = load i64, ptr %2, align 8, !tbaa !5
  %134 = load i64, ptr %1, align 8, !tbaa !5
  %135 = sub i64 %133, %134
  %136 = uitofp i64 %135 to double
  %137 = fmul double %136, 1.000000e+00
  %138 = load i64, ptr %3, align 8, !tbaa !5
  %139 = uitofp i64 %138 to double
  %140 = fdiv double %137, %139
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %140)
  br label %142

142:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %143 = call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !20
  %144 = extractvalue { i32, i32 } %143, 0
  %145 = extractvalue { i32, i32 } %143, 1
  store i32 %144, ptr %19, align 4, !tbaa !15
  store i32 %145, ptr %20, align 4, !tbaa !15
  %146 = load i32, ptr %19, align 4, !tbaa !15
  %147 = zext i32 %146 to i64
  %148 = shl i64 %147, 32
  %149 = load i32, ptr %20, align 4, !tbaa !15
  %150 = zext i32 %149 to i64
  %151 = or i64 %148, %150
  store i64 %151, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %152

152:                                              ; preds = %142
  br label %153

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %154 = load ptr, ptr %5, align 8, !tbaa !9
  %155 = getelementptr inbounds ptr, ptr %154, i64 0
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = call ptr @roaring_bitmap_copy(ptr noundef %156)
  store ptr %157, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 1, ptr %22, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %169, %153
  %159 = load i64, ptr %22, align 8, !tbaa !5
  %160 = load i64, ptr %3, align 8, !tbaa !5
  %161 = icmp ult i64 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 18, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %172

163:                                              ; preds = %158
  %164 = load ptr, ptr %21, align 8, !tbaa !9
  %165 = load ptr, ptr %5, align 8, !tbaa !9
  %166 = load i64, ptr %22, align 8, !tbaa !5
  %167 = getelementptr inbounds ptr, ptr %165, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  call void @roaring_bitmap_or_inplace(ptr noundef %164, ptr noundef %168)
  br label %169

169:                                              ; preds = %163
  %170 = load i64, ptr %22, align 8, !tbaa !5
  %171 = add i64 %170, 1
  store i64 %171, ptr %22, align 8, !tbaa !5
  br label %158, !llvm.loop !21

172:                                              ; preds = %162
  br label %173

173:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %174 = call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !22
  %175 = extractvalue { i32, i32 } %174, 0
  %176 = extractvalue { i32, i32 } %174, 1
  store i32 %175, ptr %23, align 4, !tbaa !15
  store i32 %176, ptr %24, align 4, !tbaa !15
  %177 = load i32, ptr %23, align 4, !tbaa !15
  %178 = zext i32 %177 to i64
  %179 = shl i64 %178, 32
  %180 = load i32, ptr %24, align 4, !tbaa !15
  %181 = zext i32 %180 to i64
  %182 = or i64 %179, %181
  store i64 %182, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %183

183:                                              ; preds = %173
  br label %184

184:                                              ; preds = %183
  %185 = load i64, ptr %2, align 8, !tbaa !5
  %186 = load i64, ptr %1, align 8, !tbaa !5
  %187 = sub i64 %185, %186
  %188 = uitofp i64 %187 to double
  %189 = fmul double %188, 1.000000e+00
  %190 = load i64, ptr %3, align 8, !tbaa !5
  %191 = uitofp i64 %190 to double
  %192 = fdiv double %189, %191
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %192)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %204, %184
  %195 = load i64, ptr %25, align 8, !tbaa !5
  %196 = load i64, ptr %3, align 8, !tbaa !5
  %197 = icmp ult i64 %195, %196
  br i1 %197, label %199, label %198

198:                                              ; preds = %194
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %207

199:                                              ; preds = %194
  %200 = load ptr, ptr %5, align 8, !tbaa !9
  %201 = load i64, ptr %25, align 8, !tbaa !5
  %202 = getelementptr inbounds ptr, ptr %200, i64 %201
  %203 = load ptr, ptr %202, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %203)
  br label %204

204:                                              ; preds = %199
  %205 = load i64, ptr %25, align 8, !tbaa !5
  %206 = add i64 %205, 1
  store i64 %206, ptr %25, align 8, !tbaa !5
  br label %194, !llvm.loop !23

207:                                              ; preds = %198
  %208 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %208) #5
  %209 = load ptr, ptr %11, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %209)
  %210 = load ptr, ptr %16, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %210)
  %211 = load ptr, ptr %21, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %211)
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret i32 0
}

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 = { 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 #3 = { 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 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{i64 2151965499, i64 2151965507, i64 2151965587, i64 2151965675, i64 2151965755}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{i64 2151966244, i64 2151966253, i64 2151966340, i64 2151966420, i64 2151966492}
!18 = !{i64 2151966989, i64 2151966997, i64 2151967077, i64 2151967165, i64 2151967245}
!19 = !{i64 2151967734, i64 2151967743, i64 2151967830, i64 2151967910, i64 2151967982}
!20 = !{i64 2151968479, i64 2151968487, i64 2151968567, i64 2151968655, i64 2151968735}
!21 = distinct !{!21, !12}
!22 = !{i64 2151969224, i64 2151969233, i64 2151969320, i64 2151969400, i64 2151969472}
!23 = distinct !{!23, !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.1 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1

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

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

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

declare void @roaring_bitmap_remove(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

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

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

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

declare ptr @roaring_bitmap_copy(ptr noundef) local_unnamed_addr #2

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

declare void @roaring_bitmap_free(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @notsofull() local_unnamed_addr #5 {
  %1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %2 = tail call noalias dereferenceable_or_null(800) ptr @malloc(i64 noundef 800) #6
  br label %40

3:                                                ; preds = %43
  %4 = tail call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !5
  %5 = extractvalue { i32, i32 } %4, 0
  %6 = extractvalue { i32, i32 } %4, 1
  %.neg70 = sub i32 0, %5
  %.neg70.z = zext i32 %.neg70 to i64
  %.neg69 = shl nuw i64 %.neg70.z, 32
  %7 = zext i32 %6 to i64
  %8 = tail call ptr @roaring_bitmap_or_many_heap(i32 noundef 100, ptr noundef %2) #7
  %9 = tail call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !6
  %10 = extractvalue { i32, i32 } %9, 0
  %11 = extractvalue { i32, i32 } %9, 1
  %12 = zext i32 %10 to i64
  %13 = shl nuw i64 %12, 32
  %14 = zext i32 %11 to i64
  %.neg58 = sub i64 %.neg69, %7
  %15 = add i64 %.neg58, %14
  %16 = add i64 %15, %13
  %17 = uitofp i64 %16 to double
  %18 = fdiv double %17, 1.000000e+02
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %18)
  %20 = tail call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !7
  %21 = extractvalue { i32, i32 } %20, 0
  %22 = extractvalue { i32, i32 } %20, 1
  %.neg71 = sub i32 0, %21
  %.neg71.z = zext i32 %.neg71 to i64
  %.neg = shl nuw i64 %.neg71.z, 32
  %23 = zext i32 %22 to i64
  %24 = tail call ptr @roaring_bitmap_or_many(i64 noundef 100, ptr noundef %2) #7
  %25 = tail call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !8
  %26 = extractvalue { i32, i32 } %25, 0
  %27 = extractvalue { i32, i32 } %25, 1
  %28 = zext i32 %26 to i64
  %29 = shl nuw i64 %28, 32
  %30 = zext i32 %27 to i64
  %.neg61 = sub i64 %.neg, %23
  %31 = add i64 %.neg61, %30
  %32 = add i64 %31, %29
  %33 = uitofp i64 %32 to double
  %34 = fdiv double %33, 1.000000e+02
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %34)
  %36 = tail call { i32, i32 } asm sideeffect "cpuid\0A\09rdtsc\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !9
  %37 = extractvalue { i32, i32 } %36, 0
  %.neg73 = sub i32 0, %37
  %.neg73.z = zext i32 %.neg73 to i64
  %.neg72 = shl nuw i64 %.neg73.z, 32
  %38 = load ptr, ptr %2, align 8, !tbaa !10
  %39 = tail call ptr @roaring_bitmap_copy(ptr noundef %38) #7
  br label %66

40:                                               ; preds = %0, %43
  %.05566 = phi i64 [ 0, %0 ], [ %45, %43 ]
  %41 = tail call ptr @roaring_bitmap_from_range(i64 noundef 0, i64 noundef 1000000, i32 noundef 100) #7
  %42 = getelementptr inbounds ptr, ptr %2, i64 %.05566
  store ptr %41, ptr %42, align 8, !tbaa !10
  br label %46

43:                                               ; preds = %46
  %44 = tail call zeroext i1 @roaring_bitmap_run_optimize(ptr noundef %41) #7
  %45 = add nuw nsw i64 %.05566, 1
  %exitcond74.not = icmp eq i64 %45, 100
  br i1 %exitcond74.not, label %3, label %40, !llvm.loop !14

46:                                               ; preds = %40, %46
  %.05665 = phi i64 [ 0, %40 ], [ %51, %46 ]
  %47 = tail call i32 @rand() #7
  %48 = sext i32 %47 to i64
  %49 = urem i64 %48, 1000000
  %50 = trunc nuw nsw i64 %49 to i32
  tail call void @roaring_bitmap_remove(ptr noundef %41, i32 noundef %50) #7
  %51 = add nuw nsw i64 %.05665, 1
  %exitcond.not = icmp eq i64 %51, 50000
  br i1 %exitcond.not, label %43, label %46, !llvm.loop !16

52:                                               ; preds = %66
  %53 = extractvalue { i32, i32 } %36, 1
  %54 = zext i32 %53 to i64
  %55 = tail call { i32, i32 } asm sideeffect "rdtscp\0A\09mov %edx, $0\0A\09mov %eax, $1\0A\09cpuid\0A\09", "=r,=r,~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !17
  %56 = extractvalue { i32, i32 } %55, 0
  %57 = extractvalue { i32, i32 } %55, 1
  %58 = zext i32 %56 to i64
  %59 = shl nuw i64 %58, 32
  %60 = zext i32 %57 to i64
  %.neg64 = sub i64 %.neg72, %54
  %61 = add i64 %.neg64, %60
  %62 = add i64 %61, %59
  %63 = uitofp i64 %62 to double
  %64 = fdiv double %63, 1.000000e+02
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %64)
  br label %71

66:                                               ; preds = %3, %66
  %.05467 = phi i64 [ 1, %3 ], [ %69, %66 ]
  %67 = getelementptr inbounds ptr, ptr %2, i64 %.05467
  %68 = load ptr, ptr %67, align 8, !tbaa !10
  tail call void @roaring_bitmap_or_inplace(ptr noundef %39, ptr noundef %68) #7
  %69 = add nuw nsw i64 %.05467, 1
  %exitcond75.not = icmp eq i64 %69, 100
  br i1 %exitcond75.not, label %52, label %66, !llvm.loop !18

70:                                               ; preds = %71
  tail call void @free(ptr noundef nonnull %2) #7
  tail call void @roaring_bitmap_free(ptr noundef %8) #7
  tail call void @roaring_bitmap_free(ptr noundef %24) #7
  tail call void @roaring_bitmap_free(ptr noundef %39) #7
  ret i32 0

71:                                               ; preds = %52, %71
  %.068 = phi i64 [ 0, %52 ], [ %74, %71 ]
  %72 = getelementptr inbounds ptr, ptr %2, i64 %.068
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  tail call void @roaring_bitmap_free(ptr noundef %73) #7
  %74 = add nuw nsw i64 %.068, 1
  %exitcond76.not = icmp eq i64 %74, 100
  br i1 %exitcond76.not, label %70, label %71, !llvm.loop !19
}

attributes #0 = { 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 #1 = { 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 #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 = { 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 = { 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 #5 = { 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 #6 = { nounwind allocsize(0) }
attributes #7 = { 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 = !{i64 2151965499, i64 2151965507, i64 2151965587, i64 2151965675, i64 2151965755}
!6 = !{i64 2151966244, i64 2151966253, i64 2151966340, i64 2151966420, i64 2151966492}
!7 = !{i64 2151966989, i64 2151966997, i64 2151967077, i64 2151967165, i64 2151967245}
!8 = !{i64 2151967734, i64 2151967743, i64 2151967830, i64 2151967910, i64 2151967982}
!9 = !{i64 2151968479, i64 2151968487, i64 2151968567, i64 2151968655, i64 2151968735}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C/C++ TBAA"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{i64 2151969224, i64 2151969233, i64 2151969320, i64 2151969400, i64 2151969472}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass