; LLVM IR from cruppstahl/upscaledb :: 3rdparty/simdcomp/src (simdbitpacking)

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @_mm_storeu_si128(ptr noundef, <2 x i64> noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_loadu_si128(ptr noundef) #1

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

; 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: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_or_si128(<2 x i64> noundef, <2 x i64> noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_slli_epi32(<2 x i64> noundef, i32 noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_srli_epi32(<2 x i64> noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @simdunpack_length(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca <2 x i64>, align 16
  %12 = alloca i32, align 4
  %13 = alloca <2 x i64>, align 16
  %14 = alloca i32, align 4
  %15 = alloca <2 x i64>, align 16
  %16 = alloca i32, align 4
  %17 = alloca [4 x i32], align 16
  %18 = alloca <2 x i64>, align 16
  %19 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %4
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %23, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %165

24:                                               ; preds = %4
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %42

27:                                               ; preds = %24
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %37, %27
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %32, label %40

32:                                               ; preds = %28
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %10, align 4, !tbaa !9
  br label %28, !llvm.loop !11

40:                                               ; preds = %28
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %41, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %165

42:                                               ; preds = %24
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 32
  br i1 %44, label %45, label %55

45:                                               ; preds = %42
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = mul i64 %49, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 16 %47, i64 %50, i1 false)
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  store ptr %54, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %165

55:                                               ; preds = %42
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = shl i32 1, %56
  %58 = sub nsw i32 %57, 1
  %59 = call <2 x i64> @_mm_set1_epi32(i32 noundef %58)
  store <2 x i64> %59, ptr %11, align 16, !tbaa !13
  store i32 0, ptr %12, align 4, !tbaa !9
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call <2 x i64> @_mm_loadu_si128(ptr noundef %60)
  store <2 x i64> %61, ptr %13, align 16, !tbaa !13
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds <2 x i64>, ptr %62, i32 1
  store ptr %63, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %105, %55
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = sdiv i32 %66, 4
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %69, label %108

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %70 = load <2 x i64>, ptr %13, align 16, !tbaa !13
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = call <2 x i64> @_mm_srli_epi32(<2 x i64> noundef %70, i32 noundef %71)
  store <2 x i64> %72, ptr %15, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = sub i64 32, %74
  %76 = trunc i64 %75 to i32
  store i32 %76, ptr %16, align 4, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = icmp ult i32 %77, %78
  br i1 %79, label %80, label %84

80:                                               ; preds = %69
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = add i32 %82, %81
  store i32 %83, ptr %12, align 4, !tbaa !9
  br label %97

84:                                               ; preds = %69
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = call <2 x i64> @_mm_loadu_si128(ptr noundef %85)
  store <2 x i64> %86, ptr %13, align 16, !tbaa !13
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds <2 x i64>, ptr %87, i32 1
  store ptr %88, ptr %6, align 8, !tbaa !5
  %89 = load <2 x i64>, ptr %13, align 16, !tbaa !13
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = call <2 x i64> @_mm_slli_epi32(<2 x i64> noundef %89, i32 noundef %90)
  %92 = load <2 x i64>, ptr %15, align 16, !tbaa !13
  %93 = call <2 x i64> @_mm_or_si128(<2 x i64> noundef %91, <2 x i64> noundef %92)
  store <2 x i64> %93, ptr %15, align 16, !tbaa !13
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = load i32, ptr %16, align 4, !tbaa !9
  %96 = sub i32 %94, %95
  store i32 %96, ptr %12, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %84, %80
  %98 = load <2 x i64>, ptr %11, align 16, !tbaa !13
  %99 = load <2 x i64>, ptr %15, align 16, !tbaa !13
  %100 = call <2 x i64> @_mm_and_si128(<2 x i64> noundef %98, <2 x i64> noundef %99)
  store <2 x i64> %100, ptr %15, align 16, !tbaa !13
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load <2 x i64>, ptr %15, align 16, !tbaa !13
  call void @_mm_storeu_si128(ptr noundef %101, <2 x i64> noundef %102)
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds i32, ptr %103, i64 4
  store ptr %104, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  br label %105

105:                                              ; preds = %97
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %10, align 4, !tbaa !9
  br label %64, !llvm.loop !14

108:                                              ; preds = %64
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = srem i32 %109, 4
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %163

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %113 = load <2 x i64>, ptr %13, align 16, !tbaa !13
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = call <2 x i64> @_mm_srli_epi32(<2 x i64> noundef %113, i32 noundef %114)
  store <2 x i64> %115, ptr %18, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = sub i64 32, %117
  %119 = trunc i64 %118 to i32
  store i32 %119, ptr %19, align 4, !tbaa !9
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = load i32, ptr %19, align 4, !tbaa !9
  %122 = icmp ult i32 %120, %121
  br i1 %122, label %123, label %127

123:                                              ; preds = %112
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = add i32 %125, %124
  store i32 %126, ptr %12, align 4, !tbaa !9
  br label %140

127:                                              ; preds = %112
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = call <2 x i64> @_mm_loadu_si128(ptr noundef %128)
  store <2 x i64> %129, ptr %13, align 16, !tbaa !13
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds <2 x i64>, ptr %130, i32 1
  store ptr %131, ptr %6, align 8, !tbaa !5
  %132 = load <2 x i64>, ptr %13, align 16, !tbaa !13
  %133 = load i32, ptr %19, align 4, !tbaa !9
  %134 = call <2 x i64> @_mm_slli_epi32(<2 x i64> noundef %132, i32 noundef %133)
  %135 = load <2 x i64>, ptr %18, align 16, !tbaa !13
  %136 = call <2 x i64> @_mm_or_si128(<2 x i64> noundef %134, <2 x i64> noundef %135)
  store <2 x i64> %136, ptr %18, align 16, !tbaa !13
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = load i32, ptr %19, align 4, !tbaa !9
  %139 = sub i32 %137, %138
  store i32 %139, ptr %12, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %127, %123
  %141 = load <2 x i64>, ptr %11, align 16, !tbaa !13
  %142 = load <2 x i64>, ptr %18, align 16, !tbaa !13
  %143 = call <2 x i64> @_mm_and_si128(<2 x i64> noundef %141, <2 x i64> noundef %142)
  store <2 x i64> %143, ptr %18, align 16, !tbaa !13
  %144 = getelementptr inbounds [4 x i32], ptr %17, i64 0, i64 0
  %145 = load <2 x i64>, ptr %18, align 16, !tbaa !13
  call void @_mm_storeu_si128(ptr noundef %144, <2 x i64> noundef %145)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %159, %140
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %7, align 4, !tbaa !9
  %149 = srem i32 %148, 4
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %151, label %162

151:                                              ; preds = %146
  %152 = load i32, ptr %10, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [4 x i32], ptr %17, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %155, ptr %156, align 4, !tbaa !9
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds i32, ptr %157, i32 1
  store ptr %158, ptr %8, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %151
  %160 = load i32, ptr %10, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %10, align 4, !tbaa !9
  br label %146, !llvm.loop !15

162:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  br label %163

163:                                              ; preds = %162, %108
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %164, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %165

165:                                              ; preds = %163, %45, %40, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %166 = load ptr, ptr %5, align 8
  ret ptr %166
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_set1_epi32(i32 noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_and_si128(<2 x i64> noundef, <2 x i64> noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="128" "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 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @_mm_storeu_si128(ptr noundef, <2 x i64> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_loadu_si128(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress 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: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_or_si128(<2 x i64> noundef, <2 x i64> noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_slli_epi32(<2 x i64> noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_srli_epi32(<2 x i64> noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @simdunpack_length(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca [4 x i32], align 16
  %6 = icmp eq i32 %1, 0
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %4
  switch i32 %3, label %15 [
    i32 0, label %.preheader
    i32 32, label %11
  ]

.preheader:                                       ; preds = %7
  %8 = icmp sgt i32 %1, 0
  br i1 %8, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.preheader
  %9 = zext nneg i32 %1 to i64
  %10 = shl nuw nsw i64 %9, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %2, i8 0, i64 %10, i1 false), !tbaa !5
  br label %.loopexit

11:                                               ; preds = %7
  %12 = sext i32 %1 to i64
  %13 = shl nsw i64 %12, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 16 %0, i64 %13, i1 false)
  %14 = getelementptr inbounds i32, ptr %0, i64 %12
  br label %.loopexit

15:                                               ; preds = %7
  %notmask = shl nsw i32 -1, %3
  %16 = xor i32 %notmask, -1
  %17 = tail call <2 x i64> @_mm_set1_epi32(i32 noundef %16)
  %18 = tail call <2 x i64> @_mm_loadu_si128(ptr noundef %0)
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = sdiv i32 %1, 4
  %21 = srem i32 %1, 4
  %22 = icmp sgt i32 %1, 3
  br i1 %22, label %.lr.ph88, label %._crit_edge

.lr.ph88:                                         ; preds = %15, %34
  %.06687 = phi ptr [ %.1, %34 ], [ %19, %15 ]
  %.06886 = phi <2 x i64> [ %.169, %34 ], [ %18, %15 ]
  %.07085 = phi i32 [ %.171, %34 ], [ 0, %15 ]
  %.07284 = phi ptr [ %36, %34 ], [ %2, %15 ]
  %.17583 = phi i32 [ %37, %34 ], [ 0, %15 ]
  %23 = tail call <2 x i64> @_mm_srli_epi32(<2 x i64> noundef %.06886, i32 noundef %.07085)
  %24 = sub i32 32, %.07085
  %25 = icmp ugt i32 %24, %3
  br i1 %25, label %26, label %28

26:                                               ; preds = %.lr.ph88
  %27 = add i32 %.07085, %3
  br label %34

28:                                               ; preds = %.lr.ph88
  %29 = tail call <2 x i64> @_mm_loadu_si128(ptr noundef %.06687)
  %30 = getelementptr inbounds i8, ptr %.06687, i64 16
  %31 = tail call <2 x i64> @_mm_slli_epi32(<2 x i64> noundef %29, i32 noundef %24)
  %32 = tail call <2 x i64> @_mm_or_si128(<2 x i64> noundef %31, <2 x i64> noundef %23)
  %33 = sub i32 %3, %24
  br label %34

34:                                               ; preds = %28, %26
  %.171 = phi i32 [ %27, %26 ], [ %33, %28 ]
  %.169 = phi <2 x i64> [ %.06886, %26 ], [ %29, %28 ]
  %.067 = phi <2 x i64> [ %23, %26 ], [ %32, %28 ]
  %.1 = phi ptr [ %.06687, %26 ], [ %30, %28 ]
  %35 = tail call <2 x i64> @_mm_and_si128(<2 x i64> noundef %17, <2 x i64> noundef %.067)
  tail call void @_mm_storeu_si128(ptr noundef %.07284, <2 x i64> noundef %35)
  %36 = getelementptr inbounds i8, ptr %.07284, i64 16
  %37 = add nuw nsw i32 %.17583, 1
  %exitcond.not = icmp eq i32 %37, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph88, !llvm.loop !9

._crit_edge:                                      ; preds = %34, %15
  %.072.lcssa = phi ptr [ %2, %15 ], [ %36, %34 ]
  %.070.lcssa = phi i32 [ 0, %15 ], [ %.171, %34 ]
  %.068.lcssa = phi <2 x i64> [ %18, %15 ], [ %.169, %34 ]
  %.066.lcssa = phi ptr [ %19, %15 ], [ %.1, %34 ]
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %.loopexit, label %38

38:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %39 = tail call <2 x i64> @_mm_srli_epi32(<2 x i64> noundef %.068.lcssa, i32 noundef %.070.lcssa)
  %40 = sub i32 32, %.070.lcssa
  %41 = icmp ugt i32 %40, %3
  br i1 %41, label %47, label %42

42:                                               ; preds = %38
  %43 = tail call <2 x i64> @_mm_loadu_si128(ptr noundef %.066.lcssa)
  %44 = getelementptr inbounds i8, ptr %.066.lcssa, i64 16
  %45 = tail call <2 x i64> @_mm_slli_epi32(<2 x i64> noundef %43, i32 noundef %40)
  %46 = tail call <2 x i64> @_mm_or_si128(<2 x i64> noundef %45, <2 x i64> noundef %39)
  br label %47

47:                                               ; preds = %38, %42
  %.2 = phi ptr [ %44, %42 ], [ %.066.lcssa, %38 ]
  %.065 = phi <2 x i64> [ %46, %42 ], [ %39, %38 ]
  %48 = tail call <2 x i64> @_mm_and_si128(<2 x i64> noundef %17, <2 x i64> noundef %.065)
  call void @_mm_storeu_si128(ptr noundef nonnull %5, <2 x i64> noundef %48)
  %49 = icmp sgt i32 %21, 0
  br i1 %49, label %.lr.ph95, label %._crit_edge96

.lr.ph95:                                         ; preds = %47
  %50 = load i32, ptr %5, align 16, !tbaa !5
  store i32 %50, ptr %.072.lcssa, align 4, !tbaa !5
  %exitcond99.not = icmp eq i32 %21, 1
  br i1 %exitcond99.not, label %._crit_edge96, label %.lr.ph95.1, !llvm.loop !11

.lr.ph95.1:                                       ; preds = %.lr.ph95
  %51 = getelementptr inbounds i8, ptr %.072.lcssa, i64 4
  %52 = getelementptr inbounds i8, ptr %5, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %51, align 4, !tbaa !5
  %exitcond99.not.1 = icmp eq i32 %21, 2
  br i1 %exitcond99.not.1, label %._crit_edge96, label %.lr.ph95.2, !llvm.loop !11

.lr.ph95.2:                                       ; preds = %.lr.ph95.1
  %54 = getelementptr inbounds i8, ptr %.072.lcssa, i64 8
  %55 = getelementptr inbounds i8, ptr %5, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !5
  store i32 %56, ptr %54, align 4, !tbaa !5
  br label %._crit_edge96

._crit_edge96:                                    ; preds = %.lr.ph95, %.lr.ph95.1, %.lr.ph95.2, %47
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.preheader, %.preheader, %._crit_edge, %._crit_edge96, %4, %11
  %.0 = phi ptr [ %14, %11 ], [ %0, %4 ], [ %.2, %._crit_edge96 ], [ %.066.lcssa, %._crit_edge ], [ %0, %.preheader ], [ %0, %.lr.ph.preheader ]
  ret ptr %.0
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_set1_epi32(i32 noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_and_si128(<2 x i64> noundef, <2 x i64> noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline nounwind uwtable "min-legal-vector-width"="128" "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="128" "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 nounwind willreturn memory(argmem: write) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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