; LLVM IR from fast-pack/simdcomp :: src (simdcomputil)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.simdmaxbitsd1_length = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @bits(i32 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: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_loadu_si128(ptr noundef) #2

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

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

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

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

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

17:                                               ; preds = %3
  br label %19

18:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 209, ptr noundef @__PRETTY_FUNCTION__.simdmaxbitsd1_length) #6
  unreachable

19:                                               ; preds = %17
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %20, ptr %11, align 8, !tbaa !9
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = call <2 x i64> @_mm_set1_epi32(i32 noundef %21)
  store <2 x i64> %22, ptr %9, align 16, !tbaa !11
  %23 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %23, label %57 [
    i32 1, label %24
    i32 2, label %29
    i32 3, label %43
  ]

24:                                               ; preds = %19
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds i32, ptr %25, i64 0
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = call <2 x i64> @_mm_set1_epi32(i32 noundef %27)
  store <2 x i64> %28, ptr %7, align 16, !tbaa !11
  br label %60

29:                                               ; preds = %19
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds i32, ptr %30, i64 0
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = getelementptr inbounds i32, ptr %33, i64 1
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = getelementptr inbounds i32, ptr %36, i64 1
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds i32, ptr %39, i64 1
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = call <2 x i64> @_mm_setr_epi32(i32 noundef %32, i32 noundef %35, i32 noundef %38, i32 noundef %41)
  store <2 x i64> %42, ptr %7, align 16, !tbaa !11
  br label %60

43:                                               ; preds = %19
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds i32, ptr %44, i64 0
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds i32, ptr %47, i64 1
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = getelementptr inbounds i32, ptr %50, i64 2
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds i32, ptr %53, i64 2
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = call <2 x i64> @_mm_setr_epi32(i32 noundef %46, i32 noundef %49, i32 noundef %52, i32 noundef %55)
  store <2 x i64> %56, ptr %7, align 16, !tbaa !11
  br label %60

57:                                               ; preds = %19
  %58 = load ptr, ptr %11, align 8, !tbaa !9
  %59 = call <2 x i64> @_mm_loadu_si128(ptr noundef %58)
  store <2 x i64> %59, ptr %7, align 16, !tbaa !11
  br label %60

60:                                               ; preds = %57, %43, %29, %24
  %61 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  %62 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  %63 = bitcast <2 x i64> %62 to <16 x i8>
  %64 = shufflevector <16 x i8> zeroinitializer, <16 x i8> %63, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %65 = bitcast <16 x i8> %64 to <2 x i64>
  %66 = load <2 x i64>, ptr %9, align 16, !tbaa !11
  %67 = bitcast <2 x i64> %66 to <16 x i8>
  %68 = shufflevector <16 x i8> %67, <16 x i8> zeroinitializer, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %69 = bitcast <16 x i8> %68 to <2 x i64>
  %70 = call <2 x i64> @_mm_or_si128(<2 x i64> noundef %65, <2 x i64> noundef %69)
  %71 = call <2 x i64> @_mm_sub_epi32(<2 x i64> noundef %61, <2 x i64> noundef %70)
  store <2 x i64> %71, ptr %10, align 16, !tbaa !11
  %72 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  store <2 x i64> %72, ptr %8, align 16, !tbaa !11
  br label %73

73:                                               ; preds = %79, %60
  %74 = load i32, ptr %13, align 4, !tbaa !5
  %75 = mul i32 %74, 4
  %76 = add i32 %75, 4
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = icmp ule i32 %76, %77
  br i1 %78, label %79, label %101

79:                                               ; preds = %73
  %80 = load ptr, ptr %11, align 8, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds <2 x i64>, ptr %80, i64 %82
  %84 = call <2 x i64> @_mm_loadu_si128(ptr noundef %83)
  store <2 x i64> %84, ptr %7, align 16, !tbaa !11
  %85 = load <2 x i64>, ptr %10, align 16, !tbaa !11
  %86 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  %87 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  %88 = bitcast <2 x i64> %87 to <16 x i8>
  %89 = shufflevector <16 x i8> zeroinitializer, <16 x i8> %88, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %90 = bitcast <16 x i8> %89 to <2 x i64>
  %91 = load <2 x i64>, ptr %8, align 16, !tbaa !11
  %92 = bitcast <2 x i64> %91 to <16 x i8>
  %93 = shufflevector <16 x i8> %92, <16 x i8> zeroinitializer, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %94 = bitcast <16 x i8> %93 to <2 x i64>
  %95 = call <2 x i64> @_mm_or_si128(<2 x i64> noundef %90, <2 x i64> noundef %94)
  %96 = call <2 x i64> @_mm_sub_epi32(<2 x i64> noundef %86, <2 x i64> noundef %95)
  %97 = call <2 x i64> @_mm_or_si128(<2 x i64> noundef %85, <2 x i64> noundef %96)
  store <2 x i64> %97, ptr %10, align 16, !tbaa !11
  %98 = load <2 x i64>, ptr %7, align 16, !tbaa !11
  store <2 x i64> %98, ptr %8, align 16, !tbaa !11
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = add i32 %99, 1
  store i32 %100, ptr %13, align 4, !tbaa !5
  br label %73, !llvm.loop !12

101:                                              ; preds = %73
  %102 = getelementptr inbounds [4 x i32], ptr %12, i64 0, i64 0
  %103 = load <2 x i64>, ptr %10, align 16, !tbaa !11
  call void @_mm_storeu_si128(ptr noundef %102, <2 x i64> noundef %103)
  %104 = getelementptr inbounds [4 x i32], ptr %12, i64 0, i64 0
  %105 = load i32, ptr %104, align 16, !tbaa !5
  %106 = getelementptr inbounds [4 x i32], ptr %12, i64 0, i64 1
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = or i32 %105, %107
  %109 = getelementptr inbounds [4 x i32], ptr %12, i64 0, i64 2
  %110 = load i32, ptr %109, align 8, !tbaa !5
  %111 = or i32 %108, %110
  %112 = getelementptr inbounds [4 x i32], ptr %12, i64 0, i64 3
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = or i32 %111, %113
  store i32 %114, ptr %14, align 4, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = mul i32 %115, 4
  store i32 %116, ptr %13, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %143, %101
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = icmp ult i32 %118, %119
  br i1 %120, label %121, label %146

121:                                              ; preds = %117
  %122 = load ptr, ptr %5, align 8, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %13, align 4, !tbaa !5
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %131

129:                                              ; preds = %121
  %130 = load i32, ptr %4, align 4, !tbaa !5
  br label %138

131:                                              ; preds = %121
  %132 = load ptr, ptr %5, align 8, !tbaa !9
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = sub i32 %133, 1
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %132, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %131, %129
  %139 = phi i32 [ %130, %129 ], [ %137, %131 ]
  %140 = sub i32 %126, %139
  %141 = load i32, ptr %14, align 4, !tbaa !5
  %142 = or i32 %141, %140
  store i32 %142, ptr %14, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %138
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = add i32 %144, 1
  store i32 %145, ptr %13, align 4, !tbaa !5
  br label %117, !llvm.loop !14

146:                                              ; preds = %117
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = call i32 @bits(i32 noundef %147)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  ret i32 %148
}

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

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

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

attributes #0 = { 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 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; 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 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@__PRETTY_FUNCTION__.simdmaxbitsd1_length = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @bits(i32 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: alwaysinline nounwind uwtable
declare hidden <2 x i64> @_mm_loadu_si128(ptr noundef) local_unnamed_addr #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 #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @simdmaxbitsd1_length(i32 noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca [4 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %5, label %6

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 209, ptr noundef nonnull @__PRETTY_FUNCTION__.simdmaxbitsd1_length) #7
  unreachable

6:                                                ; preds = %3
  %7 = tail call <2 x i64> @_mm_set1_epi32(i32 noundef %0)
  switch i32 %2, label %23 [
    i32 1, label %8
    i32 2, label %11
    i32 3, label %16
  ]

8:                                                ; preds = %6
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = tail call <2 x i64> @_mm_set1_epi32(i32 noundef %9)
  br label %25

11:                                               ; preds = %6
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %1, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = tail call <2 x i64> @_mm_setr_epi32(i32 noundef %12, i32 noundef %14, i32 noundef %14, i32 noundef %14)
  br label %25

16:                                               ; preds = %6
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %1, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = tail call <2 x i64> @_mm_setr_epi32(i32 noundef %17, i32 noundef %19, i32 noundef %21, i32 noundef %21)
  br label %25

23:                                               ; preds = %6
  %24 = tail call <2 x i64> @_mm_loadu_si128(ptr noundef %1)
  br label %25

25:                                               ; preds = %23, %16, %11, %8
  %.041 = phi <2 x i64> [ %24, %23 ], [ %22, %16 ], [ %15, %11 ], [ %10, %8 ]
  %26 = bitcast <2 x i64> %.041 to <16 x i8>
  %27 = shufflevector <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0>, <16 x i8> %26, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %28 = bitcast <16 x i8> %27 to <2 x i64>
  %29 = bitcast <2 x i64> %7 to <16 x i8>
  %30 = shufflevector <16 x i8> %29, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 poison, i8 poison, i8 poison, i8 poison>, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %31 = bitcast <16 x i8> %30 to <2 x i64>
  %32 = tail call <2 x i64> @_mm_or_si128(<2 x i64> noundef %28, <2 x i64> noundef %31)
  %33 = tail call <2 x i64> @_mm_sub_epi32(<2 x i64> noundef %.041, <2 x i64> noundef %32)
  %.not4546 = icmp ult i32 %2, 8
  br i1 %.not4546, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %25, %.lr.ph
  %.04049 = phi i32 [ %46, %.lr.ph ], [ 1, %25 ]
  %.04248 = phi <2 x i64> [ %45, %.lr.ph ], [ %33, %25 ]
  %.04347 = phi <2 x i64> [ %36, %.lr.ph ], [ %.041, %25 ]
  %34 = zext i32 %.04049 to i64
  %35 = getelementptr inbounds <2 x i64>, ptr %1, i64 %34
  %36 = tail call <2 x i64> @_mm_loadu_si128(ptr noundef %35)
  %37 = bitcast <2 x i64> %36 to <16 x i8>
  %38 = shufflevector <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0>, <16 x i8> %37, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %39 = bitcast <16 x i8> %38 to <2 x i64>
  %40 = bitcast <2 x i64> %.04347 to <16 x i8>
  %41 = shufflevector <16 x i8> %40, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 poison, i8 poison, i8 poison, i8 poison>, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
  %42 = bitcast <16 x i8> %41 to <2 x i64>
  %43 = tail call <2 x i64> @_mm_or_si128(<2 x i64> noundef %39, <2 x i64> noundef %42)
  %44 = tail call <2 x i64> @_mm_sub_epi32(<2 x i64> noundef %36, <2 x i64> noundef %43)
  %45 = tail call <2 x i64> @_mm_or_si128(<2 x i64> noundef %.04248, <2 x i64> noundef %44)
  %46 = add i32 %.04049, 1
  %47 = shl i32 %46, 2
  %48 = add i32 %47, 4
  %.not45 = icmp ugt i32 %48, %2
  br i1 %.not45, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %25
  %.042.lcssa = phi <2 x i64> [ %33, %25 ], [ %45, %.lr.ph ]
  %.lcssa = phi i32 [ 4, %25 ], [ %47, %.lr.ph ]
  call void @_mm_storeu_si128(ptr noundef nonnull %4, <2 x i64> noundef %.042.lcssa)
  %49 = load <4 x i32>, ptr %4, align 16, !tbaa !5
  %50 = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %49)
  %51 = icmp ult i32 %.lcssa, %2
  br i1 %51, label %.lr.ph54.preheader, label %._crit_edge55

.lr.ph54.preheader:                               ; preds = %._crit_edge
  %52 = zext i32 %.lcssa to i64
  %wide.trip.count = zext i32 %2 to i64
  %invariant.gep = getelementptr i8, ptr %1, i64 -4
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph54.prol.loopexit, label %.lr.ph54.prol

.lr.ph54.prol:                                    ; preds = %.lr.ph54.preheader
  %53 = getelementptr inbounds i32, ptr %1, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp eq i32 %.lcssa, 0
  br i1 %55, label %.lr.ph54.prol.loopexit.unr-lcssa, label %56

56:                                               ; preds = %.lr.ph54.prol
  %gep.prol = getelementptr i32, ptr %invariant.gep, i64 %52
  %57 = load i32, ptr %gep.prol, align 4, !tbaa !5
  br label %.lr.ph54.prol.loopexit.unr-lcssa

.lr.ph54.prol.loopexit.unr-lcssa:                 ; preds = %56, %.lr.ph54.prol
  %58 = phi i32 [ %57, %56 ], [ %0, %.lr.ph54.prol ]
  %59 = sub i32 %54, %58
  %60 = or i32 %59, %50
  %indvars.iv.next.prol = or disjoint i64 %52, 1
  br label %.lr.ph54.prol.loopexit

.lr.ph54.prol.loopexit:                           ; preds = %.lr.ph54.prol.loopexit.unr-lcssa, %.lr.ph54.preheader
  %.lcssa67.unr = phi i32 [ poison, %.lr.ph54.preheader ], [ %60, %.lr.ph54.prol.loopexit.unr-lcssa ]
  %indvars.iv.unr = phi i64 [ %52, %.lr.ph54.preheader ], [ %indvars.iv.next.prol, %.lr.ph54.prol.loopexit.unr-lcssa ]
  %.052.unr = phi i32 [ %50, %.lr.ph54.preheader ], [ %60, %.lr.ph54.prol.loopexit.unr-lcssa ]
  %61 = add nsw i64 %wide.trip.count, -1
  %62 = icmp eq i64 %61, %52
  br i1 %62, label %._crit_edge55, label %.lr.ph54.preheader.new

.lr.ph54.preheader.new:                           ; preds = %.lr.ph54.prol.loopexit
  %invariant.gep73 = getelementptr i8, ptr %1, i64 4
  br label %.lr.ph54

.lr.ph54:                                         ; preds = %.lr.ph54.1, %.lr.ph54.preheader.new
  %indvars.iv = phi i64 [ %indvars.iv.unr, %.lr.ph54.preheader.new ], [ %indvars.iv.next.1, %.lr.ph54.1 ]
  %.052 = phi i32 [ %.052.unr, %.lr.ph54.preheader.new ], [ %73, %.lr.ph54.1 ]
  %63 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp eq i64 %indvars.iv, 0
  br i1 %65, label %.lr.ph54.1, label %66

66:                                               ; preds = %.lr.ph54
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv
  %67 = load i32, ptr %gep, align 4, !tbaa !5
  br label %.lr.ph54.1

.lr.ph54.1:                                       ; preds = %.lr.ph54, %66
  %68 = phi i32 [ %67, %66 ], [ %0, %.lr.ph54 ]
  %69 = sub i32 %64, %68
  %70 = or i32 %69, %.052
  %gep74 = getelementptr i32, ptr %invariant.gep73, i64 %indvars.iv
  %71 = load i32, ptr %gep74, align 4, !tbaa !5
  %72 = sub i32 %71, %64
  %73 = or i32 %72, %70
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge55, label %.lr.ph54, !llvm.loop !11

._crit_edge55:                                    ; preds = %.lr.ph54.prol.loopexit, %.lr.ph54.1, %._crit_edge
  %.0.lcssa = phi i32 [ %50, %._crit_edge ], [ %.lcssa67.unr, %.lr.ph54.prol.loopexit ], [ %73, %.lr.ph54.1 ]
  %74 = call i32 @bits(i32 noundef %.0.lcssa)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  ret i32 %74
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.or.v4i32(<4 x i32>) #5

attributes #0 = { 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 = { 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 #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass