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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.RiffWave = type { %struct.RiffHeader, %struct.WaveHeader }
%struct.RiffHeader = type { [4 x i8], i32 }
%struct.WaveHeader = type { [4 x i8], %struct.WaveFormat, %struct.DataHeader }
%struct.WaveFormat = type { [4 x i8], i32, %struct.WaveInfo }
%struct.WaveInfo = type { i16, i16, i32, i32, i16, i16 }
%struct.DataHeader = type { [4 x i8], i32 }
%"class.std::chrono::duration" = type { i64 }
%struct.WavContent = type <{ i16, i32, i16, i32, %"class.std::vector" }>
%"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 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

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

declare noundef signext i8 @_Z7fopen_sPP8_IO_FILEPKcS3_(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent12ReadWaveFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(36) %0, ptr noundef nonnull align 1 dereferenceable(32) %1) #4 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.RiffWave, align 1
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::chrono::duration", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @_ZN10WavContent5ResetEv(ptr noundef nonnull align 1 dereferenceable(36) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store ptr null, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32) %15) #8
  %17 = call noundef signext i8 @_Z7fopen_sPP8_IO_FILEPKcS3_(ptr noundef %6, ptr noundef %16, ptr noundef @.str)
  %18 = sext i8 %17 to i32
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %25

20:                                               ; preds = %2
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.17)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 1 dereferenceable(32) %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %286

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 44, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 1 %8, i8 0, i64 44, i1 false)
  %26 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 0
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call i64 @fread(ptr noundef %26, i64 noundef 8, i64 noundef 1, ptr noundef %27)
  %29 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 0
  %30 = getelementptr inbounds %struct.RiffHeader, ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds [4 x i8], ptr %30, i64 0, i64 0
  %32 = call i32 @memcmp(ptr noundef %31, ptr noundef @.str.2, i64 noundef 4) #9
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %40

34:                                               ; preds = %25
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.18)
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 1 dereferenceable(32) %36)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.19)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %285

40:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %41

41:                                               ; preds = %60, %40
  %42 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %43 = getelementptr inbounds %struct.WaveHeader, ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds [4 x i8], ptr %43, i64 0, i64 0
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call i64 @fread(ptr noundef %44, i64 noundef 4, i64 noundef 1, ptr noundef %45)
  store i64 %46, ptr %10, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %48 = getelementptr inbounds %struct.WaveHeader, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds [4 x i8], ptr %48, i64 0, i64 0
  %50 = call i32 @memcmp(ptr noundef %49, ptr noundef @.str.4, i64 noundef 4) #9
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %41
  br label %63

53:                                               ; preds = %41
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = call i64 @fread(ptr noundef %9, i64 noundef 4, i64 noundef 1, ptr noundef %54)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = call i32 @fseek(ptr noundef %56, i64 noundef %58, i32 noundef 1)
  br label %60

60:                                               ; preds = %53
  %61 = load i64, ptr %10, align 8, !tbaa !11
  %62 = icmp ugt i64 %61, 0
  br i1 %62, label %41, label %63, !llvm.loop !13

63:                                               ; preds = %60, %52
  br label %64

64:                                               ; preds = %85, %63
  %65 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %66 = getelementptr inbounds %struct.WaveHeader, ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds %struct.WaveFormat, ptr %66, i32 0, i32 0
  %68 = getelementptr inbounds [4 x i8], ptr %67, i64 0, i64 0
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call i64 @fread(ptr noundef %68, i64 noundef 4, i64 noundef 1, ptr noundef %69)
  store i64 %70, ptr %10, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %72 = getelementptr inbounds %struct.WaveHeader, ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds %struct.WaveFormat, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds [4 x i8], ptr %73, i64 0, i64 0
  %75 = call i32 @memcmp(ptr noundef %74, ptr noundef @.str.5, i64 noundef 4) #9
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %64
  br label %88

78:                                               ; preds = %64
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call i64 @fread(ptr noundef %9, i64 noundef 4, i64 noundef 1, ptr noundef %79)
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = call i32 @fseek(ptr noundef %81, i64 noundef %83, i32 noundef 1)
  br label %85

85:                                               ; preds = %78
  %86 = load i64, ptr %10, align 8, !tbaa !11
  %87 = icmp ugt i64 %86, 0
  br i1 %87, label %64, label %88, !llvm.loop !15

88:                                               ; preds = %85, %77
  %89 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %90 = getelementptr inbounds %struct.WaveHeader, ptr %89, i32 0, i32 1
  %91 = getelementptr inbounds %struct.WaveFormat, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = call i64 @fread(ptr noundef %91, i64 noundef 4, i64 noundef 1, ptr noundef %92)
  %94 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %95 = getelementptr inbounds %struct.WaveHeader, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct.WaveFormat, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call i64 @fread(ptr noundef %96, i64 noundef 16, i64 noundef 1, ptr noundef %97)
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %101 = getelementptr inbounds %struct.WaveHeader, ptr %100, i32 0, i32 1
  %102 = getelementptr inbounds %struct.WaveFormat, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 1, !tbaa !16
  %104 = sub i32 %103, 16
  %105 = zext i32 %104 to i64
  %106 = call i32 @fseek(ptr noundef %99, i64 noundef %105, i32 noundef 1)
  %107 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %108 = getelementptr inbounds %struct.WaveHeader, ptr %107, i32 0, i32 2
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = call i64 @fread(ptr noundef %108, i64 noundef 8, i64 noundef 1, ptr noundef %109)
  br label %111

111:                                              ; preds = %118, %88
  %112 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %113 = getelementptr inbounds %struct.WaveHeader, ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds %struct.DataHeader, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds [4 x i8], ptr %114, i64 0, i64 0
  %116 = call i32 @memcmp(ptr noundef %115, ptr noundef @.str.6, i64 noundef 4) #9
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %130

118:                                              ; preds = %111
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %121 = getelementptr inbounds %struct.WaveHeader, ptr %120, i32 0, i32 2
  %122 = getelementptr inbounds %struct.DataHeader, ptr %121, i32 0, i32 1
  %123 = load i32, ptr %122, align 1, !tbaa !24
  %124 = zext i32 %123 to i64
  %125 = call i32 @fseek(ptr noundef %119, i64 noundef %124, i32 noundef 1)
  %126 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %127 = getelementptr inbounds %struct.WaveHeader, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = call i64 @fread(ptr noundef %127, i64 noundef 8, i64 noundef 1, ptr noundef %128)
  br label %111, !llvm.loop !25

130:                                              ; preds = %111
  %131 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %132 = getelementptr inbounds %struct.WaveHeader, ptr %131, i32 0, i32 1
  %133 = getelementptr inbounds %struct.WaveFormat, ptr %132, i32 0, i32 2
  %134 = getelementptr inbounds %struct.WaveInfo, ptr %133, i32 0, i32 5
  %135 = load i16, ptr %134, align 1, !tbaa !26
  %136 = zext i16 %135 to i32
  %137 = icmp ne i32 %136, 8
  br i1 %137, label %138, label %159

138:                                              ; preds = %130
  %139 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %140 = getelementptr inbounds %struct.WaveHeader, ptr %139, i32 0, i32 1
  %141 = getelementptr inbounds %struct.WaveFormat, ptr %140, i32 0, i32 2
  %142 = getelementptr inbounds %struct.WaveInfo, ptr %141, i32 0, i32 5
  %143 = load i16, ptr %142, align 1, !tbaa !26
  %144 = zext i16 %143 to i32
  %145 = icmp ne i32 %144, 16
  br i1 %145, label %146, label %159

146:                                              ; preds = %138
  %147 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %148 = getelementptr inbounds %struct.WaveHeader, ptr %147, i32 0, i32 1
  %149 = getelementptr inbounds %struct.WaveFormat, ptr %148, i32 0, i32 2
  %150 = getelementptr inbounds %struct.WaveInfo, ptr %149, i32 0, i32 5
  %151 = load i16, ptr %150, align 1, !tbaa !26
  %152 = zext i16 %151 to i32
  %153 = icmp ne i32 %152, 32
  br i1 %153, label %154, label %159

154:                                              ; preds = %146
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.20)
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = call i32 @fclose(ptr noundef %157)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %284

159:                                              ; preds = %146, %138, %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %160 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %161 = getelementptr inbounds %struct.WaveHeader, ptr %160, i32 0, i32 2
  %162 = getelementptr inbounds %struct.DataHeader, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 1, !tbaa !24
  %164 = mul i32 %163, 8
  %165 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %166 = getelementptr inbounds %struct.WaveHeader, ptr %165, i32 0, i32 1
  %167 = getelementptr inbounds %struct.WaveFormat, ptr %166, i32 0, i32 2
  %168 = getelementptr inbounds %struct.WaveInfo, ptr %167, i32 0, i32 5
  %169 = load i16, ptr %168, align 1, !tbaa !26
  %170 = zext i16 %169 to i32
  %171 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %172 = getelementptr inbounds %struct.WaveHeader, ptr %171, i32 0, i32 1
  %173 = getelementptr inbounds %struct.WaveFormat, ptr %172, i32 0, i32 2
  %174 = getelementptr inbounds %struct.WaveInfo, ptr %173, i32 0, i32 1
  %175 = load i16, ptr %174, align 1, !tbaa !27
  %176 = zext i16 %175 to i32
  %177 = mul nsw i32 %170, %176
  %178 = udiv i32 %164, %177
  store i32 %178, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %179 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %180 = getelementptr inbounds %struct.WaveHeader, ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds %struct.WaveFormat, ptr %180, i32 0, i32 2
  %182 = getelementptr inbounds %struct.WaveInfo, ptr %181, i32 0, i32 1
  %183 = load i16, ptr %182, align 1, !tbaa !27
  %184 = zext i16 %183 to i32
  %185 = load i32, ptr %11, align 4, !tbaa !9
  %186 = mul i32 %184, %185
  %187 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %188 = getelementptr inbounds %struct.WaveHeader, ptr %187, i32 0, i32 1
  %189 = getelementptr inbounds %struct.WaveFormat, ptr %188, i32 0, i32 2
  %190 = getelementptr inbounds %struct.WaveInfo, ptr %189, i32 0, i32 5
  %191 = load i16, ptr %190, align 1, !tbaa !26
  %192 = zext i16 %191 to i32
  %193 = mul i32 %186, %192
  %194 = udiv i32 %193, 8
  store i32 %194, ptr %12, align 4, !tbaa !9
  %195 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 4
  %196 = load i32, ptr %12, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 1 dereferenceable(24) %195, i64 noundef %197)
  %198 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 4
  %199 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 1 dereferenceable(24) %198) #8
  %200 = load i32, ptr %12, align 4, !tbaa !9
  %201 = zext i32 %200 to i64
  %202 = icmp ne i64 %199, %201
  br i1 %202, label %203, label %208

203:                                              ; preds = %159
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.21)
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = call i32 @fclose(ptr noundef %206)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %283

208:                                              ; preds = %159
  %209 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %210 = getelementptr inbounds %struct.WaveHeader, ptr %209, i32 0, i32 1
  %211 = getelementptr inbounds %struct.WaveFormat, ptr %210, i32 0, i32 2
  %212 = getelementptr inbounds %struct.WaveInfo, ptr %211, i32 0, i32 1
  %213 = load i16, ptr %212, align 1, !tbaa !27
  %214 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 0
  store i16 %213, ptr %214, align 1, !tbaa !28
  %215 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %216 = getelementptr inbounds %struct.WaveHeader, ptr %215, i32 0, i32 1
  %217 = getelementptr inbounds %struct.WaveFormat, ptr %216, i32 0, i32 2
  %218 = getelementptr inbounds %struct.WaveInfo, ptr %217, i32 0, i32 5
  %219 = load i16, ptr %218, align 1, !tbaa !26
  %220 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 2
  store i16 %219, ptr %220, align 1, !tbaa !34
  %221 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %222 = getelementptr inbounds %struct.WaveHeader, ptr %221, i32 0, i32 2
  %223 = getelementptr inbounds %struct.DataHeader, ptr %222, i32 0, i32 1
  %224 = load i32, ptr %223, align 1, !tbaa !24
  %225 = mul i32 %224, 8
  %226 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %227 = getelementptr inbounds %struct.WaveHeader, ptr %226, i32 0, i32 1
  %228 = getelementptr inbounds %struct.WaveFormat, ptr %227, i32 0, i32 2
  %229 = getelementptr inbounds %struct.WaveInfo, ptr %228, i32 0, i32 5
  %230 = load i16, ptr %229, align 1, !tbaa !26
  %231 = zext i16 %230 to i32
  %232 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %233 = getelementptr inbounds %struct.WaveHeader, ptr %232, i32 0, i32 1
  %234 = getelementptr inbounds %struct.WaveFormat, ptr %233, i32 0, i32 2
  %235 = getelementptr inbounds %struct.WaveInfo, ptr %234, i32 0, i32 1
  %236 = load i16, ptr %235, align 1, !tbaa !27
  %237 = zext i16 %236 to i32
  %238 = mul nsw i32 %231, %237
  %239 = udiv i32 %225, %238
  %240 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 1
  store i32 %239, ptr %240, align 1, !tbaa !35
  %241 = getelementptr inbounds %struct.RiffWave, ptr %8, i32 0, i32 1
  %242 = getelementptr inbounds %struct.WaveHeader, ptr %241, i32 0, i32 1
  %243 = getelementptr inbounds %struct.WaveFormat, ptr %242, i32 0, i32 2
  %244 = getelementptr inbounds %struct.WaveInfo, ptr %243, i32 0, i32 2
  %245 = load i32, ptr %244, align 1, !tbaa !36
  %246 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 3
  store i32 %245, ptr %246, align 1, !tbaa !37
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32) %247) #8
  %249 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 1
  %250 = load i32, ptr %249, align 1, !tbaa !35
  %251 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 2
  %252 = load i16, ptr %251, align 1, !tbaa !34
  %253 = zext i16 %252 to i32
  %254 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef %248, i32 noundef %250, i32 noundef %253)
  %255 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 3
  %256 = load i32, ptr %255, align 1, !tbaa !37
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %256)
  %258 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 0
  %259 = load i16, ptr %258, align 1, !tbaa !28
  %260 = zext i16 %259 to i32
  %261 = icmp eq i32 %260, 2
  %262 = zext i1 %261 to i64
  %263 = select i1 %261, ptr @.str.9, ptr @.str.10
  %264 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 0
  %265 = load i16, ptr %264, align 1, !tbaa !28
  %266 = zext i16 %265 to i32
  %267 = call i32 (ptr, ...) @printf(ptr noundef %263, i32 noundef %266)
  %268 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %269 = call i64 @_ZNK10WavContent11GetDurationEv(ptr noundef nonnull align 1 dereferenceable(36) %14)
  %270 = getelementptr inbounds %"class.std::chrono::duration", ptr %13, i32 0, i32 0
  store i64 %269, ptr %270, align 1
  %271 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 1 dereferenceable(8) %13)
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %268, i64 noundef %271)
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %274 = getelementptr inbounds %struct.WavContent, ptr %14, i32 0, i32 4
  %275 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %274) #8
  %276 = load i32, ptr %12, align 4, !tbaa !9
  %277 = zext i32 %276 to i64
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = call i64 @fread(ptr noundef %275, i64 noundef %277, i64 noundef 1, ptr noundef %278)
  %280 = load ptr, ptr %6, align 8, !tbaa !5
  %281 = call i32 @fclose(ptr noundef %280)
  %282 = call noundef zeroext i1 @_ZNK10WavContent7IsValidEv(ptr noundef nonnull align 1 dereferenceable(36) %14)
  store i1 %282, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %283

283:                                              ; preds = %208, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %284

284:                                              ; preds = %283, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %285

285:                                              ; preds = %284, %34
  call void @llvm.lifetime.end.p0(i64 44, ptr %8) #8
  br label %286

286:                                              ; preds = %285, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %287 = load i1, ptr %3, align 1
  ret i1 %287
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10WavContent5ResetEv(ptr noundef nonnull align 1 dereferenceable(36)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(32)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZNK10WavContent11GetDurationEv(ptr noundef nonnull align 1 dereferenceable(36)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 1 dereferenceable(8)) #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10WavContent7IsValidEv(ptr noundef nonnull align 1 dereferenceable(36)) #7 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 willreturn memory(read) "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 = { 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 #5 = { inlinehint 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 #6 = { 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !10, i64 16}
!17 = !{!"_ZTS8RiffWave", !18, i64 0, !19, i64 8}
!18 = !{!"_ZTS10RiffHeader", !7, i64 0, !10, i64 4}
!19 = !{!"_ZTS10WaveHeader", !7, i64 0, !20, i64 4, !23, i64 28}
!20 = !{!"_ZTS10WaveFormat", !7, i64 0, !10, i64 4, !21, i64 8}
!21 = !{!"_ZTS8WaveInfo", !22, i64 0, !22, i64 2, !10, i64 4, !10, i64 8, !22, i64 12, !22, i64 14}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ZTS10DataHeader", !7, i64 0, !10, i64 4}
!24 = !{!17, !10, i64 40}
!25 = distinct !{!25, !14}
!26 = !{!17, !22, i64 34}
!27 = !{!17, !22, i64 22}
!28 = !{!29, !22, i64 0}
!29 = !{!"_ZTS10WavContent", !22, i64 0, !10, i64 2, !22, i64 6, !10, i64 8, !30, i64 12}
!30 = !{!"_ZTSSt6vectorIhSaIhEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!29, !22, i64 6}
!35 = !{!29, !10, i64 2}
!36 = !{!17, !10, i64 24}
!37 = !{!29, !10, i64 8}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.RiffWave = type { %struct.RiffHeader, %struct.WaveHeader }
%struct.RiffHeader = type { [4 x i8], i32 }
%struct.WaveHeader = type { [4 x i8], %struct.WaveFormat, %struct.DataHeader }
%struct.WaveFormat = type { [4 x i8], i32, %struct.WaveInfo }
%struct.WaveInfo = type { i16, i16, i32, i32, i16, i16 }
%struct.DataHeader = type { [4 x i8], i32 }
%"class.std::chrono::duration" = type { i64 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.24 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

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

declare noundef signext i8 @_Z7fopen_sPP8_IO_FILEPKcS3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10WavContent12ReadWaveFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(36) %0, ptr noundef nonnull align 1 dereferenceable(32) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca %struct.RiffWave, align 1
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::chrono::duration", align 8
  tail call void @_ZN10WavContent5ResetEv(ptr noundef nonnull align 1 dereferenceable(36) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store ptr null, ptr %3, align 8, !tbaa !5
  %7 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32) %1) #9
  %8 = call noundef signext i8 @_Z7fopen_sPP8_IO_FILEPKcS3_(ptr noundef nonnull %3, ptr noundef %7, ptr noundef nonnull @.str)
  %.not = icmp eq i8 %8, 0
  br i1 %.not, label %13, label %9

9:                                                ; preds = %2
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.17)
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(32) %1)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %128

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %4) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(44) %4, i8 0, i64 44, i1 false)
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 8, i64 noundef 1, ptr noundef %14)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %4, ptr noundef nonnull dereferenceable(4) @.str.2, i64 4)
  %.not25 = icmp eq i32 %bcmp, 0
  br i1 %.not25, label %21, label %16

16:                                               ; preds = %13
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.18)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 1 dereferenceable(32) %1)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.19)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %127

21:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr %5, align 4, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %4, i64 8
  br label %23

23:                                               ; preds = %27, %21
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call i64 @fread(ptr noundef nonnull %22, i64 noundef 4, i64 noundef 1, ptr noundef %24)
  %bcmp26 = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %22, ptr noundef nonnull dereferenceable(4) @.str.4, i64 4)
  %26 = icmp eq i32 %bcmp26, 0
  br i1 %26, label %34, label %27

27:                                               ; preds = %23
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef %28)
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = call i32 @fseek(ptr noundef %30, i64 noundef %32, i32 noundef 1)
  %.not27 = icmp eq i64 %25, 0
  br i1 %.not27, label %34, label %23, !llvm.loop !11

34:                                               ; preds = %23, %27
  %35 = getelementptr inbounds i8, ptr %4, i64 12
  br label %36

36:                                               ; preds = %40, %34
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call i64 @fread(ptr noundef nonnull %35, i64 noundef 4, i64 noundef 1, ptr noundef %37)
  %bcmp28 = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %35, ptr noundef nonnull dereferenceable(4) @.str.5, i64 4)
  %39 = icmp eq i32 %bcmp28, 0
  br i1 %39, label %47, label %40

40:                                               ; preds = %36
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef %41)
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = call i32 @fseek(ptr noundef %43, i64 noundef %45, i32 noundef 1)
  %.not29 = icmp eq i64 %38, 0
  br i1 %.not29, label %47, label %36, !llvm.loop !13

47:                                               ; preds = %36, %40
  %48 = getelementptr inbounds i8, ptr %4, i64 16
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = call i64 @fread(ptr noundef nonnull %48, i64 noundef 4, i64 noundef 1, ptr noundef %49)
  %51 = getelementptr inbounds i8, ptr %4, i64 20
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = call i64 @fread(ptr noundef nonnull %51, i64 noundef 16, i64 noundef 1, ptr noundef %52)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i32, ptr %48, align 1, !tbaa !14
  %56 = add i32 %55, -16
  %57 = zext i32 %56 to i64
  %58 = call i32 @fseek(ptr noundef %54, i64 noundef %57, i32 noundef 1)
  %59 = getelementptr inbounds i8, ptr %4, i64 36
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = call i64 @fread(ptr noundef nonnull %59, i64 noundef 8, i64 noundef 1, ptr noundef %60)
  %bcmp3033 = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %59, ptr noundef nonnull dereferenceable(4) @.str.6, i64 4)
  %.not3134 = icmp eq i32 %bcmp3033, 0
  br i1 %.not3134, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %47
  %62 = getelementptr inbounds i8, ptr %4, i64 40
  br label %63

63:                                               ; preds = %.lr.ph, %63
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i32, ptr %62, align 1, !tbaa !22
  %66 = zext i32 %65 to i64
  %67 = call i32 @fseek(ptr noundef %64, i64 noundef %66, i32 noundef 1)
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = call i64 @fread(ptr noundef nonnull %59, i64 noundef 8, i64 noundef 1, ptr noundef %68)
  %bcmp30 = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %59, ptr noundef nonnull dereferenceable(4) @.str.6, i64 4)
  %.not31 = icmp eq i32 %bcmp30, 0
  br i1 %.not31, label %._crit_edge, label %63, !llvm.loop !23

._crit_edge:                                      ; preds = %63, %47
  %70 = getelementptr inbounds i8, ptr %4, i64 34
  %71 = load i16, ptr %70, align 1
  switch i16 %71, label %72 [
    i16 32, label %77
    i16 16, label %77
    i16 8, label %77
  ]

72:                                               ; preds = %._crit_edge
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.20)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = call i32 @fclose(ptr noundef %75)
  br label %126

77:                                               ; preds = %._crit_edge, %._crit_edge, %._crit_edge
  %78 = zext nneg i16 %71 to i32
  %79 = getelementptr inbounds i8, ptr %4, i64 40
  %80 = load i32, ptr %79, align 1, !tbaa !22
  %81 = shl i32 %80, 3
  %82 = getelementptr inbounds i8, ptr %4, i64 22
  %83 = load i16, ptr %82, align 1, !tbaa !24
  %84 = zext i16 %83 to i32
  %85 = mul nuw nsw i32 %84, %78
  %86 = udiv i32 %81, %85
  %87 = mul i32 %85, %86
  %88 = lshr exact i32 %87, 3
  %89 = getelementptr inbounds i8, ptr %0, i64 12
  %90 = zext nneg i32 %88 to i64
  call void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 1 dereferenceable(24) %89, i64 noundef %90)
  %91 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 1 dereferenceable(24) %89) #9
  %.not32 = icmp eq i64 %91, %90
  br i1 %.not32, label %97, label %92

92:                                               ; preds = %77
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.21)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = call i32 @fclose(ptr noundef %95)
  br label %126

97:                                               ; preds = %77
  store i16 %83, ptr %0, align 1, !tbaa !25
  %98 = getelementptr inbounds i8, ptr %0, i64 6
  store i16 %71, ptr %98, align 1, !tbaa !31
  %99 = getelementptr inbounds i8, ptr %0, i64 2
  store i32 %86, ptr %99, align 1, !tbaa !32
  %100 = getelementptr inbounds i8, ptr %4, i64 24
  %101 = load i32, ptr %100, align 1, !tbaa !33
  %102 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %101, ptr %102, align 1, !tbaa !34
  %103 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32) %1) #9
  %104 = load i32, ptr %99, align 1, !tbaa !32
  %105 = load i16, ptr %98, align 1, !tbaa !31
  %106 = zext i16 %105 to i32
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef %103, i32 noundef %104, i32 noundef %106)
  %108 = load i32, ptr %102, align 1, !tbaa !34
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %108)
  %110 = load i16, ptr %0, align 1, !tbaa !25
  %111 = zext i16 %110 to i32
  %112 = icmp eq i16 %110, 2
  %113 = select i1 %112, ptr @.str.9, ptr @.str.10
  %114 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %113, i32 noundef %111)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.24)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %116 = call i64 @_ZNK10WavContent11GetDurationEv(ptr noundef nonnull align 1 dereferenceable(36) %0)
  store i64 %116, ptr %6, align 8
  %117 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 1 dereferenceable(8) %6)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) %115, i64 noundef %117)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %120 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEE5frontEv(ptr noundef nonnull align 1 dereferenceable(24) %89) #9
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = call i64 @fread(ptr noundef nonnull %120, i64 noundef %90, i64 noundef 1, ptr noundef %121)
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = call i32 @fclose(ptr noundef %123)
  %125 = call noundef zeroext i1 @_ZNK10WavContent7IsValidEv(ptr noundef nonnull align 1 dereferenceable(36) %0)
  br label %126

126:                                              ; preds = %92, %97, %72
  %.1 = phi i1 [ false, %72 ], [ false, %92 ], [ %125, %97 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  br label %127

127:                                              ; preds = %126, %16
  %.2 = phi i1 [ false, %16 ], [ %.1, %126 ]
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %4) #9
  br label %128

128:                                              ; preds = %127, %9
  %.3 = phi i1 [ false, %9 ], [ %.2, %127 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret i1 %.3
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10WavContent5ResetEv(ptr noundef nonnull align 1 dereferenceable(36)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZNK10WavContent11GetDurationEv(ptr noundef nonnull align 1 dereferenceable(36)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 1 dereferenceable(8)) local_unnamed_addr #6 align 2

; 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 #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10WavContent7IsValidEv(ptr noundef nonnull align 1 dereferenceable(36)) local_unnamed_addr #7 align 2

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #8

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nofree 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 #4 = { 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 #5 = { inlinehint 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 #6 = { 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 #7 = { inlinehint 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 #8 = { nofree nounwind willreturn memory(argmem: read) }
attributes #9 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !10, i64 16}
!15 = !{!"_ZTS8RiffWave", !16, i64 0, !17, i64 8}
!16 = !{!"_ZTS10RiffHeader", !7, i64 0, !10, i64 4}
!17 = !{!"_ZTS10WaveHeader", !7, i64 0, !18, i64 4, !21, i64 28}
!18 = !{!"_ZTS10WaveFormat", !7, i64 0, !10, i64 4, !19, i64 8}
!19 = !{!"_ZTS8WaveInfo", !20, i64 0, !20, i64 2, !10, i64 4, !10, i64 8, !20, i64 12, !20, i64 14}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTS10DataHeader", !7, i64 0, !10, i64 4}
!22 = !{!15, !10, i64 40}
!23 = distinct !{!23, !12}
!24 = !{!15, !20, i64 22}
!25 = !{!26, !20, i64 0}
!26 = !{!"_ZTS10WavContent", !20, i64 0, !10, i64 2, !20, i64 6, !10, i64 8, !27, i64 12}
!27 = !{!"_ZTSSt6vectorIhSaIhEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!26, !20, i64 6}
!32 = !{!26, !10, i64 2}
!33 = !{!15, !10, i64 24}
!34 = !{!26, !10, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass