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

; 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 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 uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent19Convert2Stereo16BitEv(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 %"class.std::vector", align 1
  %5 = alloca %"class.std::allocator", align 1
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i16, align 2
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i16, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %21 = load i16, ptr %20, align 1, !tbaa !9
  %22 = zext i16 %21 to i32
  %23 = icmp eq i32 2, %22
  br i1 %23, label %24, label %30

24:                                               ; preds = %1
  %25 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 2
  %26 = load i16, ptr %25, align 1, !tbaa !17
  %27 = zext i16 %26 to i32
  %28 = icmp eq i32 16, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i1 true, ptr %2, align 1
  br label %190

30:                                               ; preds = %24, %1
  %31 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %32 = load i16, ptr %31, align 1, !tbaa !9
  %33 = zext i16 %32 to i32
  %34 = icmp sgt i32 %33, 2
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  store i1 false, ptr %2, align 1
  br label %190

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #3
  %37 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 1
  %38 = load i32, ptr %37, align 1, !tbaa !18
  %39 = mul i32 2, %38
  %40 = mul i32 %39, 2
  %41 = zext i32 %40 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 1 dereferenceable(24) %4, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %42 unwind label %50

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

44:                                               ; preds = %180, %42
  %45 = load i32, ptr %9, align 4, !tbaa !19
  %46 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 1
  %47 = load i32, ptr %46, align 1, !tbaa !18
  %48 = icmp ult i32 %45, %47
  br i1 %48, label %54, label %49

49:                                               ; preds = %44
  store i32 2, ptr %10, align 4
  br label %183

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

54:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %55 = load i32, ptr %9, align 4, !tbaa !19
  %56 = mul i32 %55, 2
  %57 = add i32 %56, 0
  store i32 %57, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %58 = load i32, ptr %9, align 4, !tbaa !19
  %59 = mul i32 %58, 2
  %60 = add i32 %59, 1
  store i32 %60, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #3
  store i16 0, ptr %13, align 2, !tbaa !20
  br label %61

61:                                               ; preds = %171, %54
  %62 = load i16, ptr %13, align 2, !tbaa !20
  %63 = zext i16 %62 to i32
  %64 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %65 = load i16, ptr %64, align 1, !tbaa !9
  %66 = zext i16 %65 to i32
  %67 = icmp slt i32 %63, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %61
  store i32 5, ptr %10, align 4
  br label %174

69:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store float 0.000000e+00, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %70 = load i32, ptr %9, align 4, !tbaa !19
  %71 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %72 = load i16, ptr %71, align 1, !tbaa !9
  %73 = zext i16 %72 to i32
  %74 = mul i32 %70, %73
  %75 = load i16, ptr %13, align 2, !tbaa !20
  %76 = zext i16 %75 to i32
  %77 = add i32 %74, %76
  store i32 %77, ptr %15, align 4, !tbaa !19
  %78 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 2
  %79 = load i16, ptr %78, align 1, !tbaa !17
  %80 = zext i16 %79 to i32
  %81 = icmp eq i32 8, %80
  br i1 %81, label %82, label %92

82:                                               ; preds = %69
  %83 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 4
  %84 = load i32, ptr %15, align 4, !tbaa !19
  %85 = zext i32 %84 to i64
  %86 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 1 dereferenceable(24) %83, i64 noundef %85) #3
  %87 = load i8, ptr %86, align 1, !tbaa !23
  %88 = zext i8 %87 to i32
  %89 = sub nsw i32 %88, 127
  %90 = sitofp i32 %89 to float
  %91 = fdiv float %90, 2.560000e+02
  store float %91, ptr %14, align 4, !tbaa !21
  br label %123

92:                                               ; preds = %69
  %93 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 2
  %94 = load i16, ptr %93, align 1, !tbaa !17
  %95 = zext i16 %94 to i32
  %96 = icmp eq i32 16, %95
  br i1 %96, label %97, label %107

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %98 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 4
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %98) #3
  store ptr %99, ptr %16, align 8, !tbaa !5
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i32, ptr %15, align 4, !tbaa !19
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds i16, ptr %100, i64 %102
  %104 = load i16, ptr %103, align 2, !tbaa !20
  %105 = sitofp i16 %104 to float
  %106 = fdiv float %105, 3.276800e+04
  store float %106, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %122

107:                                              ; preds = %92
  %108 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 2
  %109 = load i16, ptr %108, align 1, !tbaa !17
  %110 = zext i16 %109 to i32
  %111 = icmp eq i32 32, %110
  br i1 %111, label %112, label %120

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %113 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 4
  %114 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %113) #3
  store ptr %114, ptr %17, align 8, !tbaa !5
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = load i32, ptr %15, align 4, !tbaa !19
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds float, ptr %115, i64 %117
  %119 = load float, ptr %118, align 4, !tbaa !21
  store float %119, ptr %14, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %121

120:                                              ; preds = %107
  store i1 false, ptr %2, align 1
  store i32 1, ptr %10, align 4
  br label %168

121:                                              ; preds = %112
  br label %122

122:                                              ; preds = %121, %97
  br label %123

123:                                              ; preds = %122, %82
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #3
  %124 = load float, ptr %14, align 4, !tbaa !21
  %125 = fmul float %124, 3.276800e+04
  %126 = fptosi float %125 to i16
  store i16 %126, ptr %18, align 2, !tbaa !20
  %127 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %128 = load i16, ptr %127, align 1, !tbaa !9
  %129 = zext i16 %128 to i32
  %130 = icmp eq i32 1, %129
  br i1 %130, label %131, label %141

131:                                              ; preds = %123
  %132 = load i16, ptr %18, align 2, !tbaa !20
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load i32, ptr %12, align 4, !tbaa !19
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i16, ptr %133, i64 %135
  store i16 %132, ptr %136, align 2, !tbaa !20
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load i32, ptr %11, align 4, !tbaa !19
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i16, ptr %137, i64 %139
  store i16 %132, ptr %140, align 2, !tbaa !20
  br label %166

141:                                              ; preds = %123
  %142 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  %143 = load i16, ptr %142, align 1, !tbaa !9
  %144 = zext i16 %143 to i32
  %145 = icmp eq i32 2, %144
  br i1 %145, label %146, label %164

146:                                              ; preds = %141
  %147 = load i16, ptr %13, align 2, !tbaa !20
  %148 = zext i16 %147 to i32
  %149 = and i32 %148, 1
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %157

151:                                              ; preds = %146
  %152 = load i16, ptr %18, align 2, !tbaa !20
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !19
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds i16, ptr %153, i64 %155
  store i16 %152, ptr %156, align 2, !tbaa !20
  br label %163

157:                                              ; preds = %146
  %158 = load i16, ptr %18, align 2, !tbaa !20
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = load i32, ptr %11, align 4, !tbaa !19
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds i16, ptr %159, i64 %161
  store i16 %158, ptr %162, align 2, !tbaa !20
  br label %163

163:                                              ; preds = %157, %151
  br label %165

164:                                              ; preds = %141
  store i1 false, ptr %2, align 1
  store i32 1, ptr %10, align 4
  br label %167

165:                                              ; preds = %163
  br label %166

166:                                              ; preds = %165, %131
  store i32 0, ptr %10, align 4
  br label %167

167:                                              ; preds = %166, %164
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #3
  br label %168

168:                                              ; preds = %167, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %169 = load i32, ptr %10, align 4
  switch i32 %169, label %174 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %170
  %172 = load i16, ptr %13, align 2, !tbaa !20
  %173 = add i16 %172, 1
  store i16 %173, ptr %13, align 2, !tbaa !20
  br label %61, !llvm.loop !24

174:                                              ; preds = %168, %68
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #3
  %175 = load i32, ptr %10, align 4
  switch i32 %175, label %177 [
    i32 5, label %176
  ]

176:                                              ; preds = %174
  store i32 0, ptr %10, align 4
  br label %177

177:                                              ; preds = %176, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  %178 = load i32, ptr %10, align 4
  switch i32 %178, label %183 [
    i32 0, label %179
  ]

179:                                              ; preds = %177
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %9, align 4, !tbaa !19
  %182 = add i32 %181, 1
  store i32 %182, ptr %9, align 4, !tbaa !19
  br label %44, !llvm.loop !26

183:                                              ; preds = %177, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %184 = load i32, ptr %10, align 4
  switch i32 %184, label %189 [
    i32 2, label %185
  ]

185:                                              ; preds = %183
  %186 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 4
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24) %186, ptr noundef nonnull align 1 dereferenceable(24) %4) #3
  %187 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 0
  store i16 2, ptr %187, align 1, !tbaa !9
  %188 = getelementptr inbounds %struct.WavContent, ptr %19, i32 0, i32 2
  store i16 16, ptr %188, align 1, !tbaa !17
  store i1 true, ptr %2, align 1
  store i32 1, ptr %10, align 4
  br label %189

189:                                              ; preds = %185, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 1 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  br label %190

190:                                              ; preds = %189, %35, %29
  %191 = load i1, ptr %2, align 1
  ret i1 %191

192:                                              ; preds = %50
  %193 = load ptr, ptr %6, align 8
  %194 = load i32, ptr %7, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 1 dereferenceable(24)) 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 = { 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 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


; 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 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 uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent19Convert2Stereo16BitEv(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 = icmp eq i16 %4, 2
  %6 = getelementptr inbounds i8, ptr %0, i64 6
  %7 = load i16, ptr %6, align 1
  %8 = icmp eq i16 %7, 16
  %or.cond = select i1 %5, i1 %8, i1 false
  br i1 %or.cond, label %72, label %9

9:                                                ; preds = %1
  %10 = icmp ugt i16 %4, 2
  br i1 %10, label %72, label %11

11:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 2
  %13 = load i32, ptr %12, align 1, !tbaa !16
  %14 = shl i32 %13, 2
  %15 = zext i32 %14 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 %15, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %16 unwind label %21

16:                                               ; preds = %11
  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
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %2) #3
  %18 = load i32, ptr %12, align 1, !tbaa !16
  %.not4859 = icmp eq i32 %18, 0
  br i1 %.not4859, label %.critedge52, label %.lr.ph62

.lr.ph62:                                         ; preds = %16
  %19 = getelementptr inbounds i8, ptr %0, i64 12
  %20 = load i16, ptr %0, align 1, !tbaa !5
  %.not63 = icmp eq i16 %20, 0
  br i1 %.not63, label %.critedge52, label %.lr.ph62.split

21:                                               ; preds = %11
  %22 = 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 } %22

.lr.ph62.split:                                   ; preds = %.lr.ph62, %.critedge
  %23 = phi i32 [ %68, %.critedge ], [ %18, %.lr.ph62 ]
  %24 = phi i16 [ %69, %.critedge ], [ %20, %.lr.ph62 ]
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.critedge ], [ 0, %.lr.ph62 ]
  %.not4757.not = icmp eq i16 %24, 0
  br i1 %.not4757.not, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph62.split
  %25 = trunc nuw i64 %indvars.iv68 to i32
  %26 = shl i32 %25, 1
  %27 = or disjoint i32 %26, 1
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds i16, ptr %17, i64 %28
  %30 = zext i32 %26 to i64
  %31 = getelementptr inbounds i16, ptr %17, i64 %30
  br label %32

32:                                               ; preds = %.lr.ph, %65
  %indvars.iv = phi i32 [ 0, %.lr.ph ], [ %indvars.iv.next, %65 ]
  %33 = phi i16 [ %24, %.lr.ph ], [ %66, %65 ]
  %34 = zext i16 %33 to i32
  %35 = mul i32 %25, %34
  %36 = add i32 %35, %indvars.iv
  %37 = load i16, ptr %6, align 1, !tbaa !17
  switch i16 %37, label %.loopexit [
    i16 8, label %38
    i16 16, label %46
    i16 32, label %53
  ]

38:                                               ; preds = %32
  %39 = zext i32 %36 to i64
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 1 dereferenceable(24) %19, i64 noundef %39) #3
  %41 = load i8, ptr %40, align 1, !tbaa !18
  %42 = zext i8 %41 to i32
  %43 = add nsw i32 %42, -127
  %44 = sitofp i32 %43 to float
  %45 = fmul float %44, 3.906250e-03
  br label %58

46:                                               ; preds = %32
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %19) #3
  %48 = zext i32 %36 to i64
  %49 = getelementptr inbounds i16, ptr %47, i64 %48
  %50 = load i16, ptr %49, align 2, !tbaa !19
  %51 = sitofp i16 %50 to float
  %52 = fmul float %51, 0x3F00000000000000
  br label %58

53:                                               ; preds = %32
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %19) #3
  %55 = zext i32 %36 to i64
  %56 = getelementptr inbounds float, ptr %54, i64 %55
  %57 = load float, ptr %56, align 4, !tbaa !20
  br label %58

58:                                               ; preds = %46, %53, %38
  %.042 = phi float [ %45, %38 ], [ %52, %46 ], [ %57, %53 ]
  %59 = fmul float %.042, 3.276800e+04
  %60 = fptosi float %59 to i16
  %61 = load i16, ptr %0, align 1, !tbaa !5
  switch i16 %61, label %.loopexit [
    i16 1, label %62
    i16 2, label %63
  ]

62:                                               ; preds = %58
  store i16 %60, ptr %29, align 2, !tbaa !19
  br label %65

63:                                               ; preds = %58
  %64 = and i32 %indvars.iv, 1
  %.not = icmp eq i32 %64, 0
  %. = select i1 %.not, ptr %31, ptr %29
  br label %65

65:                                               ; preds = %63, %62
  %.sink = phi ptr [ %31, %62 ], [ %., %63 ]
  store i16 %60, ptr %.sink, align 2, !tbaa !19
  %indvars.iv.next = add nuw nsw i32 %indvars.iv, 1
  %66 = load i16, ptr %0, align 1, !tbaa !5
  %67 = zext i16 %66 to i32
  %.not47 = icmp ult i32 %indvars.iv.next, %67
  br i1 %.not47, label %32, label %.critedge.loopexit, !llvm.loop !22

.critedge.loopexit:                               ; preds = %65
  %.pre = load i32, ptr %12, align 1, !tbaa !16
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph62.split
  %68 = phi i32 [ %.pre, %.critedge.loopexit ], [ %23, %.lr.ph62.split ]
  %69 = phi i16 [ %66, %.critedge.loopexit ], [ 0, %.lr.ph62.split ]
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %70 = zext i32 %68 to i64
  %.not48.not = icmp ult i64 %indvars.iv.next69, %70
  br i1 %.not48.not, label %.lr.ph62.split, label %.critedge52, !llvm.loop !24

.critedge52:                                      ; preds = %.critedge, %.lr.ph62, %16
  %71 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 1 dereferenceable(24) %71, ptr noundef nonnull align 1 dereferenceable(24) %2) #3
  store i16 2, ptr %0, align 1, !tbaa !5
  store i16 16, ptr %6, align 1, !tbaa !17
  br label %.loopexit

.loopexit:                                        ; preds = %32, %58, %.critedge52
  %.not4856 = phi i1 [ true, %.critedge52 ], [ false, %58 ], [ false, %32 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 1 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  br label %72

72:                                               ; preds = %9, %1, %.loopexit
  %.7 = phi i1 [ %.not4856, %.loopexit ], [ true, %1 ], [ false, %9 ]
  ret i1 %.7
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 1 dereferenceable(24)) 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 = !{!6, !7, i64 6}
!18 = !{!8, !8, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23, !25}
!25 = !{!"llvm.loop.unswitch.partial.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass