; 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_bitmap_s = type { %struct.roaring_array_s }
%struct.roaring_array_s = type { i32, i32, ptr, ptr, ptr, i8 }

@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [64 x i8], align 1
@__PRETTY_FUNCTION__.convert_all_containers = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [47 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

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

; Function Attrs: nounwind uwtable
define dso_local void @convert_all_containers(ptr noundef %0, i8 noundef zeroext %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !10
  br label %10

10:                                               ; preds = %211, %2
  %11 = load i32, ptr %5, align 4, !tbaa !10
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %struct.roaring_array_s, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !12
  %16 = icmp slt i32 %11, %15
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %10
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.roaring_array_s, ptr %20, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = load i32, ptr %5, align 4, !tbaa !10
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i8, ptr %22, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = zext i8 %26 to i32
  %28 = icmp eq i32 %27, 1
  br i1 %28, label %29, label %62

29:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %30, i32 0, i32 0
  %32 = getelementptr inbounds %struct.roaring_array_s, ptr %31, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = load i32, ptr %5, align 4, !tbaa !10
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %33, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = call ptr @array_container_from_bitset(ptr noundef %37)
  store ptr %38, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.roaring_array_s, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = load i32, ptr %5, align 4, !tbaa !10
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  call void @bitset_container_free(ptr noundef %46)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %struct.roaring_array_s, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = load i32, ptr %5, align 4, !tbaa !10
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  store ptr %47, ptr %54, align 8, !tbaa !5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.roaring_array_s, ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !15
  %59 = load i32, ptr %5, align 4, !tbaa !10
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  store i8 2, ptr %61, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %107

62:                                               ; preds = %18
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.roaring_array_s, ptr %64, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = load i32, ptr %5, align 4, !tbaa !10
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = zext i8 %70 to i32
  %72 = icmp eq i32 %71, 3
  br i1 %72, label %73, label %106

73:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds %struct.roaring_array_s, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = load i32, ptr %5, align 4, !tbaa !10
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = call ptr @array_container_from_run(ptr noundef %81)
  store ptr %82, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct.roaring_array_s, ptr %84, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = load i32, ptr %5, align 4, !tbaa !10
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %86, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  call void @run_container_free(ptr noundef %90)
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.roaring_array_s, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !16
  %96 = load i32, ptr %5, align 4, !tbaa !10
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  store ptr %91, ptr %98, align 8, !tbaa !5
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %struct.roaring_array_s, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  %103 = load i32, ptr %5, align 4, !tbaa !10
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  store i8 2, ptr %105, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %106

106:                                              ; preds = %73, %62
  br label %107

107:                                              ; preds = %106, %29
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.roaring_array_s, ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  %112 = load i32, ptr %5, align 4, !tbaa !10
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %111, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !9
  %116 = zext i8 %115 to i32
  %117 = icmp eq i32 %116, 2
  br i1 %117, label %118, label %119

118:                                              ; preds = %107
  br label %120

119:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.2, i32 noundef 126, ptr noundef @__PRETTY_FUNCTION__.convert_all_containers) #5
  unreachable

120:                                              ; preds = %118
  %121 = load i8, ptr %4, align 1, !tbaa !9
  %122 = zext i8 %121 to i32
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %157

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %125, i32 0, i32 0
  %127 = getelementptr inbounds %struct.roaring_array_s, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !16
  %129 = load i32, ptr %5, align 4, !tbaa !10
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = call ptr @bitset_container_from_array(ptr noundef %132)
  store ptr %133, ptr %8, align 8, !tbaa !5
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.roaring_array_s, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  %138 = load i32, ptr %5, align 4, !tbaa !10
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  call void @array_container_free(ptr noundef %141)
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %struct.roaring_array_s, ptr %144, i32 0, i32 2
  %146 = load ptr, ptr %145, align 8, !tbaa !16
  %147 = load i32, ptr %5, align 4, !tbaa !10
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds ptr, ptr %146, i64 %148
  store ptr %142, ptr %149, align 8, !tbaa !5
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds %struct.roaring_array_s, ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !15
  %154 = load i32, ptr %5, align 4, !tbaa !10
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %153, i64 %155
  store i8 1, ptr %156, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %195

157:                                              ; preds = %120
  %158 = load i8, ptr %4, align 1, !tbaa !9
  %159 = zext i8 %158 to i32
  %160 = icmp eq i32 %159, 3
  br i1 %160, label %161, label %194

161:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds %struct.roaring_array_s, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !16
  %166 = load i32, ptr %5, align 4, !tbaa !10
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = call ptr @run_container_from_array(ptr noundef %169)
  store ptr %170, ptr %9, align 8, !tbaa !5
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.roaring_array_s, ptr %172, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !16
  %175 = load i32, ptr %5, align 4, !tbaa !10
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds ptr, ptr %174, i64 %176
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  call void @array_container_free(ptr noundef %178)
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds %struct.roaring_array_s, ptr %181, i32 0, i32 2
  %183 = load ptr, ptr %182, align 8, !tbaa !16
  %184 = load i32, ptr %5, align 4, !tbaa !10
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds ptr, ptr %183, i64 %185
  store ptr %179, ptr %186, align 8, !tbaa !5
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds %struct.roaring_array_s, ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !15
  %191 = load i32, ptr %5, align 4, !tbaa !10
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i8, ptr %190, i64 %192
  store i8 3, ptr %193, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %194

194:                                              ; preds = %161, %157
  br label %195

195:                                              ; preds = %194, %124
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.roaring_bitmap_s, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds %struct.roaring_array_s, ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !15
  %200 = load i32, ptr %5, align 4, !tbaa !10
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i8, ptr %199, i64 %201
  %203 = load i8, ptr %202, align 1, !tbaa !9
  %204 = zext i8 %203 to i32
  %205 = load i8, ptr %4, align 1, !tbaa !9
  %206 = zext i8 %205 to i32
  %207 = icmp eq i32 %204, %206
  br i1 %207, label %208, label %209

208:                                              ; preds = %195
  br label %210

209:                                              ; preds = %195
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.2, i32 noundef 140, ptr noundef @__PRETTY_FUNCTION__.convert_all_containers) #5
  unreachable

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %5, align 4, !tbaa !10
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %5, align 4, !tbaa !10
  br label %10, !llvm.loop !17

214:                                              ; preds = %17
  ret void
}

declare ptr @array_container_from_bitset(ptr noundef) #3

declare void @bitset_container_free(ptr noundef) #3

declare ptr @array_container_from_run(ptr noundef) #3

declare void @run_container_free(ptr noundef) #3

declare ptr @bitset_container_from_array(ptr noundef) #3

declare void @array_container_free(ptr noundef) #3

declare ptr @run_container_from_array(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"roaring_bitmap_s", !14, i64 0}
!14 = !{!"roaring_array_s", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32}
!15 = !{!13, !6, i64 24}
!16 = !{!13, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; 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.17 = external hidden unnamed_addr constant [64 x i8], align 1
@__PRETTY_FUNCTION__.convert_all_containers = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [47 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @convert_all_containers(ptr nocapture noundef readonly %0, i8 noundef zeroext %1) local_unnamed_addr #1 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %.pre = load ptr, ptr %5, align 8, !tbaa !12
  br label %11

7:                                                ; preds = %59
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = icmp slt i64 %indvars.iv.next, %9
  br i1 %10, label %11, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %7, %2
  ret void

11:                                               ; preds = %.lr.ph, %7
  %12 = phi ptr [ %.pre, %.lr.ph ], [ %60, %7 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %7 ]
  %13 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv
  %14 = load i8, ptr %13, align 1, !tbaa !15
  switch i8 %14, label %35 [
    i8 1, label %15
    i8 3, label %23
  ]

15:                                               ; preds = %11
  %16 = load ptr, ptr %6, align 8, !tbaa !16
  %17 = getelementptr inbounds ptr, ptr %16, i64 %indvars.iv
  %18 = load ptr, ptr %17, align 8, !tbaa !17
  %19 = tail call ptr @array_container_from_bitset(ptr noundef %18) #3
  %20 = load ptr, ptr %6, align 8, !tbaa !16
  %21 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  tail call void @bitset_container_free(ptr noundef %22) #3
  br label %.sink.split

23:                                               ; preds = %11
  %24 = load ptr, ptr %6, align 8, !tbaa !16
  %25 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv
  %26 = load ptr, ptr %25, align 8, !tbaa !17
  %27 = tail call ptr @array_container_from_run(ptr noundef %26) #3
  %28 = load ptr, ptr %6, align 8, !tbaa !16
  %29 = getelementptr inbounds ptr, ptr %28, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  tail call void @run_container_free(ptr noundef %30) #3
  br label %.sink.split

.sink.split:                                      ; preds = %15, %23
  %.sink = phi ptr [ %27, %23 ], [ %19, %15 ]
  %31 = load ptr, ptr %6, align 8, !tbaa !16
  %32 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv
  store ptr %.sink, ptr %32, align 8, !tbaa !17
  %33 = load ptr, ptr %5, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %33, i64 %indvars.iv
  store i8 2, ptr %34, align 1, !tbaa !15
  br label %35

35:                                               ; preds = %.sink.split, %11
  %36 = load ptr, ptr %5, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %36, i64 %indvars.iv
  %38 = load i8, ptr %37, align 1, !tbaa !15
  %39 = icmp eq i8 %38, 2
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.2, i32 noundef 126, ptr noundef nonnull @__PRETTY_FUNCTION__.convert_all_containers) #4
  unreachable

41:                                               ; preds = %35
  switch i8 %1, label %59 [
    i8 1, label %42
    i8 3, label %47
  ]

42:                                               ; preds = %41
  %43 = load ptr, ptr %6, align 8, !tbaa !16
  %44 = getelementptr inbounds ptr, ptr %43, i64 %indvars.iv
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = tail call ptr @bitset_container_from_array(ptr noundef %45) #3
  br label %.sink.split56

47:                                               ; preds = %41
  %48 = load ptr, ptr %6, align 8, !tbaa !16
  %49 = getelementptr inbounds ptr, ptr %48, i64 %indvars.iv
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = tail call ptr @run_container_from_array(ptr noundef %50) #3
  br label %.sink.split56

.sink.split56:                                    ; preds = %42, %47
  %.sink60 = phi ptr [ %51, %47 ], [ %46, %42 ]
  %52 = load ptr, ptr %6, align 8, !tbaa !16
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  tail call void @array_container_free(ptr noundef %54) #3
  %55 = load ptr, ptr %6, align 8, !tbaa !16
  %56 = getelementptr inbounds ptr, ptr %55, i64 %indvars.iv
  store ptr %.sink60, ptr %56, align 8, !tbaa !17
  %57 = load ptr, ptr %5, align 8, !tbaa !12
  %58 = getelementptr inbounds i8, ptr %57, i64 %indvars.iv
  store i8 %1, ptr %58, align 1, !tbaa !15
  br label %59

59:                                               ; preds = %.sink.split56, %41
  %60 = load ptr, ptr %5, align 8, !tbaa !12
  %61 = getelementptr inbounds i8, ptr %60, i64 %indvars.iv
  %62 = load i8, ptr %61, align 1, !tbaa !15
  %63 = icmp eq i8 %62, %1
  br i1 %63, label %7, label %64

64:                                               ; preds = %59
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2, i32 noundef 140, ptr noundef nonnull @__PRETTY_FUNCTION__.convert_all_containers) #4
  unreachable
}

declare ptr @array_container_from_bitset(ptr noundef) local_unnamed_addr #2

declare void @bitset_container_free(ptr noundef) local_unnamed_addr #2

declare ptr @array_container_from_run(ptr noundef) local_unnamed_addr #2

declare void @run_container_free(ptr noundef) local_unnamed_addr #2

declare ptr @bitset_container_from_array(ptr noundef) local_unnamed_addr #2

declare void @array_container_free(ptr noundef) local_unnamed_addr #2

declare ptr @run_container_from_array(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 }
attributes #4 = { 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, !8, i64 0}
!6 = !{!"roaring_bitmap_s", !7, i64 0}
!7 = !{!"roaring_array_s", !8, i64 0, !8, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !9, i64 32}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !11, i64 24}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!9, !9, i64 0}
!16 = !{!6, !11, i64 8}
!17 = !{!11, !11, i64 0}


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