; 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.96 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [50 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 i32 @printf(ptr 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @gen_bitmap(double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden ptr @synthesized_xor(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @show_difference(ptr noundef, ptr noundef) #3

declare void @roaring_bitmap_repair_after_lazy(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_xor_lazy_inplace(i1 noundef zeroext %0) #3 {
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [10 x ptr], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = zext i1 %0 to i8
  store i8 %17, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %18 = call ptr @roaring_bitmap_create()
  store ptr %18, ptr %3, align 8, !tbaa !9
  %19 = load ptr, ptr %3, align 8, !tbaa !9
  %20 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %21 = trunc i8 %20 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %19, i1 noundef zeroext %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %22 = call ptr @roaring_bitmap_create()
  store ptr %22, ptr %4, align 8, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  %24 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %23, i1 noundef zeroext %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !13
  br label %26

26:                                               ; preds = %45, %1
  %27 = load i32, ptr %5, align 4, !tbaa !13
  %28 = icmp ult i32 %27, 300
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %48

30:                                               ; preds = %26
  %31 = load i32, ptr %5, align 4, !tbaa !13
  %32 = urem i32 %31, 2
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %30
  %35 = load ptr, ptr %3, align 8, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !13
  call void @roaring_bitmap_add(ptr noundef %35, i32 noundef %36)
  br label %37

37:                                               ; preds = %34, %30
  %38 = load i32, ptr %5, align 4, !tbaa !13
  %39 = urem i32 %38, 3
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %44

41:                                               ; preds = %37
  %42 = load ptr, ptr %4, align 8, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !13
  call void @roaring_bitmap_add(ptr noundef %42, i32 noundef %43)
  br label %44

44:                                               ; preds = %41, %37
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %5, align 4, !tbaa !13
  %47 = add i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !13
  br label %26, !llvm.loop !15

48:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %49 = load ptr, ptr %3, align 8, !tbaa !9
  %50 = call ptr @roaring_bitmap_copy(ptr noundef %49)
  store ptr %50, ptr %6, align 8, !tbaa !9
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  %52 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %53 = trunc i8 %52 to i1
  call void @roaring_bitmap_set_copy_on_write(ptr noundef %51, i1 noundef zeroext %53)
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !9
  call void @roaring_bitmap_lazy_xor_inplace(ptr noundef %54, ptr noundef %55)
  %56 = load ptr, ptr %6, align 8, !tbaa !9
  call void @roaring_bitmap_repair_after_lazy(ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %57

57:                                               ; preds = %92, %48
  %58 = load i32, ptr %8, align 4, !tbaa !13
  %59 = icmp slt i32 %58, 300
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %95

61:                                               ; preds = %57
  %62 = load i32, ptr %8, align 4, !tbaa !13
  %63 = srem i32 %62, 2
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %69, label %65

65:                                               ; preds = %61
  %66 = load i32, ptr %8, align 4, !tbaa !13
  %67 = srem i32 %66, 3
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %83

69:                                               ; preds = %65, %61
  %70 = load i32, ptr %8, align 4, !tbaa !13
  %71 = srem i32 %70, 6
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %83

73:                                               ; preds = %69
  %74 = load i32, ptr %7, align 4, !tbaa !13
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !13
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !13
  %78 = call zeroext i1 @roaring_bitmap_contains(ptr noundef %76, i32 noundef %77)
  br i1 %78, label %82, label %79

79:                                               ; preds = %73
  %80 = load i32, ptr %8, align 4, !tbaa !13
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.96, i32 noundef %80)
  br label %82

82:                                               ; preds = %79, %73
  br label %91

83:                                               ; preds = %69, %65
  %84 = load ptr, ptr %6, align 8, !tbaa !9
  %85 = load i32, ptr %8, align 4, !tbaa !13
  %86 = call zeroext i1 @roaring_bitmap_contains(ptr noundef %84, i32 noundef %85)
  br i1 %86, label %87, label %90

87:                                               ; preds = %83
  %88 = load i32, ptr %8, align 4, !tbaa !13
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.97, i32 noundef %88)
  br label %90

90:                                               ; preds = %87, %83
  br label %91

91:                                               ; preds = %90, %82
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %8, align 4, !tbaa !13
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !13
  br label %57, !llvm.loop !17

95:                                               ; preds = %60
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %96)
  %98 = load i32, ptr %7, align 4, !tbaa !13
  %99 = sext i32 %98 to i64
  call void @_assert_int_equal(i64 noundef %97, i64 noundef %99, ptr noundef @.str.2, i32 noundef 1808)
  %100 = load ptr, ptr %6, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %100)
  %101 = load ptr, ptr %4, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %101)
  %102 = load ptr, ptr %3, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %102)
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #4
  %103 = call ptr @gen_bitmap(double noundef 0.000000e+00, double noundef 0x3EB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %103, ptr %9, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %9, i64 1
  %105 = call ptr @gen_bitmap(double noundef 1.000000e+00, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %105, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds ptr, ptr %9, i64 2
  %107 = call ptr @gen_bitmap(double noundef 1.000000e-05, double noundef 0.000000e+00, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %107, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %9, i64 3
  %109 = call ptr @gen_bitmap(double noundef 1.000000e-05, double noundef 0.000000e+00, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %109, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds ptr, ptr %9, i64 4
  %111 = call ptr @gen_bitmap(double noundef 1.000000e-01, double noundef 0.000000e+00, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %111, ptr %110, align 8, !tbaa !9
  %112 = getelementptr inbounds ptr, ptr %9, i64 5
  %113 = call ptr @gen_bitmap(double noundef 1.000000e-03, double noundef 0x3E7AD7F29ABCAF48, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %113, ptr %112, align 8, !tbaa !9
  %114 = getelementptr inbounds ptr, ptr %9, i64 6
  %115 = call ptr @gen_bitmap(double noundef 0.000000e+00, double noundef 1.000000e-10, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %115, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %9, i64 7
  %117 = call ptr @gen_bitmap(double noundef 5.000000e-01, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 600000, i32 noundef 800000, i32 noundef 1000000)
  store ptr %117, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %9, i64 8
  %119 = call ptr @gen_bitmap(double noundef 1.000000e+00, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 300000, i32 noundef 500000, i32 noundef 1000000)
  store ptr %119, ptr %118, align 8, !tbaa !9
  %120 = getelementptr inbounds ptr, ptr %9, i64 9
  store ptr null, ptr %120, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %121

121:                                              ; preds = %187, %95
  %122 = load i32, ptr %10, align 4, !tbaa !13
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = icmp ne ptr %125, null
  br i1 %126, label %128, label %127

127:                                              ; preds = %121
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %190

128:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %129 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %129, ptr %12, align 4, !tbaa !13
  br label %130

130:                                              ; preds = %183, %128
  %131 = load i32, ptr %12, align 4, !tbaa !13
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  %135 = icmp ne ptr %134, null
  br i1 %135, label %137, label %136

136:                                              ; preds = %130
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %186

137:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %138 = load i32, ptr %10, align 4, !tbaa !13
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = load i32, ptr %12, align 4, !tbaa !13
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = call ptr @synthesized_xor(ptr noundef %141, ptr noundef %145)
  store ptr %146, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %147 = load i32, ptr %10, align 4, !tbaa !13
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = call ptr @roaring_bitmap_copy(ptr noundef %150)
  store ptr %151, ptr %14, align 8, !tbaa !9
  %152 = load ptr, ptr %14, align 8, !tbaa !9
  %153 = load i32, ptr %12, align 4, !tbaa !13
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  call void @roaring_bitmap_lazy_xor_inplace(ptr noundef %152, ptr noundef %156)
  %157 = load ptr, ptr %14, align 8, !tbaa !9
  call void @roaring_bitmap_repair_after_lazy(ptr noundef %157)
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %158 = load ptr, ptr %13, align 8, !tbaa !9
  %159 = load ptr, ptr %14, align 8, !tbaa !9
  %160 = call zeroext i1 @roaring_bitmap_equals(ptr noundef %158, ptr noundef %159)
  %161 = zext i1 %160 to i8
  store i8 %161, ptr %15, align 1, !tbaa !5
  %162 = load i8, ptr %15, align 1, !tbaa !5, !range !11, !noundef !12
  %163 = trunc i8 %162 to i1
  br i1 %163, label %177, label %164

164:                                              ; preds = %137
  %165 = load i32, ptr %10, align 4, !tbaa !13
  %166 = load i32, ptr %12, align 4, !tbaa !13
  %167 = call i32 (ptr, ...) @printf(ptr noundef @.str.100, i32 noundef %165, i32 noundef %166)
  %168 = load ptr, ptr %14, align 8, !tbaa !9
  %169 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %168)
  %170 = trunc i64 %169 to i32
  %171 = load ptr, ptr %13, align 8, !tbaa !9
  %172 = call i64 @roaring_bitmap_get_cardinality(ptr noundef %171)
  %173 = trunc i64 %172 to i32
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.102, i32 noundef %170, i32 noundef %173)
  %175 = load ptr, ptr %14, align 8, !tbaa !9
  %176 = load ptr, ptr %13, align 8, !tbaa !9
  call void @show_difference(ptr noundef %175, ptr noundef %176)
  br label %177

177:                                              ; preds = %164, %137
  %178 = load i8, ptr %15, align 1, !tbaa !5, !range !11, !noundef !12
  %179 = trunc i8 %178 to i1
  %180 = zext i1 %179 to i64
  call void @_assert_true(i64 noundef %180, ptr noundef @.str.99, ptr noundef @.str.2, i32 noundef 1854)
  %181 = load ptr, ptr %13, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %181)
  %182 = load ptr, ptr %14, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %182)
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %183

183:                                              ; preds = %177
  %184 = load i32, ptr %12, align 4, !tbaa !13
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %12, align 4, !tbaa !13
  br label %130, !llvm.loop !18

186:                                              ; preds = %136
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %10, align 4, !tbaa !13
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %10, align 4, !tbaa !13
  br label %121, !llvm.loop !19

190:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !13
  br label %191

191:                                              ; preds = %203, %190
  %192 = load i32, ptr %16, align 4, !tbaa !13
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !9
  %196 = icmp ne ptr %195, null
  br i1 %196, label %198, label %197

197:                                              ; preds = %191
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %206

198:                                              ; preds = %191
  %199 = load i32, ptr %16, align 4, !tbaa !13
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [10 x ptr], ptr %9, i64 0, i64 %200
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %202)
  br label %203

203:                                              ; preds = %198
  %204 = load i32, ptr %16, align 4, !tbaa !13
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %16, align 4, !tbaa !13
  br label %191, !llvm.loop !20

206:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

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

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 = { 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 }

!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 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !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.96 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [50 x i8], align 1

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

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

declare void @roaring_bitmap_free(ptr noundef) local_unnamed_addr #2

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

declare ptr @roaring_bitmap_create() local_unnamed_addr #2

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

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

declare i64 @roaring_bitmap_get_cardinality(ptr noundef) local_unnamed_addr #2

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

declare ptr @roaring_bitmap_copy(ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @gen_bitmap(double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden ptr @synthesized_xor(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @show_difference(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @roaring_bitmap_repair_after_lazy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @test_xor_lazy_inplace(i1 noundef zeroext %0) local_unnamed_addr #4 {
  %2 = alloca [10 x ptr], align 16
  %3 = tail call ptr @roaring_bitmap_create() #5
  tail call void @roaring_bitmap_set_copy_on_write(ptr noundef %3, i1 noundef zeroext %0)
  %4 = tail call ptr @roaring_bitmap_create() #5
  tail call void @roaring_bitmap_set_copy_on_write(ptr noundef %4, i1 noundef zeroext %0)
  br label %7

5:                                                ; preds = %15
  %6 = tail call ptr @roaring_bitmap_copy(ptr noundef %3) #5
  tail call void @roaring_bitmap_set_copy_on_write(ptr noundef %6, i1 noundef zeroext %0)
  tail call void @roaring_bitmap_lazy_xor_inplace(ptr noundef %6, ptr noundef %4) #5
  tail call void @roaring_bitmap_repair_after_lazy(ptr noundef %6) #5
  br label %38

7:                                                ; preds = %1, %15
  %.06080 = phi i32 [ 0, %1 ], [ %16, %15 ]
  %8 = and i32 %.06080, 1
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %11

10:                                               ; preds = %7
  tail call void @roaring_bitmap_add(ptr noundef %3, i32 noundef %.06080) #5
  br label %11

11:                                               ; preds = %10, %7
  %.lhs.trunc = trunc nuw i32 %.06080 to i16
  %12 = urem i16 %.lhs.trunc, 3
  %13 = icmp eq i16 %12, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %11
  tail call void @roaring_bitmap_add(ptr noundef %4, i32 noundef %.06080) #5
  br label %15

15:                                               ; preds = %11, %14
  %16 = add nuw nsw i32 %.06080, 1
  %exitcond.not = icmp eq i32 %16, 300
  br i1 %exitcond.not, label %5, label %7, !llvm.loop !5

17:                                               ; preds = %50
  %18 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %6) #5
  %19 = sext i32 %.1 to i64
  tail call void @_assert_int_equal(i64 noundef %18, i64 noundef %19, ptr noundef nonnull @.str.2, i32 noundef 1808) #5
  tail call void @roaring_bitmap_free(ptr noundef %6) #5
  tail call void @roaring_bitmap_free(ptr noundef %4) #5
  tail call void @roaring_bitmap_free(ptr noundef %3) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #5
  %20 = tail call ptr @gen_bitmap(double noundef 0.000000e+00, double noundef 0x3EB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %20, ptr %2, align 16, !tbaa !7
  %21 = getelementptr inbounds i8, ptr %2, i64 8
  %22 = tail call ptr @gen_bitmap(double noundef 1.000000e+00, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %22, ptr %21, align 8, !tbaa !7
  %23 = getelementptr inbounds i8, ptr %2, i64 16
  %24 = tail call ptr @gen_bitmap(double noundef 1.000000e-05, double noundef 0.000000e+00, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %24, ptr %23, align 16, !tbaa !7
  %25 = getelementptr inbounds i8, ptr %2, i64 24
  %26 = tail call ptr @gen_bitmap(double noundef 1.000000e-05, double noundef 0.000000e+00, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %26, ptr %25, align 8, !tbaa !7
  %27 = getelementptr inbounds i8, ptr %2, i64 32
  %28 = tail call ptr @gen_bitmap(double noundef 1.000000e-01, double noundef 0.000000e+00, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 2000000)
  store ptr %28, ptr %27, align 16, !tbaa !7
  %29 = getelementptr inbounds i8, ptr %2, i64 40
  %30 = tail call ptr @gen_bitmap(double noundef 1.000000e-03, double noundef 0x3E7AD7F29ABCAF48, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %30, ptr %29, align 8, !tbaa !7
  %31 = getelementptr inbounds i8, ptr %2, i64 48
  %32 = tail call ptr @gen_bitmap(double noundef 0.000000e+00, double noundef 1.000000e-10, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef 1000000)
  store ptr %32, ptr %31, align 16, !tbaa !7
  %33 = getelementptr inbounds i8, ptr %2, i64 56
  %34 = tail call ptr @gen_bitmap(double noundef 5.000000e-01, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 600000, i32 noundef 800000, i32 noundef 1000000)
  store ptr %34, ptr %33, align 8, !tbaa !7
  %35 = getelementptr inbounds i8, ptr %2, i64 64
  %36 = tail call ptr @gen_bitmap(double noundef 1.000000e+00, double noundef 0xBEB0C6F7A0B5ED8D, i32 noundef 1, i32 noundef 300000, i32 noundef 500000, i32 noundef 1000000)
  store ptr %36, ptr %35, align 16, !tbaa !7
  %37 = getelementptr inbounds i8, ptr %2, i64 72
  store ptr null, ptr %37, align 8, !tbaa !7
  %.not85 = icmp eq ptr %20, null
  br i1 %.not85, label %._crit_edge90, label %.lr.ph.preheader

38:                                               ; preds = %5, %50
  %.06182 = phi i32 [ 0, %5 ], [ %.1, %50 ]
  %.06281 = phi i32 [ 0, %5 ], [ %51, %50 ]
  %39 = and i32 %.06281, 1
  %40 = icmp ne i32 %39, 0
  %.lhs.trunc72 = trunc nuw i32 %.06281 to i16
  %41 = urem i16 %.lhs.trunc72, 3
  %42 = icmp ne i16 %41, 0
  %or.cond.not78 = and i1 %40, %42
  %43 = urem i16 %.lhs.trunc72, 6
  %.not69 = icmp eq i16 %43, 0
  %or.cond71 = or i1 %.not69, %or.cond.not78
  br i1 %or.cond71, label %47, label %44

44:                                               ; preds = %38
  %45 = add nsw i32 %.06182, 1
  %46 = tail call zeroext i1 @roaring_bitmap_contains(ptr noundef %6, i32 noundef %.06281)
  br i1 %46, label %50, label %.sink.split

47:                                               ; preds = %38
  %48 = tail call zeroext i1 @roaring_bitmap_contains(ptr noundef %6, i32 noundef %.06281)
  br i1 %48, label %.sink.split, label %50

.sink.split:                                      ; preds = %47, %44
  %.str.96.sink = phi ptr [ @.str.96, %44 ], [ @.str.97, %47 ]
  %.1.ph = phi i32 [ %45, %44 ], [ %.06182, %47 ]
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.96.sink, i32 noundef %.06281)
  br label %50

50:                                               ; preds = %.sink.split, %44, %47
  %.1 = phi i32 [ %45, %44 ], [ %.06182, %47 ], [ %.1.ph, %.sink.split ]
  %51 = add nuw nsw i32 %.06281, 1
  %exitcond91.not = icmp eq i32 %51, 300
  br i1 %exitcond91.not, label %17, label %38, !llvm.loop !11

.lr.ph.preheader:                                 ; preds = %17, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %17 ]
  %52 = phi ptr [ %55, %._crit_edge ], [ %20, %17 ]
  %53 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.lr.ph

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not85, label %._crit_edge90, label %.lr.ph89

._crit_edge:                                      ; preds = %68
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = getelementptr inbounds [10 x ptr], ptr %2, i64 0, i64 %indvars.iv.next
  %55 = load ptr, ptr %54, align 8, !tbaa !7
  %.not = icmp eq ptr %55, null
  br i1 %.not, label %.preheader, label %.lr.ph.preheader, !llvm.loop !12

.lr.ph:                                           ; preds = %.lr.ph.preheader, %68
  %indvars.iv92 = phi i64 [ %indvars.iv, %.lr.ph.preheader ], [ %indvars.iv.next93, %68 ]
  %56 = phi ptr [ %52, %.lr.ph.preheader ], [ %71, %68 ]
  %57 = tail call ptr @synthesized_xor(ptr noundef nonnull %52, ptr noundef nonnull %56)
  %58 = tail call ptr @roaring_bitmap_copy(ptr noundef nonnull %52) #5
  tail call void @roaring_bitmap_lazy_xor_inplace(ptr noundef %58, ptr noundef nonnull %56) #5
  tail call void @roaring_bitmap_repair_after_lazy(ptr noundef %58) #5
  %59 = tail call zeroext i1 @roaring_bitmap_equals(ptr noundef %57, ptr noundef %58) #5
  br i1 %59, label %68, label %60

60:                                               ; preds = %.lr.ph
  %61 = trunc nuw nsw i64 %indvars.iv92 to i32
  %62 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.100, i32 noundef %53, i32 noundef %61)
  %63 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %58) #5
  %64 = trunc i64 %63 to i32
  %65 = tail call i64 @roaring_bitmap_get_cardinality(ptr noundef %57) #5
  %66 = trunc i64 %65 to i32
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.102, i32 noundef %64, i32 noundef %66)
  tail call void @show_difference(ptr noundef %58, ptr noundef %57)
  br label %68

68:                                               ; preds = %60, %.lr.ph
  %69 = zext i1 %59 to i64
  tail call void @_assert_true(i64 noundef %69, ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.2, i32 noundef 1854) #5
  tail call void @roaring_bitmap_free(ptr noundef %57) #5
  tail call void @roaring_bitmap_free(ptr noundef %58) #5
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %70 = getelementptr inbounds [10 x ptr], ptr %2, i64 0, i64 %indvars.iv.next93
  %71 = load ptr, ptr %70, align 8, !tbaa !7
  %.not68 = icmp eq ptr %71, null
  br i1 %.not68, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge90:                                    ; preds = %.lr.ph89, %17, %.preheader
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #5
  ret void

.lr.ph89:                                         ; preds = %.preheader, %.lr.ph89
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph89 ], [ 0, %.preheader ]
  %72 = phi ptr [ %74, %.lr.ph89 ], [ %20, %.preheader ]
  tail call void @roaring_bitmap_free(ptr noundef nonnull %72) #5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %73 = getelementptr inbounds [10 x ptr], ptr %2, i64 0, i64 %indvars.iv.next97
  %74 = load ptr, ptr %73, align 8, !tbaa !7
  %.not67 = icmp eq ptr %74, null
  br i1 %.not67, label %._crit_edge90, label %.lr.ph89, !llvm.loop !14
}

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

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

!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 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}


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