; LLVM IR from jermp/2i_bench :: external/CRoaring/src/containers (convert)

; 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.array_container_s = type { i32, i32, ptr }
%struct.run_container_s = type { i32, i32, ptr }
%struct.rle16_s = type { i16, i16 }
%struct.bitset_container_s = type { i32, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.convert_to_bitset_or_array_container = external hidden unnamed_addr constant [82 x i8], align 1

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

declare ptr @bitset_container_create() #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @bitset_set_lenrange(ptr noundef, i32 noundef, i32 noundef) #2

declare ptr @array_container_create_given_capacity(i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @convert_to_bitset_or_array_container(ptr noundef %0, i32 noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i16, align 2
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i16, align 2
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = icmp sle i32 %17, 4096
  br i1 %18, label %19, label %91

19:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = call ptr @array_container_create_given_capacity(i32 noundef %20)
  store ptr %21, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.array_container_s, ptr %22, i32 0, i32 0
  store i32 0, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %76, %19
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.run_container_s, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp slt i32 %25, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %79

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.run_container_s, ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds %struct.rle16_s, ptr %34, i64 %36
  %38 = getelementptr inbounds %struct.rle16_s, ptr %37, i32 0, i32 0
  %39 = load i16, ptr %38, align 2, !tbaa !16
  store i16 %39, ptr %11, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #5
  %40 = load i16, ptr %11, align 2, !tbaa !19
  %41 = zext i16 %40 to i32
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.run_container_s, ptr %42, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.rle16_s, ptr %44, i64 %46
  %48 = getelementptr inbounds %struct.rle16_s, ptr %47, i32 0, i32 1
  %49 = load i16, ptr %48, align 2, !tbaa !20
  %50 = zext i16 %49 to i32
  %51 = add nsw i32 %41, %50
  %52 = trunc i32 %51 to i16
  store i16 %52, ptr %12, align 2, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #5
  %53 = load i16, ptr %11, align 2, !tbaa !19
  store i16 %53, ptr %13, align 2, !tbaa !19
  br label %54

54:                                               ; preds = %72, %31
  %55 = load i16, ptr %13, align 2, !tbaa !19
  %56 = zext i16 %55 to i32
  %57 = load i16, ptr %12, align 2, !tbaa !19
  %58 = zext i16 %57 to i32
  %59 = icmp sle i32 %56, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %54
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #5
  br label %75

61:                                               ; preds = %54
  %62 = load i16, ptr %13, align 2, !tbaa !19
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.array_container_s, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.array_container_s, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 8, !tbaa !11
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds i16, ptr %65, i64 %70
  store i16 %62, ptr %71, align 2, !tbaa !19
  br label %72

72:                                               ; preds = %61
  %73 = load i16, ptr %13, align 2, !tbaa !19
  %74 = add i16 %73, 1
  store i16 %74, ptr %13, align 2, !tbaa !19
  br label %54, !llvm.loop !22

75:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #5
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %9, align 4, !tbaa !9
  br label %24, !llvm.loop !24

79:                                               ; preds = %30
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.array_container_s, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !11
  %84 = icmp eq i32 %80, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %79
  br label %87

86:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__.convert_to_bitset_or_array_container) #6
  unreachable

87:                                               ; preds = %85
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 2, ptr %88, align 1, !tbaa !25
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  call void @run_container_free(ptr noundef %89)
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %90, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %133

91:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %92 = call ptr @bitset_container_create()
  store ptr %92, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %123, %91
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.run_container_s, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !13
  %98 = icmp slt i32 %94, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %93
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %126

100:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #5
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.run_container_s, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !15
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %struct.rle16_s, ptr %103, i64 %105
  %107 = getelementptr inbounds %struct.rle16_s, ptr %106, i32 0, i32 0
  %108 = load i16, ptr %107, align 2, !tbaa !16
  store i16 %108, ptr %16, align 2, !tbaa !19
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.bitset_container_s, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !26
  %112 = load i16, ptr %16, align 2, !tbaa !19
  %113 = zext i16 %112 to i32
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.run_container_s, ptr %114, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !15
  %117 = load i32, ptr %15, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.rle16_s, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.rle16_s, ptr %119, i32 0, i32 1
  %121 = load i16, ptr %120, align 2, !tbaa !20
  %122 = zext i16 %121 to i32
  call void @bitset_set_lenrange(ptr noundef %111, i32 noundef %113, i32 noundef %122)
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #5
  br label %123

123:                                              ; preds = %100
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %15, align 4, !tbaa !9
  br label %93, !llvm.loop !28

126:                                              ; preds = %99
  %127 = load i32, ptr %6, align 4, !tbaa !9
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.bitset_container_s, ptr %128, i32 0, i32 0
  store i32 %127, ptr %129, align 8, !tbaa !29
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 1, ptr %130, align 1, !tbaa !25
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  call void @run_container_free(ptr noundef %131)
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %132, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %133

133:                                              ; preds = %126, %87
  %134 = load ptr, ptr %4, align 8
  ret ptr %134
}

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

declare void @run_container_free(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 = { 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 }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"array_container_s", !10, i64 0, !10, i64 4, !6, i64 8}
!13 = !{!14, !10, i64 0}
!14 = !{!"run_container_s", !10, i64 0, !10, i64 4, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = !{!17, !18, i64 0}
!17 = !{!"rle16_s", !18, i64 0, !18, i64 2}
!18 = !{!"short", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!17, !18, i64 2}
!21 = !{!12, !6, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !6, i64 8}
!27 = !{!"bitset_container_s", !10, i64 0, !6, i64 8}
!28 = distinct !{!28, !23}
!29 = !{!27, !10, i64 0}


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

%struct.rle16_s = type { i16, i16 }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.convert_to_bitset_or_array_container = external hidden unnamed_addr constant [82 x i8], align 1

declare ptr @bitset_container_create() local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @bitset_set_lenrange(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare ptr @array_container_create_given_capacity(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @convert_to_bitset_or_array_container(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 {
  %4 = icmp slt i32 %1, 4097
  br i1 %4, label %5, label %36

5:                                                ; preds = %3
  %6 = tail call ptr @array_container_create_given_capacity(i32 noundef %1) #5
  store i32 0, ptr %6, align 8, !tbaa !5
  %7 = load i32, ptr %0, align 8, !tbaa !11
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %14

._crit_edge50:                                    ; preds = %32, %5
  %12 = phi i32 [ 0, %5 ], [ %.promoted58, %32 ]
  %13 = icmp eq i32 %12, %1
  br i1 %13, label %54, label %35

14:                                               ; preds = %.lr.ph49, %32
  %.promoted = phi i32 [ 0, %.lr.ph49 ], [ %.promoted58, %32 ]
  %indvars.iv54 = phi i64 [ 0, %.lr.ph49 ], [ %indvars.iv.next55, %32 ]
  %15 = getelementptr inbounds %struct.rle16_s, ptr %10, i64 %indvars.iv54
  %16 = load i16, ptr %15, align 2, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %15, i64 2
  %18 = load i16, ptr %17, align 2, !tbaa !17
  %19 = add i16 %18, %16
  %.not42 = icmp ugt i16 %16, %19
  br i1 %.not42, label %32, label %.lr.ph45

.lr.ph45:                                         ; preds = %14
  %20 = load ptr, ptr %11, align 8, !tbaa !18
  %21 = sext i32 %.promoted to i64
  %22 = add i16 %18, 1
  %23 = add i16 %22, %16
  %24 = add i16 %16, 1
  %umax = tail call i16 @llvm.umax.i16(i16 %23, i16 %24)
  %25 = xor i16 %16, -1
  %26 = add i16 %umax, %25
  %27 = zext i16 %26 to i64
  %28 = add nuw nsw i64 %27, 1
  %min.iters.check = icmp ult i16 %26, 15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph45
  %indvars.iv52.ph = phi i64 [ %21, %.lr.ph45 ], [ %ind.end, %middle.block ]
  %.03943.ph = phi i16 [ %16, %.lr.ph45 ], [ %ind.end59, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph45
  %n.vec = and i64 %28, 131056
  %ind.end = add nsw i64 %n.vec, %21
  %.cast = trunc i64 %n.vec to i16
  %ind.end59 = add i16 %16, %.cast
  %.splatinsert = insertelement <8 x i16> poison, i16 %16, i64 0
  %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> poison, <8 x i32> zeroinitializer
  %induction = add <8 x i16> %.splat, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
  %invariant.gep = getelementptr i16, ptr %20, i64 %21
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <8 x i16> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <8 x i16> %vec.ind, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
  %gep = getelementptr i16, ptr %invariant.gep, i64 %index
  %29 = getelementptr inbounds i8, ptr %gep, i64 16
  store <8 x i16> %vec.ind, ptr %gep, align 2, !tbaa !19
  store <8 x i16> %step.add, ptr %29, align 2, !tbaa !19
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <8 x i16> %vec.ind, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16>
  %30 = icmp eq i64 %index.next, %n.vec
  br i1 %30, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %28, %n.vec
  br i1 %cmp.n, label %._crit_edge46, label %scalar.ph.preheader

._crit_edge46:                                    ; preds = %scalar.ph, %middle.block
  %indvars.iv.next53.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next53, %scalar.ph ]
  %31 = trunc nsw i64 %indvars.iv.next53.lcssa to i32
  store i32 %31, ptr %6, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %._crit_edge46, %14
  %.promoted58 = phi i32 [ %31, %._crit_edge46 ], [ %.promoted, %14 ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge50, label %14, !llvm.loop !24

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %scalar.ph ], [ %indvars.iv52.ph, %scalar.ph.preheader ]
  %.03943 = phi i16 [ %34, %scalar.ph ], [ %.03943.ph, %scalar.ph.preheader ]
  %indvars.iv.next53 = add nsw i64 %indvars.iv52, 1
  %33 = getelementptr inbounds i16, ptr %20, i64 %indvars.iv52
  store i16 %.03943, ptr %33, align 2, !tbaa !19
  %34 = add i16 %.03943, 1
  %.not = icmp ugt i16 %34, %19
  br i1 %.not, label %._crit_edge46, label %scalar.ph, !llvm.loop !25

35:                                               ; preds = %._crit_edge50
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__.convert_to_bitset_or_array_container) #6
  unreachable

36:                                               ; preds = %3
  %37 = tail call ptr @bitset_container_create() #5
  %38 = load i32, ptr %0, align 8, !tbaa !11
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %36
  %40 = getelementptr inbounds i8, ptr %0, i64 8
  %41 = getelementptr inbounds i8, ptr %37, i64 8
  br label %42

._crit_edge:                                      ; preds = %42, %36
  store i32 %1, ptr %37, align 8, !tbaa !26
  br label %54

42:                                               ; preds = %.lr.ph, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %42 ]
  %43 = load ptr, ptr %40, align 8, !tbaa !13
  %44 = getelementptr inbounds %struct.rle16_s, ptr %43, i64 %indvars.iv
  %45 = load i16, ptr %44, align 2, !tbaa !14
  %46 = load ptr, ptr %41, align 8, !tbaa !28
  %47 = zext i16 %45 to i32
  %48 = getelementptr inbounds i8, ptr %44, i64 2
  %49 = load i16, ptr %48, align 2, !tbaa !17
  %50 = zext i16 %49 to i32
  tail call void @bitset_set_lenrange(ptr noundef %46, i32 noundef %47, i32 noundef %50)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %51 = load i32, ptr %0, align 8, !tbaa !11
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next, %52
  br i1 %53, label %42, label %._crit_edge, !llvm.loop !29

54:                                               ; preds = %._crit_edge50, %._crit_edge
  %.sink = phi i8 [ 1, %._crit_edge ], [ 2, %._crit_edge50 ]
  %.0 = phi ptr [ %37, %._crit_edge ], [ %6, %._crit_edge50 ]
  store i8 %.sink, ptr %2, align 1, !tbaa !30
  tail call void @run_container_free(ptr noundef nonnull %0) #5
  ret ptr %.0
}

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

declare void @run_container_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.umax.i16(i16, i16) #4

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"array_container_s", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"run_container_s", !7, i64 0, !7, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !16, i64 0}
!15 = !{!"rle16_s", !16, i64 0, !16, i64 2}
!16 = !{!"short", !8, i64 0}
!17 = !{!15, !16, i64 2}
!18 = !{!6, !10, i64 8}
!19 = !{!16, !16, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21, !23, !22}
!26 = !{!27, !7, i64 0}
!27 = !{!"bitset_container_s", !7, i64 0, !10, i64 8}
!28 = !{!27, !10, i64 8}
!29 = distinct !{!29, !21}
!30 = !{!8, !8, i64 0}


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