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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @run_container_is_full(ptr noundef) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @array_run_container_union(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.rle16_s, align 2
  %10 = alloca %struct.rle16_s, align 2
  %11 = alloca %struct.rle16_s, align 2
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call zeroext i1 @run_container_is_full(ptr noundef %12)
  br i1 %13, label %14, label %17

14:                                               ; preds = %3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  call void @run_container_copy(ptr noundef %15, ptr noundef %16)
  br label %171

17:                                               ; preds = %3
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.array_container_s, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.run_container_s, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !12
  %25 = add nsw i32 %21, %24
  %26 = mul nsw i32 2, %25
  call void @run_container_grow(ptr noundef %18, i32 noundef %26, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.run_container_s, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = load i32, ptr %7, align 4, !tbaa !14
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.rle16_s, ptr %29, i64 %31
  %33 = getelementptr inbounds %struct.rle16_s, ptr %32, i32 0, i32 0
  %34 = load i16, ptr %33, align 2, !tbaa !16
  %35 = zext i16 %34 to i32
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.array_container_s, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = load i32, ptr %8, align 4, !tbaa !14
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i16, ptr %38, i64 %40
  %42 = load i16, ptr %41, align 2, !tbaa !20
  %43 = zext i16 %42 to i32
  %44 = icmp sle i32 %35, %43
  br i1 %44, label %45, label %57

45:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.run_container_s, ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  %50 = load i32, ptr %7, align 4, !tbaa !14
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds %struct.rle16_s, ptr %49, i64 %51
  %53 = load i32, ptr %52, align 2
  %54 = call i32 @run_container_append_first(ptr noundef %46, i32 %53)
  store i32 %54, ptr %10, align 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %9, ptr align 2 %10, i64 4, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %55 = load i32, ptr %7, align 4, !tbaa !14
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !14
  br label %69

57:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.array_container_s, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %62 = load i32, ptr %8, align 4, !tbaa !14
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i16, ptr %61, i64 %63
  %65 = load i16, ptr %64, align 2, !tbaa !20
  %66 = call i32 @run_container_append_value_first(ptr noundef %58, i16 noundef zeroext %65)
  store i32 %66, ptr %11, align 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %9, ptr align 2 %11, i64 4, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %67 = load i32, ptr %8, align 4, !tbaa !14
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !14
  br label %69

69:                                               ; preds = %57, %45
  br label %70

70:                                               ; preds = %125, %69
  %71 = load i32, ptr %7, align 4, !tbaa !14
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.run_container_s, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !12
  %75 = icmp slt i32 %71, %74
  br i1 %75, label %76, label %82

76:                                               ; preds = %70
  %77 = load i32, ptr %8, align 4, !tbaa !14
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.array_container_s, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !9
  %81 = icmp slt i32 %77, %80
  br label %82

82:                                               ; preds = %76, %70
  %83 = phi i1 [ false, %70 ], [ %81, %76 ]
  br i1 %83, label %84, label %126

84:                                               ; preds = %82
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.run_container_s, ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  %88 = load i32, ptr %7, align 4, !tbaa !14
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.rle16_s, ptr %87, i64 %89
  %91 = getelementptr inbounds %struct.rle16_s, ptr %90, i32 0, i32 0
  %92 = load i16, ptr %91, align 2, !tbaa !16
  %93 = zext i16 %92 to i32
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.array_container_s, ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  %97 = load i32, ptr %8, align 4, !tbaa !14
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i16, ptr %96, i64 %98
  %100 = load i16, ptr %99, align 2, !tbaa !20
  %101 = zext i16 %100 to i32
  %102 = icmp sle i32 %93, %101
  br i1 %102, label %103, label %114

103:                                              ; preds = %84
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.run_container_s, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = load i32, ptr %7, align 4, !tbaa !14
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.rle16_s, ptr %107, i64 %109
  %111 = load i32, ptr %110, align 2
  call void @run_container_append(ptr noundef %104, i32 %111, ptr noundef %9)
  %112 = load i32, ptr %7, align 4, !tbaa !14
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !14
  br label %125

114:                                              ; preds = %84
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.array_container_s, ptr %116, i32 0, i32 2
  %118 = load ptr, ptr %117, align 8, !tbaa !19
  %119 = load i32, ptr %8, align 4, !tbaa !14
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i16, ptr %118, i64 %120
  %122 = load i16, ptr %121, align 2, !tbaa !20
  call void @run_container_append_value(ptr noundef %115, i16 noundef zeroext %122, ptr noundef %9)
  %123 = load i32, ptr %8, align 4, !tbaa !14
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !14
  br label %125

125:                                              ; preds = %114, %103
  br label %70, !llvm.loop !22

126:                                              ; preds = %82
  %127 = load i32, ptr %8, align 4, !tbaa !14
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.array_container_s, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !9
  %131 = icmp slt i32 %127, %130
  br i1 %131, label %132, label %151

132:                                              ; preds = %126
  br label %133

133:                                              ; preds = %139, %132
  %134 = load i32, ptr %8, align 4, !tbaa !14
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.array_container_s, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !9
  %138 = icmp slt i32 %134, %137
  br i1 %138, label %139, label %150

139:                                              ; preds = %133
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.array_container_s, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !19
  %144 = load i32, ptr %8, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i16, ptr %143, i64 %145
  %147 = load i16, ptr %146, align 2, !tbaa !20
  call void @run_container_append_value(ptr noundef %140, i16 noundef zeroext %147, ptr noundef %9)
  %148 = load i32, ptr %8, align 4, !tbaa !14
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !14
  br label %133, !llvm.loop !24

150:                                              ; preds = %133
  br label %170

151:                                              ; preds = %126
  br label %152

152:                                              ; preds = %158, %151
  %153 = load i32, ptr %7, align 4, !tbaa !14
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.run_container_s, ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 8, !tbaa !12
  %157 = icmp slt i32 %153, %156
  br i1 %157, label %158, label %169

158:                                              ; preds = %152
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.run_container_s, ptr %160, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !15
  %163 = load i32, ptr %7, align 4, !tbaa !14
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %struct.rle16_s, ptr %162, i64 %164
  %166 = load i32, ptr %165, align 2
  call void @run_container_append(ptr noundef %159, i32 %166, ptr noundef %9)
  %167 = load i32, ptr %7, align 4, !tbaa !14
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %7, align 4, !tbaa !14
  br label %152, !llvm.loop !25

169:                                              ; preds = %152
  br label %170

170:                                              ; preds = %169, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %171

171:                                              ; preds = %170, %14
  ret void
}

declare void @run_container_copy(ptr noundef, ptr noundef) #4

declare void @run_container_grow(ptr noundef, i32 noundef, i1 noundef zeroext) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @run_container_append_first(ptr noundef, i32) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @run_container_append_value_first(ptr noundef, i16 noundef zeroext) #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @run_container_append_value(ptr noundef, i16 noundef zeroext, ptr noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"array_container_s", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"run_container_s", !11, i64 0, !11, i64 4, !6, i64 8}
!14 = !{!11, !11, i64 0}
!15 = !{!13, !6, i64 8}
!16 = !{!17, !18, i64 0}
!17 = !{!"rle16_s", !18, i64 0, !18, i64 2}
!18 = !{!"short", !7, i64 0}
!19 = !{!10, !6, i64 8}
!20 = !{!18, !18, i64 0}
!21 = !{i64 0, i64 2, !20, i64 2, i64 2, !20}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}


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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @run_container_is_full(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @array_run_container_union(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.rle16_s, align 4
  %5 = tail call zeroext i1 @run_container_is_full(ptr noundef %1)
  br i1 %5, label %6, label %7

6:                                                ; preds = %3
  tail call void @run_container_copy(ptr noundef %1, ptr noundef %2) #4
  br label %64

7:                                                ; preds = %3
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = load i32, ptr %1, align 8, !tbaa !11
  %10 = add nsw i32 %9, %8
  %11 = shl nsw i32 %10, 1
  tail call void @run_container_grow(ptr noundef %2, i32 noundef %11, i1 noundef zeroext false) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = load i16, ptr %13, align 2, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = load i16, ptr %16, align 2, !tbaa !18
  %.not = icmp ugt i16 %14, %17
  br i1 %.not, label %21, label %18

18:                                               ; preds = %7
  %19 = load i32, ptr %13, align 2
  %20 = tail call i32 @run_container_append_first(ptr noundef %2, i32 %19)
  br label %23

21:                                               ; preds = %7
  %22 = tail call i32 @run_container_append_value_first(ptr noundef %2, i16 noundef zeroext %17)
  br label %23

23:                                               ; preds = %21, %18
  %storemerge = phi i32 [ %22, %21 ], [ %20, %18 ]
  %.048 = phi i32 [ 1, %21 ], [ 0, %18 ]
  %.0 = phi i32 [ 0, %21 ], [ 1, %18 ]
  store i32 %storemerge, ptr %4, align 4
  %24 = load i32, ptr %1, align 8, !tbaa !11
  %25 = icmp slt i32 %.0, %24
  br i1 %25, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %23
  %26 = load i32, ptr %0, align 8, !tbaa !5
  %27 = icmp slt i32 %.048, %26
  br i1 %27, label %.lr.ph74, label %.critedge

.lr.ph:                                           ; preds = %43
  %28 = load i32, ptr %0, align 8, !tbaa !5
  %29 = icmp slt i32 %.250, %28
  br i1 %29, label %.lr.ph74, label %.critedge, !llvm.loop !19

.lr.ph74:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %.1495573 = phi i32 [ %.250, %.lr.ph ], [ %.048, %.lr.ph.preheader ]
  %.15672 = phi i32 [ %.2, %.lr.ph ], [ %.0, %.lr.ph.preheader ]
  %30 = load ptr, ptr %12, align 8, !tbaa !13
  %31 = sext i32 %.15672 to i64
  %32 = getelementptr inbounds %struct.rle16_s, ptr %30, i64 %31
  %33 = load i16, ptr %32, align 2, !tbaa !14
  %34 = load ptr, ptr %15, align 8, !tbaa !17
  %35 = sext i32 %.1495573 to i64
  %36 = getelementptr inbounds i16, ptr %34, i64 %35
  %37 = load i16, ptr %36, align 2, !tbaa !18
  %.not52 = icmp ugt i16 %33, %37
  br i1 %.not52, label %41, label %38

38:                                               ; preds = %.lr.ph74
  %39 = load i32, ptr %32, align 2
  call void @run_container_append(ptr noundef %2, i32 %39, ptr noundef nonnull %4)
  %40 = add nsw i32 %.15672, 1
  br label %43

41:                                               ; preds = %.lr.ph74
  call void @run_container_append_value(ptr noundef %2, i16 noundef zeroext %37, ptr noundef nonnull %4)
  %42 = add nsw i32 %.1495573, 1
  br label %43

43:                                               ; preds = %41, %38
  %.250 = phi i32 [ %.1495573, %38 ], [ %42, %41 ]
  %.2 = phi i32 [ %40, %38 ], [ %.15672, %41 ]
  %44 = load i32, ptr %1, align 8, !tbaa !11
  %45 = icmp slt i32 %.2, %44
  br i1 %45, label %.lr.ph, label %.critedge, !llvm.loop !19

.critedge:                                        ; preds = %43, %.lr.ph, %.lr.ph.preheader, %23
  %46 = phi i32 [ %24, %23 ], [ %24, %.lr.ph.preheader ], [ %44, %.lr.ph ], [ %44, %43 ]
  %.149.lcssa = phi i32 [ %.048, %23 ], [ %.048, %.lr.ph.preheader ], [ %.250, %.lr.ph ], [ %.250, %43 ]
  %.1.lcssa = phi i32 [ %.0, %23 ], [ %.0, %.lr.ph.preheader ], [ %.2, %.lr.ph ], [ %.2, %43 ]
  %47 = load i32, ptr %0, align 8, !tbaa !5
  %48 = icmp slt i32 %.149.lcssa, %47
  br i1 %48, label %.lr.ph64.preheader, label %.preheader53

.preheader53:                                     ; preds = %.critedge
  %49 = icmp slt i32 %.1.lcssa, %46
  br i1 %49, label %.lr.ph62.preheader, label %.loopexit

.lr.ph62.preheader:                               ; preds = %.preheader53
  %50 = sext i32 %.1.lcssa to i64
  br label %.lr.ph62

.lr.ph64.preheader:                               ; preds = %.critedge
  %51 = sext i32 %.149.lcssa to i64
  br label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %.lr.ph64
  %indvars.iv67 = phi i64 [ %51, %.lr.ph64.preheader ], [ %indvars.iv.next68, %.lr.ph64 ]
  %52 = load ptr, ptr %15, align 8, !tbaa !17
  %53 = getelementptr inbounds i16, ptr %52, i64 %indvars.iv67
  %54 = load i16, ptr %53, align 2, !tbaa !18
  call void @run_container_append_value(ptr noundef %2, i16 noundef zeroext %54, ptr noundef nonnull %4)
  %indvars.iv.next68 = add nsw i64 %indvars.iv67, 1
  %55 = load i32, ptr %0, align 8, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next68, %56
  br i1 %57, label %.lr.ph64, label %.loopexit, !llvm.loop !21

.lr.ph62:                                         ; preds = %.lr.ph62.preheader, %.lr.ph62
  %indvars.iv = phi i64 [ %50, %.lr.ph62.preheader ], [ %indvars.iv.next, %.lr.ph62 ]
  %58 = load ptr, ptr %12, align 8, !tbaa !13
  %59 = getelementptr inbounds %struct.rle16_s, ptr %58, i64 %indvars.iv
  %60 = load i32, ptr %59, align 2
  call void @run_container_append(ptr noundef %2, i32 %60, ptr noundef nonnull %4)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %61 = load i32, ptr %1, align 8, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next, %62
  br i1 %63, label %.lr.ph62, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph62, %.lr.ph64, %.preheader53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %64

64:                                               ; preds = %.loopexit, %6
  ret void
}

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

declare void @run_container_grow(ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @run_container_append_first(ptr noundef, i32) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @run_container_append_value_first(ptr noundef, i16 noundef zeroext) local_unnamed_addr #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @run_container_append_value(ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #0

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

!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 = !{!6, !10, i64 8}
!18 = !{!16, !16, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


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