; LLVM IR from jingweizhanghuai/Morn :: src/wave (morn_WAV_file)

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

%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.MWAVInfo = type { ptr, i32, i32, i32, i32, ptr }
%struct.MObject = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.MWave = type { i32, i32, [32 x ptr] }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@__FUNCTION__.mWAVRead = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @WAVInfo(ptr noundef) #0

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

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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare void @mWaveRedefine(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @m_Malloc(i32 noundef) #2

declare void @m_Free(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

declare ptr @m_PropertyRead(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @endWAVRead(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mWAVRead(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %33, label %30

30:                                               ; preds = %27
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br label %33

33:                                               ; preds = %30, %27
  %34 = phi i1 [ true, %27 ], [ %32, %30 ]
  %35 = zext i1 %34 to i32
  store i32 %35, ptr %6, align 4, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = load i32, ptr %6, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %39, i32 noundef -1, ptr noundef @.str, i32 noundef 197, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.10)
  br label %40

40:                                               ; preds = %38, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call ptr @GetHandle(ptr noundef %42, i32 noundef 32, i32 noundef 1208350099, ptr noundef @endWAVRead)
  store ptr %43, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.MHandle, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  store ptr %46, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MHandle, ptr %47, i32 0, i32 1
  %49 = load volatile i32, ptr %48, align 4, !tbaa !13
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %71

51:                                               ; preds = %41
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.MWAVInfo, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %61

56:                                               ; preds = %51
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.MWAVInfo, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !14
  %60 = call i32 @fclose(ptr noundef %59)
  br label %61

61:                                               ; preds = %56, %51
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.MObject, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = call noalias ptr @fopen(ptr noundef %64, ptr noundef @.str.11)
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MWAVInfo, ptr %66, i32 0, i32 0
  store ptr %65, ptr %67, align 8, !tbaa !14
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  call void @WAVInfo(ptr noundef %68)
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.MHandle, ptr %69, i32 0, i32 1
  store volatile i32 1, ptr %70, align 4, !tbaa !13
  br label %71

71:                                               ; preds = %61, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store float -1.000000e+00, ptr %11, align 4, !tbaa !17
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = call ptr @m_PropertyRead(ptr noundef %72, ptr noundef @.str.13, ptr noundef %11, ptr noundef null)
  %74 = icmp eq ptr %73, null
  br i1 %74, label %75, label %82

75:                                               ; preds = %71
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MWAVInfo, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !19
  %79 = sitofp i32 %78 to float
  store float %79, ptr %11, align 4, !tbaa !17
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = call ptr @m_PropertyWrite(ptr noundef %80, ptr noundef @.str.13, ptr noundef %11, i32 noundef 4)
  br label %82

82:                                               ; preds = %75, %71
  %83 = load float, ptr %11, align 4, !tbaa !17
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.MWAVInfo, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !19
  %87 = sitofp i32 %86 to float
  %88 = fcmp oeq float %83, %87
  br i1 %88, label %89, label %94

89:                                               ; preds = %82
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %90, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MWave, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !20
  store i32 %93, ptr %10, align 4, !tbaa !9
  br label %130

94:                                               ; preds = %82
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MWave, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.MWAVInfo, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !19
  %101 = mul nsw i32 %97, %100
  %102 = sitofp i32 %101 to float
  %103 = load float, ptr %11, align 4, !tbaa !17
  %104 = fdiv float %102, %103
  %105 = fptosi float %104 to i32
  store i32 %105, ptr %10, align 4, !tbaa !9
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.MWAVInfo, ptr %106, i32 0, i32 5
  %108 = load ptr, ptr %107, align 8, !tbaa !22
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %118

110:                                              ; preds = %94
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.MWAVInfo, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !23
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = call ptr @mWaveCreate(i32 noundef %113, i32 noundef %114, ptr noundef null)
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MWAVInfo, ptr %116, i32 0, i32 5
  store ptr %115, ptr %117, align 8, !tbaa !22
  br label %126

118:                                              ; preds = %94
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.MWAVInfo, ptr %119, i32 0, i32 5
  %121 = load ptr, ptr %120, align 8, !tbaa !22
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.MWAVInfo, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 4, !tbaa !23
  %125 = load i32, ptr %10, align 4, !tbaa !9
  call void @mWaveRedefine(ptr noundef %121, i32 noundef %124, i32 noundef %125, ptr noundef null)
  br label %126

126:                                              ; preds = %118, %110
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.MWAVInfo, ptr %127, i32 0, i32 5
  %129 = load ptr, ptr %128, align 8, !tbaa !22
  store ptr %129, ptr %9, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %126, %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.MWave, ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 8, !tbaa !24
  store i32 %133, ptr %12, align 4, !tbaa !9
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.MWAVInfo, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 8, !tbaa !25
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %139, label %140

139:                                              ; preds = %130
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %415

140:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.MWAVInfo, ptr %141, i32 0, i32 4
  %143 = load i32, ptr %142, align 4, !tbaa !26
  %144 = icmp eq i32 %143, 16
  br i1 %144, label %145, label %214

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = mul nsw i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = mul i64 %149, 2
  %151 = trunc i64 %150 to i32
  %152 = call ptr @m_Malloc(i32 noundef %151)
  store ptr %152, ptr %16, align 8, !tbaa !5
  br label %153

153:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = mul nsw i32 %155, %156
  %158 = sext i32 %157 to i64
  %159 = mul i64 %158, 2
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MWAVInfo, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !14
  %163 = call i64 @fread(ptr noundef %154, i64 noundef %159, i64 noundef 1, ptr noundef %162)
  %164 = icmp ne i64 %163, 1
  %165 = zext i1 %164 to i32
  store i32 %165, ptr %17, align 4, !tbaa !9
  %166 = load i32, ptr %17, align 4, !tbaa !9
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %170

168:                                              ; preds = %153
  %169 = load i32, ptr %17, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %169, i32 noundef -1, ptr noundef @.str, i32 noundef 237, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.1)
  br label %170

170:                                              ; preds = %168, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %173

173:                                              ; preds = %206, %172
  %174 = load i32, ptr %14, align 4, !tbaa !9
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %177, label %212

177:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %202, %177
  %179 = load i32, ptr %18, align 4, !tbaa !9
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 9, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %205

183:                                              ; preds = %178
  %184 = load ptr, ptr %16, align 8, !tbaa !5
  %185 = load i32, ptr %15, align 4, !tbaa !9
  %186 = load i32, ptr %18, align 4, !tbaa !9
  %187 = add nsw i32 %185, %186
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i16, ptr %184, i64 %188
  %190 = load i16, ptr %189, align 2, !tbaa !27
  %191 = sitofp i16 %190 to float
  %192 = fdiv float %191, 3.276800e+04
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.MWave, ptr %193, i32 0, i32 2
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [32 x ptr], ptr %194, i64 0, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = load i32, ptr %14, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds float, ptr %198, i64 %200
  store float %192, ptr %201, align 4, !tbaa !17
  br label %202

202:                                              ; preds = %183
  %203 = load i32, ptr %18, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %18, align 4, !tbaa !9
  br label %178, !llvm.loop !29

205:                                              ; preds = %182
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %14, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %14, align 4, !tbaa !9
  %209 = load i32, ptr %15, align 4, !tbaa !9
  %210 = load i32, ptr %12, align 4, !tbaa !9
  %211 = add nsw i32 %209, %210
  store i32 %211, ptr %15, align 4, !tbaa !9
  br label %173, !llvm.loop !31

212:                                              ; preds = %173
  %213 = load ptr, ptr %16, align 8, !tbaa !5
  call void @m_Free(ptr noundef %213)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %399

214:                                              ; preds = %140
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.MWAVInfo, ptr %215, i32 0, i32 4
  %217 = load i32, ptr %216, align 4, !tbaa !26
  %218 = icmp eq i32 %217, 8
  br i1 %218, label %219, label %288

219:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %220 = load i32, ptr %10, align 4, !tbaa !9
  %221 = load i32, ptr %12, align 4, !tbaa !9
  %222 = mul nsw i32 %220, %221
  %223 = sext i32 %222 to i64
  %224 = mul i64 %223, 1
  %225 = trunc i64 %224 to i32
  %226 = call ptr @m_Malloc(i32 noundef %225)
  store ptr %226, ptr %19, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %228 = load ptr, ptr %19, align 8, !tbaa !5
  %229 = load i32, ptr %10, align 4, !tbaa !9
  %230 = load i32, ptr %12, align 4, !tbaa !9
  %231 = mul nsw i32 %229, %230
  %232 = sext i32 %231 to i64
  %233 = mul i64 %232, 1
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.MWAVInfo, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !14
  %237 = call i64 @fread(ptr noundef %228, i64 noundef %233, i64 noundef 1, ptr noundef %236)
  %238 = icmp ne i64 %237, 1
  %239 = zext i1 %238 to i32
  store i32 %239, ptr %20, align 4, !tbaa !9
  %240 = load i32, ptr %20, align 4, !tbaa !9
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %242, label %244

242:                                              ; preds = %227
  %243 = load i32, ptr %20, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %243, i32 noundef -1, ptr noundef @.str, i32 noundef 245, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.1)
  br label %244

244:                                              ; preds = %242, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %280, %246
  %248 = load i32, ptr %14, align 4, !tbaa !9
  %249 = load i32, ptr %10, align 4, !tbaa !9
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %251, label %286

251:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %252

252:                                              ; preds = %276, %251
  %253 = load i32, ptr %21, align 4, !tbaa !9
  %254 = load i32, ptr %12, align 4, !tbaa !9
  %255 = icmp slt i32 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %279

257:                                              ; preds = %252
  %258 = load ptr, ptr %19, align 8, !tbaa !5
  %259 = load i32, ptr %15, align 4, !tbaa !9
  %260 = load i32, ptr %21, align 4, !tbaa !9
  %261 = add nsw i32 %259, %260
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds i8, ptr %258, i64 %262
  %264 = load i8, ptr %263, align 1, !tbaa !16
  %265 = sitofp i8 %264 to float
  %266 = fdiv float %265, 1.280000e+02
  %267 = load ptr, ptr %9, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.MWave, ptr %267, i32 0, i32 2
  %269 = load i32, ptr %21, align 4, !tbaa !9
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [32 x ptr], ptr %268, i64 0, i64 %270
  %272 = load ptr, ptr %271, align 8, !tbaa !5
  %273 = load i32, ptr %14, align 4, !tbaa !9
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds float, ptr %272, i64 %274
  store float %266, ptr %275, align 4, !tbaa !17
  br label %276

276:                                              ; preds = %257
  %277 = load i32, ptr %21, align 4, !tbaa !9
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %21, align 4, !tbaa !9
  br label %252, !llvm.loop !32

279:                                              ; preds = %256
  br label %280

280:                                              ; preds = %279
  %281 = load i32, ptr %14, align 4, !tbaa !9
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %14, align 4, !tbaa !9
  %283 = load i32, ptr %15, align 4, !tbaa !9
  %284 = load i32, ptr %12, align 4, !tbaa !9
  %285 = add nsw i32 %283, %284
  store i32 %285, ptr %15, align 4, !tbaa !9
  br label %247, !llvm.loop !33

286:                                              ; preds = %247
  %287 = load ptr, ptr %19, align 8, !tbaa !5
  call void @m_Free(ptr noundef %287)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %398

288:                                              ; preds = %214
  %289 = load ptr, ptr %8, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.MWAVInfo, ptr %289, i32 0, i32 4
  %291 = load i32, ptr %290, align 4, !tbaa !26
  %292 = icmp eq i32 %291, 32
  br i1 %292, label %293, label %388

293:                                              ; preds = %288
  %294 = load i32, ptr %12, align 4, !tbaa !9
  %295 = icmp eq i32 %294, 1
  br i1 %295, label %296, label %320

296:                                              ; preds = %293
  br label %297

297:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %298 = load ptr, ptr %9, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.MWave, ptr %298, i32 0, i32 2
  %300 = getelementptr inbounds [32 x ptr], ptr %299, i64 0, i64 0
  %301 = load ptr, ptr %300, align 8, !tbaa !5
  %302 = load ptr, ptr %9, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.MWave, ptr %302, i32 0, i32 1
  %304 = load i32, ptr %303, align 4, !tbaa !20
  %305 = sext i32 %304 to i64
  %306 = mul i64 %305, 4
  %307 = load ptr, ptr %8, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.MWAVInfo, ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !14
  %310 = call i64 @fread(ptr noundef %301, i64 noundef %306, i64 noundef 1, ptr noundef %309)
  %311 = icmp ne i64 %310, 1
  %312 = zext i1 %311 to i32
  store i32 %312, ptr %22, align 4, !tbaa !9
  %313 = load i32, ptr %22, align 4, !tbaa !9
  %314 = icmp ne i32 %313, 0
  br i1 %314, label %315, label %317

315:                                              ; preds = %297
  %316 = load i32, ptr %22, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %316, i32 noundef -1, ptr noundef @.str, i32 noundef 252, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.1)
  br label %317

317:                                              ; preds = %315, %297
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  br label %318

318:                                              ; preds = %317
  br label %319

319:                                              ; preds = %318
  br label %387

320:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %321 = load i32, ptr %10, align 4, !tbaa !9
  %322 = load i32, ptr %12, align 4, !tbaa !9
  %323 = mul nsw i32 %321, %322
  %324 = sext i32 %323 to i64
  %325 = mul i64 %324, 4
  %326 = trunc i64 %325 to i32
  %327 = call ptr @m_Malloc(i32 noundef %326)
  store ptr %327, ptr %23, align 8, !tbaa !5
  br label %328

328:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  %329 = load ptr, ptr %23, align 8, !tbaa !5
  %330 = load i32, ptr %10, align 4, !tbaa !9
  %331 = load i32, ptr %12, align 4, !tbaa !9
  %332 = mul nsw i32 %330, %331
  %333 = sext i32 %332 to i64
  %334 = mul i64 %333, 4
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.MWAVInfo, ptr %335, i32 0, i32 0
  %337 = load ptr, ptr %336, align 8, !tbaa !14
  %338 = call i64 @fread(ptr noundef %329, i64 noundef %334, i64 noundef 1, ptr noundef %337)
  %339 = icmp ne i64 %338, 1
  %340 = zext i1 %339 to i32
  store i32 %340, ptr %24, align 4, !tbaa !9
  %341 = load i32, ptr %24, align 4, !tbaa !9
  %342 = icmp ne i32 %341, 0
  br i1 %342, label %343, label %345

343:                                              ; preds = %328
  %344 = load i32, ptr %24, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %344, i32 noundef -1, ptr noundef @.str, i32 noundef 256, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.1)
  br label %345

345:                                              ; preds = %343, %328
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  br label %346

346:                                              ; preds = %345
  br label %347

347:                                              ; preds = %346
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %348

348:                                              ; preds = %379, %347
  %349 = load i32, ptr %14, align 4, !tbaa !9
  %350 = load i32, ptr %10, align 4, !tbaa !9
  %351 = icmp slt i32 %349, %350
  br i1 %351, label %352, label %385

352:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %353

353:                                              ; preds = %375, %352
  %354 = load i32, ptr %25, align 4, !tbaa !9
  %355 = load i32, ptr %12, align 4, !tbaa !9
  %356 = icmp slt i32 %354, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %353
  store i32 27, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %378

358:                                              ; preds = %353
  %359 = load ptr, ptr %23, align 8, !tbaa !5
  %360 = load i32, ptr %15, align 4, !tbaa !9
  %361 = load i32, ptr %12, align 4, !tbaa !9
  %362 = add nsw i32 %360, %361
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds float, ptr %359, i64 %363
  %365 = load float, ptr %364, align 4, !tbaa !17
  %366 = load ptr, ptr %9, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.MWave, ptr %366, i32 0, i32 2
  %368 = load i32, ptr %12, align 4, !tbaa !9
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [32 x ptr], ptr %367, i64 0, i64 %369
  %371 = load ptr, ptr %370, align 8, !tbaa !5
  %372 = load i32, ptr %14, align 4, !tbaa !9
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds float, ptr %371, i64 %373
  store float %365, ptr %374, align 4, !tbaa !17
  br label %375

375:                                              ; preds = %358
  %376 = load i32, ptr %25, align 4, !tbaa !9
  %377 = add nsw i32 %376, 1
  store i32 %377, ptr %25, align 4, !tbaa !9
  br label %353, !llvm.loop !34

378:                                              ; preds = %357
  br label %379

379:                                              ; preds = %378
  %380 = load i32, ptr %14, align 4, !tbaa !9
  %381 = add nsw i32 %380, 1
  store i32 %381, ptr %14, align 4, !tbaa !9
  %382 = load i32, ptr %15, align 4, !tbaa !9
  %383 = load i32, ptr %12, align 4, !tbaa !9
  %384 = add nsw i32 %382, %383
  store i32 %384, ptr %15, align 4, !tbaa !9
  br label %348, !llvm.loop !35

385:                                              ; preds = %348
  %386 = load ptr, ptr %23, align 8, !tbaa !5
  call void @m_Free(ptr noundef %386)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  br label %387

387:                                              ; preds = %385, %319
  br label %397

388:                                              ; preds = %288
  br label %389

389:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  store i32 1, ptr %26, align 4, !tbaa !9
  %390 = load i32, ptr %26, align 4, !tbaa !9
  %391 = icmp ne i32 %390, 0
  br i1 %391, label %392, label %394

392:                                              ; preds = %389
  %393 = load i32, ptr %26, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %393, i32 noundef -1, ptr noundef @.str, i32 noundef 263, ptr noundef @__FUNCTION__.mWAVRead, ptr noundef @.str.6)
  br label %394

394:                                              ; preds = %392, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  br label %395

395:                                              ; preds = %394
  br label %396

396:                                              ; preds = %395
  br label %397

397:                                              ; preds = %396, %387
  br label %398

398:                                              ; preds = %397, %286
  br label %399

399:                                              ; preds = %398, %212
  %400 = load ptr, ptr %9, align 8, !tbaa !5
  %401 = load ptr, ptr %5, align 8, !tbaa !5
  %402 = icmp ne ptr %400, %401
  br i1 %402, label %403, label %409

403:                                              ; preds = %399
  %404 = load ptr, ptr %9, align 8, !tbaa !5
  %405 = load ptr, ptr %5, align 8, !tbaa !5
  %406 = load ptr, ptr %8, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.MWAVInfo, ptr %406, i32 0, i32 1
  %408 = load i32, ptr %407, align 8, !tbaa !19
  call void @mWaveResample(ptr noundef %404, ptr noundef %405, i32 noundef %408, i32 noundef -1)
  br label %409

409:                                              ; preds = %403, %399
  %410 = load i32, ptr %10, align 4, !tbaa !9
  %411 = load ptr, ptr %8, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.MWAVInfo, ptr %411, i32 0, i32 3
  %413 = load i32, ptr %412, align 8, !tbaa !25
  %414 = sub nsw i32 %413, %410
  store i32 %414, ptr %412, align 8, !tbaa !25
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %415

415:                                              ; preds = %409, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %416 = load i32, ptr %3, align 4
  ret i32 %416
}

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare ptr @mWaveCreate(i32 noundef, i32 noundef, ptr noundef) #2

declare void @mWaveResample(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!13 = !{!12, !10, i64 4}
!14 = !{!15, !6, i64 0}
!15 = !{!"MWAVInfo", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!15, !10, i64 8}
!20 = !{!21, !10, i64 4}
!21 = !{!"MWave", !10, i64 0, !10, i64 4, !7, i64 8}
!22 = !{!15, !6, i64 24}
!23 = !{!15, !10, i64 12}
!24 = !{!21, !10, i64 0}
!25 = !{!15, !10, i64 16}
!26 = !{!15, !10, i64 20}
!27 = !{!28, !28, i64 0}
!28 = !{!"short", !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}


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

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@__FUNCTION__.mWAVRead = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @WAVInfo(ptr noundef) local_unnamed_addr #0

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

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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

declare void @mWaveRedefine(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #3

declare void @m_Free(ptr noundef) local_unnamed_addr #3

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

declare ptr @m_PropertyRead(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @endWAVRead(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @mWAVRead(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca float, align 4
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %6 = or i1 %4, %5
  br i1 %6, label %7, label %8

7:                                                ; preds = %2
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 197, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.10) #4
  br label %8

8:                                                ; preds = %7, %2
  %9 = tail call ptr @GetHandle(ptr noundef %0, i32 noundef 32, i32 noundef 1208350099, ptr noundef nonnull @endWAVRead) #4
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %9, i64 4
  %13 = load volatile i32, ptr %12, align 4, !tbaa !11
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %23

15:                                               ; preds = %8
  %16 = load ptr, ptr %11, align 8, !tbaa !12
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %19, label %17

17:                                               ; preds = %15
  %18 = tail call i32 @fclose(ptr noundef nonnull %16)
  br label %19

19:                                               ; preds = %17, %15
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = tail call noalias ptr @fopen(ptr noundef %21, ptr noundef nonnull @.str.11)
  store ptr %22, ptr %11, align 8, !tbaa !12
  tail call void @WAVInfo(ptr noundef nonnull %11)
  store volatile i32 1, ptr %12, align 4, !tbaa !11
  br label %23

23:                                               ; preds = %19, %8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store float -1.000000e+00, ptr %3, align 4, !tbaa !15
  %24 = call ptr @m_PropertyRead(ptr noundef %1, ptr noundef nonnull @.str.13, ptr noundef nonnull %3, ptr noundef null) #4
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %11, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !17
  %29 = sitofp i32 %28 to float
  store float %29, ptr %3, align 4, !tbaa !15
  %30 = call ptr @m_PropertyWrite(ptr noundef %1, ptr noundef nonnull @.str.13, ptr noundef nonnull %3, i32 noundef 4) #4
  br label %31

31:                                               ; preds = %26, %23
  %32 = load float, ptr %3, align 4, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %11, i64 8
  %34 = load i32, ptr %33, align 8, !tbaa !17
  %35 = sitofp i32 %34 to float
  %36 = fcmp oeq float %32, %35
  %37 = getelementptr inbounds i8, ptr %1, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !18
  br i1 %36, label %52, label %39

39:                                               ; preds = %31
  %40 = mul nsw i32 %38, %34
  %41 = sitofp i32 %40 to float
  %42 = fdiv float %41, %32
  %43 = fptosi float %42 to i32
  %44 = getelementptr inbounds i8, ptr %11, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = icmp eq ptr %45, null
  %47 = getelementptr inbounds i8, ptr %11, i64 12
  %48 = load i32, ptr %47, align 4, !tbaa !21
  br i1 %46, label %49, label %51

49:                                               ; preds = %39
  %50 = call ptr @mWaveCreate(i32 noundef %48, i32 noundef %43, ptr noundef null) #4
  store ptr %50, ptr %44, align 8, !tbaa !20
  br label %52

51:                                               ; preds = %39
  call void @mWaveRedefine(ptr noundef nonnull %45, i32 noundef %48, i32 noundef %43, ptr noundef null) #4
  %.pre = load ptr, ptr %44, align 8, !tbaa !20
  br label %52

52:                                               ; preds = %31, %49, %51
  %.0121 = phi i32 [ %43, %51 ], [ %43, %49 ], [ %38, %31 ]
  %.0120 = phi ptr [ %.pre, %51 ], [ %50, %49 ], [ %1, %31 ]
  %53 = load i32, ptr %.0120, align 8, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %11, i64 16
  %55 = load i32, ptr %54, align 8, !tbaa !23
  %56 = icmp slt i32 %55, %.0121
  br i1 %56, label %171, label %57

57:                                               ; preds = %52
  %58 = getelementptr inbounds i8, ptr %11, i64 20
  %59 = load i32, ptr %58, align 4, !tbaa !24
  switch i32 %59, label %164 [
    i32 16, label %60
    i32 8, label %93
    i32 32, label %124
  ]

60:                                               ; preds = %57
  %61 = mul nsw i32 %53, %.0121
  %62 = sext i32 %61 to i64
  %63 = shl nsw i64 %62, 1
  %64 = trunc i64 %63 to i32
  %65 = call ptr @m_Malloc(i32 noundef %64) #4
  %66 = load ptr, ptr %11, align 8, !tbaa !12
  %67 = call i64 @fread(ptr noundef %65, i64 noundef %63, i64 noundef 1, ptr noundef %66)
  %.not140 = icmp eq i64 %67, 1
  br i1 %.not140, label %69, label %68

68:                                               ; preds = %60
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 237, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.1) #4
  br label %69

69:                                               ; preds = %68, %60
  %70 = icmp sgt i32 %.0121, 0
  br i1 %70, label %.preheader.lr.ph, label %._crit_edge155

.preheader.lr.ph:                                 ; preds = %69
  %71 = icmp sgt i32 %53, 0
  %72 = getelementptr inbounds i8, ptr %.0120, i64 8
  br i1 %71, label %.preheader.us.preheader, label %._crit_edge155

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %73 = zext nneg i32 %53 to i64
  %wide.trip.count192 = zext nneg i32 %.0121 to i64
  %xtraiter205 = and i64 %73, 1
  %74 = icmp eq i32 %53, 1
  %unroll_iter208 = and i64 %73, 2147483646
  %lcmp.mod207.not = icmp eq i64 %xtraiter205, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us156
  %indvars.iv187 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next188, %._crit_edge.us156 ]
  %indvars.iv185 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next186, %._crit_edge.us156 ]
  %invariant.gep195 = getelementptr inbounds i16, ptr %65, i64 %indvars.iv187
  br i1 %74, label %._crit_edge.us156.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv180 = phi i64 [ %indvars.iv.next181.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter209 = phi i64 [ %niter209.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %gep196 = getelementptr inbounds i16, ptr %invariant.gep195, i64 %indvars.iv180
  %75 = load i16, ptr %gep196, align 2, !tbaa !25
  %76 = sitofp i16 %75 to float
  %77 = fmul float %76, 0x3F00000000000000
  %78 = getelementptr inbounds [32 x ptr], ptr %72, i64 0, i64 %indvars.iv180
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = getelementptr inbounds float, ptr %79, i64 %indvars.iv185
  store float %77, ptr %80, align 4, !tbaa !15
  %indvars.iv.next181 = or disjoint i64 %indvars.iv180, 1
  %gep196.1 = getelementptr inbounds i16, ptr %invariant.gep195, i64 %indvars.iv.next181
  %81 = load i16, ptr %gep196.1, align 2, !tbaa !25
  %82 = sitofp i16 %81 to float
  %83 = fmul float %82, 0x3F00000000000000
  %84 = getelementptr inbounds [32 x ptr], ptr %72, i64 0, i64 %indvars.iv.next181
  %85 = load ptr, ptr %84, align 8, !tbaa !27
  %86 = getelementptr inbounds float, ptr %85, i64 %indvars.iv185
  store float %83, ptr %86, align 4, !tbaa !15
  %indvars.iv.next181.1 = add nuw nsw i64 %indvars.iv180, 2
  %niter209.next.1 = add i64 %niter209, 2
  %niter209.ncmp.1 = icmp eq i64 %niter209.next.1, %unroll_iter208
  br i1 %niter209.ncmp.1, label %._crit_edge.us156.unr-lcssa, label %.preheader.us.new, !llvm.loop !28

._crit_edge.us156.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv180.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next181.1, %.preheader.us.new ]
  br i1 %lcmp.mod207.not, label %._crit_edge.us156, label %._crit_edge.us156.epilog-lcssa

._crit_edge.us156.epilog-lcssa:                   ; preds = %._crit_edge.us156.unr-lcssa
  %gep196.epil = getelementptr inbounds i16, ptr %invariant.gep195, i64 %indvars.iv180.unr
  %87 = load i16, ptr %gep196.epil, align 2, !tbaa !25
  %88 = sitofp i16 %87 to float
  %89 = fmul float %88, 0x3F00000000000000
  %90 = getelementptr inbounds [32 x ptr], ptr %72, i64 0, i64 %indvars.iv180.unr
  %91 = load ptr, ptr %90, align 8, !tbaa !27
  %92 = getelementptr inbounds float, ptr %91, i64 %indvars.iv185
  store float %89, ptr %92, align 4, !tbaa !15
  br label %._crit_edge.us156

._crit_edge.us156:                                ; preds = %._crit_edge.us156.unr-lcssa, %._crit_edge.us156.epilog-lcssa
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, %73
  %exitcond193.not = icmp eq i64 %indvars.iv.next186, %wide.trip.count192
  br i1 %exitcond193.not, label %._crit_edge155, label %.preheader.us, !llvm.loop !30

._crit_edge155:                                   ; preds = %._crit_edge.us156, %.preheader.lr.ph, %69
  call void @m_Free(ptr noundef %65) #4
  br label %165

93:                                               ; preds = %57
  %94 = mul nsw i32 %53, %.0121
  %95 = sext i32 %94 to i64
  %96 = call ptr @m_Malloc(i32 noundef %94) #4
  %97 = load ptr, ptr %11, align 8, !tbaa !12
  %98 = call i64 @fread(ptr noundef %96, i64 noundef %95, i64 noundef 1, ptr noundef %97)
  %.not139 = icmp eq i64 %98, 1
  br i1 %.not139, label %100, label %99

99:                                               ; preds = %93
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 245, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.1) #4
  br label %100

100:                                              ; preds = %99, %93
  %101 = icmp sgt i32 %.0121, 0
  br i1 %101, label %.preheader141.lr.ph, label %._crit_edge150

.preheader141.lr.ph:                              ; preds = %100
  %102 = icmp sgt i32 %53, 0
  %103 = getelementptr inbounds i8, ptr %.0120, i64 8
  br i1 %102, label %.preheader141.us.preheader, label %._crit_edge150

.preheader141.us.preheader:                       ; preds = %.preheader141.lr.ph
  %104 = zext nneg i32 %53 to i64
  %wide.trip.count178 = zext nneg i32 %.0121 to i64
  %xtraiter199 = and i64 %104, 1
  %105 = icmp eq i32 %53, 1
  %unroll_iter202 = and i64 %104, 2147483646
  %lcmp.mod201.not = icmp eq i64 %xtraiter199, 0
  br label %.preheader141.us

.preheader141.us:                                 ; preds = %.preheader141.us.preheader, %._crit_edge.us151
  %indvars.iv173 = phi i64 [ 0, %.preheader141.us.preheader ], [ %indvars.iv.next174, %._crit_edge.us151 ]
  %indvars.iv171 = phi i64 [ 0, %.preheader141.us.preheader ], [ %indvars.iv.next172, %._crit_edge.us151 ]
  %invariant.gep = getelementptr inbounds i8, ptr %96, i64 %indvars.iv173
  br i1 %105, label %._crit_edge.us151.unr-lcssa, label %.preheader141.us.new

.preheader141.us.new:                             ; preds = %.preheader141.us, %.preheader141.us.new
  %indvars.iv166 = phi i64 [ %indvars.iv.next167.1, %.preheader141.us.new ], [ 0, %.preheader141.us ]
  %niter203 = phi i64 [ %niter203.next.1, %.preheader141.us.new ], [ 0, %.preheader141.us ]
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv166
  %106 = load i8, ptr %gep, align 1, !tbaa !14
  %107 = sitofp i8 %106 to float
  %108 = fmul float %107, 7.812500e-03
  %109 = getelementptr inbounds [32 x ptr], ptr %103, i64 0, i64 %indvars.iv166
  %110 = load ptr, ptr %109, align 8, !tbaa !27
  %111 = getelementptr inbounds float, ptr %110, i64 %indvars.iv171
  store float %108, ptr %111, align 4, !tbaa !15
  %indvars.iv.next167 = or disjoint i64 %indvars.iv166, 1
  %gep.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next167
  %112 = load i8, ptr %gep.1, align 1, !tbaa !14
  %113 = sitofp i8 %112 to float
  %114 = fmul float %113, 7.812500e-03
  %115 = getelementptr inbounds [32 x ptr], ptr %103, i64 0, i64 %indvars.iv.next167
  %116 = load ptr, ptr %115, align 8, !tbaa !27
  %117 = getelementptr inbounds float, ptr %116, i64 %indvars.iv171
  store float %114, ptr %117, align 4, !tbaa !15
  %indvars.iv.next167.1 = add nuw nsw i64 %indvars.iv166, 2
  %niter203.next.1 = add i64 %niter203, 2
  %niter203.ncmp.1 = icmp eq i64 %niter203.next.1, %unroll_iter202
  br i1 %niter203.ncmp.1, label %._crit_edge.us151.unr-lcssa, label %.preheader141.us.new, !llvm.loop !31

._crit_edge.us151.unr-lcssa:                      ; preds = %.preheader141.us.new, %.preheader141.us
  %indvars.iv166.unr = phi i64 [ 0, %.preheader141.us ], [ %indvars.iv.next167.1, %.preheader141.us.new ]
  br i1 %lcmp.mod201.not, label %._crit_edge.us151, label %._crit_edge.us151.epilog-lcssa

._crit_edge.us151.epilog-lcssa:                   ; preds = %._crit_edge.us151.unr-lcssa
  %gep.epil = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv166.unr
  %118 = load i8, ptr %gep.epil, align 1, !tbaa !14
  %119 = sitofp i8 %118 to float
  %120 = fmul float %119, 7.812500e-03
  %121 = getelementptr inbounds [32 x ptr], ptr %103, i64 0, i64 %indvars.iv166.unr
  %122 = load ptr, ptr %121, align 8, !tbaa !27
  %123 = getelementptr inbounds float, ptr %122, i64 %indvars.iv171
  store float %120, ptr %123, align 4, !tbaa !15
  br label %._crit_edge.us151

._crit_edge.us151:                                ; preds = %._crit_edge.us151.unr-lcssa, %._crit_edge.us151.epilog-lcssa
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, %104
  %exitcond179.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count178
  br i1 %exitcond179.not, label %._crit_edge150, label %.preheader141.us, !llvm.loop !32

._crit_edge150:                                   ; preds = %._crit_edge.us151, %.preheader141.lr.ph, %100
  call void @m_Free(ptr noundef %96) #4
  br label %165

124:                                              ; preds = %57
  %125 = icmp eq i32 %53, 1
  br i1 %125, label %126, label %136

126:                                              ; preds = %124
  %127 = getelementptr inbounds i8, ptr %.0120, i64 8
  %128 = load ptr, ptr %127, align 8, !tbaa !27
  %129 = getelementptr inbounds i8, ptr %.0120, i64 4
  %130 = load i32, ptr %129, align 4, !tbaa !18
  %131 = sext i32 %130 to i64
  %132 = shl nsw i64 %131, 2
  %133 = load ptr, ptr %11, align 8, !tbaa !12
  %134 = call i64 @fread(ptr noundef %128, i64 noundef %132, i64 noundef 1, ptr noundef %133)
  %.not138 = icmp eq i64 %134, 1
  br i1 %.not138, label %165, label %135

135:                                              ; preds = %126
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 252, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.1) #4
  br label %165

136:                                              ; preds = %124
  %137 = mul nsw i32 %53, %.0121
  %138 = sext i32 %137 to i64
  %139 = shl nsw i64 %138, 2
  %140 = trunc i64 %139 to i32
  %141 = call ptr @m_Malloc(i32 noundef %140) #4
  %142 = load ptr, ptr %11, align 8, !tbaa !12
  %143 = call i64 @fread(ptr noundef %141, i64 noundef %139, i64 noundef 1, ptr noundef %142)
  %.not137 = icmp eq i64 %143, 1
  br i1 %.not137, label %145, label %144

144:                                              ; preds = %136
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 256, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.1) #4
  br label %145

145:                                              ; preds = %144, %136
  %146 = icmp sgt i32 %.0121, 0
  %147 = icmp sgt i32 %53, 0
  %or.cond = select i1 %146, i1 %147, i1 false
  br i1 %or.cond, label %.preheader142.lr.ph.split.us, label %._crit_edge146

.preheader142.lr.ph.split.us:                     ; preds = %145
  %148 = getelementptr inbounds i8, ptr %.0120, i64 8
  %149 = zext nneg i32 %53 to i64
  %150 = getelementptr inbounds [32 x ptr], ptr %148, i64 0, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !27
  %152 = zext nneg i32 %53 to i64
  %wide.trip.count = zext nneg i32 %.0121 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %153 = icmp ult i32 %.0121, 4
  br i1 %153, label %._crit_edge146.loopexit.unr-lcssa, label %.preheader142.lr.ph.split.us.new

.preheader142.lr.ph.split.us.new:                 ; preds = %.preheader142.lr.ph.split.us
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.preheader142.us

.preheader142.us:                                 ; preds = %.preheader142.us, %.preheader142.lr.ph.split.us.new
  %indvars.iv160 = phi i64 [ 0, %.preheader142.lr.ph.split.us.new ], [ %indvars.iv.next161.3, %.preheader142.us ]
  %indvars.iv = phi i64 [ 0, %.preheader142.lr.ph.split.us.new ], [ %indvars.iv.next.3, %.preheader142.us ]
  %niter = phi i64 [ 0, %.preheader142.lr.ph.split.us.new ], [ %niter.next.3, %.preheader142.us ]
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, %152
  %154 = getelementptr inbounds float, ptr %141, i64 %indvars.iv.next161
  %155 = getelementptr inbounds float, ptr %151, i64 %indvars.iv
  %.pre194 = load float, ptr %154, align 4, !tbaa !15
  store float %.pre194, ptr %155, align 4, !tbaa !15
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %indvars.iv.next161.1 = add nuw nsw i64 %indvars.iv.next161, %152
  %156 = getelementptr inbounds float, ptr %141, i64 %indvars.iv.next161.1
  %157 = getelementptr inbounds float, ptr %151, i64 %indvars.iv.next
  %.pre194.1 = load float, ptr %156, align 4, !tbaa !15
  store float %.pre194.1, ptr %157, align 4, !tbaa !15
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %indvars.iv.next161.2 = add nuw nsw i64 %indvars.iv.next161.1, %152
  %158 = getelementptr inbounds float, ptr %141, i64 %indvars.iv.next161.2
  %159 = getelementptr inbounds float, ptr %151, i64 %indvars.iv.next.1
  %.pre194.2 = load float, ptr %158, align 4, !tbaa !15
  store float %.pre194.2, ptr %159, align 4, !tbaa !15
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %indvars.iv.next161.3 = add nuw nsw i64 %indvars.iv.next161.2, %152
  %160 = getelementptr inbounds float, ptr %141, i64 %indvars.iv.next161.3
  %161 = getelementptr inbounds float, ptr %151, i64 %indvars.iv.next.2
  %.pre194.3 = load float, ptr %160, align 4, !tbaa !15
  store float %.pre194.3, ptr %161, align 4, !tbaa !15
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge146.loopexit.unr-lcssa, label %.preheader142.us, !llvm.loop !33

._crit_edge146.loopexit.unr-lcssa:                ; preds = %.preheader142.us, %.preheader142.lr.ph.split.us
  %indvars.iv160.unr = phi i64 [ 0, %.preheader142.lr.ph.split.us ], [ %indvars.iv.next161.3, %.preheader142.us ]
  %indvars.iv.unr = phi i64 [ 0, %.preheader142.lr.ph.split.us ], [ %indvars.iv.next.3, %.preheader142.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge146, label %.preheader142.us.epil

.preheader142.us.epil:                            ; preds = %._crit_edge146.loopexit.unr-lcssa, %.preheader142.us.epil
  %indvars.iv160.epil = phi i64 [ %indvars.iv.next161.epil, %.preheader142.us.epil ], [ %indvars.iv160.unr, %._crit_edge146.loopexit.unr-lcssa ]
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.preheader142.us.epil ], [ %indvars.iv.unr, %._crit_edge146.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader142.us.epil ], [ 0, %._crit_edge146.loopexit.unr-lcssa ]
  %indvars.iv.next161.epil = add nuw nsw i64 %indvars.iv160.epil, %152
  %162 = getelementptr inbounds float, ptr %141, i64 %indvars.iv.next161.epil
  %163 = getelementptr inbounds float, ptr %151, i64 %indvars.iv.epil
  %.pre194.epil = load float, ptr %162, align 4, !tbaa !15
  store float %.pre194.epil, ptr %163, align 4, !tbaa !15
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge146, label %.preheader142.us.epil, !llvm.loop !35

._crit_edge146:                                   ; preds = %._crit_edge146.loopexit.unr-lcssa, %.preheader142.us.epil, %145
  call void @m_Free(ptr noundef %141) #4
  br label %165

164:                                              ; preds = %57
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 263, ptr noundef nonnull @__FUNCTION__.mWAVRead, ptr noundef nonnull @.str.6) #4
  br label %165

165:                                              ; preds = %126, %135, %._crit_edge150, %._crit_edge146, %164, %._crit_edge155
  %.not136 = icmp eq ptr %.0120, %1
  br i1 %.not136, label %168, label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %33, align 8, !tbaa !17
  call void @mWaveResample(ptr noundef nonnull %.0120, ptr noundef %1, i32 noundef %167, i32 noundef -1) #4
  br label %168

168:                                              ; preds = %166, %165
  %169 = load i32, ptr %54, align 8, !tbaa !23
  %170 = sub nsw i32 %169, %.0121
  store i32 %170, ptr %54, align 8, !tbaa !23
  br label %171

171:                                              ; preds = %52, %168
  %.0 = phi i32 [ 0, %168 ], [ -1, %52 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret i32 %.0
}

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare ptr @mWaveCreate(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @mWaveResample(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !10, i64 0}
!13 = !{!"MWAVInfo", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24}
!14 = !{!8, !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !8, i64 0}
!17 = !{!13, !7, i64 8}
!18 = !{!19, !7, i64 4}
!19 = !{!"MWave", !7, i64 0, !7, i64 4, !8, i64 8}
!20 = !{!13, !10, i64 24}
!21 = !{!13, !7, i64 12}
!22 = !{!19, !7, i64 0}
!23 = !{!13, !7, i64 16}
!24 = !{!13, !7, i64 20}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !8, i64 0}
!27 = !{!10, !10, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29, !34}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.unroll.disable"}


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