; LLVM IR from GPUOpen-LibrariesAndSDKs/TAN :: tan/common/wav.ll (ZN10WavContent27Convert16bMonoTo16BitStereoEv)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.WavContent = type <{ i16, i32, i16, i32, %"class.std::vector" }>

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent27Convert16bMonoTo16BitStereoEv(ptr noundef nonnull align 1 dereferenceable(36) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  %12 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 0
  %13 = load i16, ptr %12, align 1, !tbaa !9
  %14 = zext i16 %13 to i32
  %15 = icmp eq i32 %14, 2
  br i1 %15, label %16, label %22

16:                                               ; preds = %1
  %17 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 2
  %18 = load i16, ptr %17, align 1, !tbaa !17
  %19 = zext i16 %18 to i32
  %20 = icmp eq i32 %19, 16
  br i1 %20, label %21, label %22

21:                                               ; preds = %16
  store i1 true, ptr %2, align 1
  br label %76

22:                                               ; preds = %16, %1
  %23 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 0
  %24 = load i16, ptr %23, align 1, !tbaa !9
  %25 = zext i16 %24 to i32
  %26 = icmp ne i32 %25, 1
  br i1 %26, label %32, label %27

27:                                               ; preds = %22
  %28 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 2
  %29 = load i16, ptr %28, align 1, !tbaa !17
  %30 = zext i16 %29 to i32
  %31 = icmp ne i32 %30, 16
  br i1 %31, label %32, label %33

32:                                               ; preds = %27, %22
  store i1 false, ptr %2, align 1
  br label %76

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %34 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 4
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %34) #3
  store ptr %35, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #3
  %36 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 1
  %37 = load i32, ptr %36, align 1, !tbaa !18
  %38 = mul i32 2, %37
  %39 = mul i32 %38, 2
  %40 = zext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 1 dereferenceable(24) %5, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %41 unwind label %49

41:                                               ; preds = %33
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %5) #3
  store ptr %42, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !19
  br label %43

43:                                               ; preds = %70, %41
  %44 = load i32, ptr %10, align 4, !tbaa !19
  %45 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 1
  %46 = load i32, ptr %45, align 1, !tbaa !18
  %47 = icmp ult i32 %44, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %73

49:                                               ; preds = %33
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %7, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %78

53:                                               ; preds = %43
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load i32, ptr %10, align 4, !tbaa !19
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds i16, ptr %54, i64 %56
  %58 = load i16, ptr %57, align 2, !tbaa !20
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !19
  %61 = mul i32 2, %60
  %62 = add i32 %61, 1
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds i16, ptr %59, i64 %63
  store i16 %58, ptr %64, align 2, !tbaa !20
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load i32, ptr %10, align 4, !tbaa !19
  %67 = mul i32 2, %66
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds i16, ptr %65, i64 %68
  store i16 %58, ptr %69, align 2, !tbaa !20
  br label %70

70:                                               ; preds = %53
  %71 = load i32, ptr %10, align 4, !tbaa !19
  %72 = add i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !19
  br label %43, !llvm.loop !21

73:                                               ; preds = %48
  %74 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 4
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24) %74, ptr noundef nonnull align 1 dereferenceable(24) %5) #3
  %75 = getelementptr inbounds %struct.WavContent, ptr %11, i32 0, i32 0
  store i16 2, ptr %75, align 1, !tbaa !9
  unreachable

76:                                               ; preds = %32, %21
  %77 = load i1, ptr %2, align 1
  ret i1 %77

78:                                               ; preds = %49
  %79 = load ptr, ptr %7, align 8
  %80 = load i32, ptr %8, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 1 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

!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++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS10WavContent", !11, i64 0, !12, i64 2, !11, i64 6, !12, i64 8, !13, i64 12}
!11 = !{!"short", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!10, !11, i64 6}
!18 = !{!10, !12, i64 2}
!19 = !{!12, !12, i64 0}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent27Convert16bMonoTo16BitStereoEv(ptr noundef nonnull align 1 dereferenceable(36) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 1
  %3 = alloca %"class.std::allocator", align 1
  %4 = load i16, ptr %0, align 1, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 6
  %6 = load i16, ptr %5, align 1
  %7 = icmp eq i16 %6, 16
  %.not = icmp eq i16 %4, 1
  %or.cond17 = select i1 %.not, i1 %7, i1 false
  br i1 %or.cond17, label %8, label %63

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %9) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  %11 = getelementptr inbounds i8, ptr %0, i64 2
  %12 = load i32, ptr %11, align 1, !tbaa !16
  %13 = shl i32 %12, 2
  %14 = zext i32 %13 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #3
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 1 dereferenceable(24) %2, i64 noundef %14, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %43

15:                                               ; preds = %8
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %2) #3
  %17 = load i32, ptr %11, align 1, !tbaa !16
  %.not19 = icmp eq i32 %17, 0
  br i1 %.not19, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %15
  %wide.trip.count = zext i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 12
  br i1 %min.iters.check, label %.lr.ph.preheader24, label %vector.memcheck

.lr.ph.preheader24:                               ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader24
  %18 = getelementptr inbounds i16, ptr %10, i64 %indvars.iv.ph
  %19 = load i16, ptr %18, align 2, !tbaa !17
  %20 = trunc nuw i64 %indvars.iv.ph to i32
  %21 = shl i32 %20, 1
  %22 = or disjoint i32 %21, 1
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds i16, ptr %16, i64 %23
  store i16 %19, ptr %24, align 2, !tbaa !17
  %25 = zext i32 %21 to i64
  %26 = getelementptr inbounds i16, ptr %16, i64 %25
  store i16 %19, ptr %26, align 2, !tbaa !17
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader24
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader24 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %27 = add nsw i64 %wide.trip.count, -1
  %28 = icmp eq i64 %indvars.iv.ph, %27
  br i1 %28, label %._crit_edge, label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %29 = shl nuw nsw i64 %wide.trip.count, 1
  %scevgep = getelementptr i8, ptr %10, i64 %29
  %30 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep21 = getelementptr i8, ptr %16, i64 %30
  %bound0 = icmp ult ptr %10, %scevgep21
  %bound1 = icmp ult ptr %16, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader24, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %31 = getelementptr inbounds i16, ptr %10, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %wide.load = load <4 x i16>, ptr %31, align 2, !tbaa !17, !alias.scope !18, !noalias !21
  %wide.load22 = load <4 x i16>, ptr %32, align 2, !tbaa !17, !alias.scope !18, !noalias !21
  %33 = shl i64 %index, 1
  %34 = shl i64 %index, 1
  %35 = and i64 %33, 4294967280
  %36 = and i64 %34, 4294967280
  %37 = or disjoint i64 %36, 8
  %38 = getelementptr inbounds i16, ptr %16, i64 %35
  %39 = getelementptr inbounds i16, ptr %16, i64 %37
  %40 = shufflevector <4 x i16> %wide.load, <4 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
  %interleaved.vec = shufflevector <8 x i16> %40, <8 x i16> poison, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
  store <8 x i16> %interleaved.vec, ptr %38, align 2, !tbaa !17
  %41 = shufflevector <4 x i16> %wide.load22, <4 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
  %interleaved.vec23 = shufflevector <8 x i16> %41, <8 x i16> poison, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
  store <8 x i16> %interleaved.vec23, ptr %39, align 2, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader24

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %15
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(24) %2) #3
  unreachable

43:                                               ; preds = %8
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  resume { ptr, i32 } %44

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %45 = getelementptr inbounds i16, ptr %10, i64 %indvars.iv
  %46 = load i16, ptr %45, align 2, !tbaa !17
  %47 = trunc nuw i64 %indvars.iv to i32
  %48 = shl i32 %47, 1
  %49 = or disjoint i32 %48, 1
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds i16, ptr %16, i64 %50
  store i16 %46, ptr %51, align 2, !tbaa !17
  %52 = zext i32 %48 to i64
  %53 = getelementptr inbounds i16, ptr %16, i64 %52
  store i16 %46, ptr %53, align 2, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = getelementptr inbounds i16, ptr %10, i64 %indvars.iv.next
  %55 = load i16, ptr %54, align 2, !tbaa !17
  %56 = trunc nuw i64 %indvars.iv.next to i32
  %57 = shl i32 %56, 1
  %58 = or disjoint i32 %57, 1
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds i16, ptr %16, i64 %59
  store i16 %55, ptr %60, align 2, !tbaa !17
  %61 = zext i32 %57 to i64
  %62 = getelementptr inbounds i16, ptr %16, i64 %61
  store i16 %55, ptr %62, align 2, !tbaa !17
  %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_edge, label %.lr.ph, !llvm.loop !27

63:                                               ; preds = %1
  %64 = icmp eq i16 %4, 2
  %or.cond = select i1 %64, i1 %7, i1 false
  ret i1 %or.cond
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 1 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

!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 = !{!"_ZTS10WavContent", !7, i64 0, !10, i64 2, !7, i64 6, !10, i64 8, !11, i64 12}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!6, !10, i64 2}
!17 = !{!7, !7, i64 0}
!18 = !{!19}
!19 = distinct !{!19, !20}
!20 = distinct !{!20, !"LVerDomain"}
!21 = !{!22}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !25}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass