; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/soloud/src/audiosource/wav (dr_impl)

; 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.drwav_fmt = type { i16, i16, i32, i32, i16, i16, i16, i16, i32, [16 x i8] }
%struct.drwav_chunk_header = type { %union.anon.4, i64, i32 }
%union.anon.4 = type { [16 x i8] }
%struct.drwav = type { ptr, ptr, ptr, ptr, %struct.drwav_allocation_callbacks, i32, %struct.drwav_fmt, i32, i16, i16, i16, i64, i64, i64, i64, i64, i32, %struct.drwav_smpl, %struct.drwav__memory_stream, %struct.drwav__memory_stream_write, %struct.anon.1, %struct.anon.2, %struct.anon.3 }
%struct.drwav_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.drwav_smpl = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x %struct.drwav_smpl_loop] }
%struct.drwav_smpl_loop = type { i32, i32, i32, i32, i32, i32 }
%struct.drwav__memory_stream = type { ptr, i64, i64 }
%struct.drwav__memory_stream_write = type { ptr, ptr, i64, i64, i64 }
%struct.anon.1 = type { i64 }
%struct.anon.2 = type { i32, [2 x i16], [2 x i32], [4 x i32], i32, [2 x [2 x i32]] }
%struct.anon.3 = type { i32, [2 x i32], [2 x i32], [16 x i32], i32 }

@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_RIFF = external hidden constant [16 x i8], align 16
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_WAVE = external hidden constant [16 x i8], align 16
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_DATA = external hidden constant [16 x i8], align 16
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_FACT = external hidden constant [16 x i8], align 16
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_SMPL = external hidden constant [16 x i8], align 16

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z20drwav_init__internalP5drwavPFmPvPFmS1_S1_mEPFjS1_i17drwav_seek_originES1_PK18drwav_chunk_headerES1_j(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca [4 x i8], align 1
  %13 = alloca %struct.drwav_fmt, align 4
  %14 = alloca i16, align 2
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca [12 x i8], align 1
  %22 = alloca [4 x i8], align 1
  %23 = alloca [4 x i8], align 1
  %24 = alloca [8 x i8], align 1
  %25 = alloca [16 x i8], align 16
  %26 = alloca %struct.drwav_chunk_header, align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca [36 x i8], align 16
  %31 = alloca i64, align 8
  %32 = alloca i32, align 4
  %33 = alloca [24 x i8], align 16
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %10, align 8, !tbaa !11
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = and i32 %38, 1
  %40 = icmp ne i32 %39, 0
  %41 = zext i1 %40 to i32
  store i32 %41, ptr %11, align 4, !tbaa !9
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.drwav, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.drwav, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !25
  %48 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 0
  %49 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %44, ptr noundef %47, ptr noundef %48, i64 noundef 4, ptr noundef %10)
  %50 = icmp ne i64 %49, 4
  br i1 %50, label %51, label %52

51:                                               ; preds = %4
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

52:                                               ; preds = %4
  %53 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 0
  %54 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %53, ptr noundef @.str.19)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %59

56:                                               ; preds = %52
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.drwav, ptr %57, i32 0, i32 5
  store i32 0, ptr %58, align 8, !tbaa !26
  br label %104

59:                                               ; preds = %52
  %60 = getelementptr inbounds [4 x i8], ptr %12, i64 0, i64 0
  %61 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %60, ptr noundef @.str.20)
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %102

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #5
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.drwav, ptr %64, i32 0, i32 5
  store i32 1, ptr %65, align 8, !tbaa !26
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.drwav, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.drwav, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = getelementptr inbounds [12 x i8], ptr %21, i64 0, i64 0
  %73 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %68, ptr noundef %71, ptr noundef %72, i64 noundef 12, ptr noundef %10)
  %74 = icmp ne i64 %73, 12
  br i1 %74, label %75, label %76

75:                                               ; preds = %63
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %99

76:                                               ; preds = %63
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %95, %76
  %78 = load i32, ptr %20, align 4, !tbaa !9
  %79 = icmp slt i32 %78, 12
  br i1 %79, label %80, label %98

80:                                               ; preds = %77
  %81 = load i32, ptr %20, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [12 x i8], ptr %21, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !27
  %85 = zext i8 %84 to i32
  %86 = load i32, ptr %20, align 4, !tbaa !9
  %87 = add nsw i32 %86, 4
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [16 x i8], ptr @_ZL18drwavGUID_W64_RIFF, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !27
  %91 = zext i8 %90 to i32
  %92 = icmp ne i32 %85, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %80
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %99

94:                                               ; preds = %80
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %20, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %20, align 4, !tbaa !9
  br label %77, !llvm.loop !28

98:                                               ; preds = %77
  store i32 0, ptr %19, align 4
  br label %99

99:                                               ; preds = %98, %93, %75
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %100 = load i32, ptr %19, align 4
  switch i32 %100, label %793 [
    i32 0, label %101
  ]

101:                                              ; preds = %99
  br label %103

102:                                              ; preds = %59
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103, %56
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.drwav, ptr %105, i32 0, i32 5
  %107 = load i32, ptr %106, align 8, !tbaa !26
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %145

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.drwav, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !13
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.drwav, ptr %113, i32 0, i32 3
  %115 = load ptr, ptr %114, align 8, !tbaa !25
  %116 = getelementptr inbounds [4 x i8], ptr %22, i64 0, i64 0
  %117 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %112, ptr noundef %115, ptr noundef %116, i64 noundef 4, ptr noundef %10)
  %118 = icmp ne i64 %117, 4
  br i1 %118, label %119, label %120

119:                                              ; preds = %109
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %142

120:                                              ; preds = %109
  %121 = getelementptr inbounds [4 x i8], ptr %22, i64 0, i64 0
  %122 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %121)
  %123 = icmp ult i32 %122, 36
  br i1 %123, label %124, label %125

124:                                              ; preds = %120
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %142

125:                                              ; preds = %120
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.drwav, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.drwav, ptr %129, i32 0, i32 3
  %131 = load ptr, ptr %130, align 8, !tbaa !25
  %132 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  %133 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %128, ptr noundef %131, ptr noundef %132, i64 noundef 4, ptr noundef %10)
  %134 = icmp ne i64 %133, 4
  br i1 %134, label %135, label %136

135:                                              ; preds = %125
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %142

136:                                              ; preds = %125
  %137 = getelementptr inbounds [4 x i8], ptr %23, i64 0, i64 0
  %138 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %137, ptr noundef @.str.21)
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %142

141:                                              ; preds = %136
  store i32 0, ptr %19, align 4
  br label %142

142:                                              ; preds = %141, %140, %135, %124, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %143 = load i32, ptr %19, align 4
  switch i32 %143, label %793 [
    i32 0, label %144
  ]

144:                                              ; preds = %142
  br label %181

145:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.drwav, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !13
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.drwav, ptr %149, i32 0, i32 3
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = getelementptr inbounds [8 x i8], ptr %24, i64 0, i64 0
  %153 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %148, ptr noundef %151, ptr noundef %152, i64 noundef 8, ptr noundef %10)
  %154 = icmp ne i64 %153, 8
  br i1 %154, label %155, label %156

155:                                              ; preds = %145
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %178

156:                                              ; preds = %145
  %157 = getelementptr inbounds [8 x i8], ptr %24, i64 0, i64 0
  %158 = call noundef i64 @_ZL19drwav__bytes_to_u64PKh(ptr noundef %157)
  %159 = icmp ult i64 %158, 80
  br i1 %159, label %160, label %161

160:                                              ; preds = %156
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %178

161:                                              ; preds = %156
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.drwav, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !13
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.drwav, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !25
  %168 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 0
  %169 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %164, ptr noundef %167, ptr noundef %168, i64 noundef 16, ptr noundef %10)
  %170 = icmp ne i64 %169, 16
  br i1 %170, label %171, label %172

171:                                              ; preds = %161
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %178

172:                                              ; preds = %161
  %173 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 0
  %174 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef %173, ptr noundef @_ZL18drwavGUID_W64_WAVE)
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %178

177:                                              ; preds = %172
  store i32 0, ptr %19, align 4
  br label %178

178:                                              ; preds = %177, %176, %171, %160, %155
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %179 = load i32, ptr %19, align 4
  switch i32 %179, label %793 [
    i32 0, label %180
  ]

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180, %144
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.drwav, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.drwav, ptr %185, i32 0, i32 2
  %187 = load ptr, ptr %186, align 8, !tbaa !30
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.drwav, ptr %188, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !25
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.drwav, ptr %191, i32 0, i32 5
  %193 = load i32, ptr %192, align 8, !tbaa !26
  %194 = call noundef i32 @_ZL15drwav__read_fmtPFmPvS_mEPFjS_i17drwav_seek_originES_15drwav_containerPmP9drwav_fmt(ptr noundef %184, ptr noundef %187, ptr noundef %190, i32 noundef %193, ptr noundef %10, ptr noundef %13)
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %197, label %196

196:                                              ; preds = %181
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

197:                                              ; preds = %181
  %198 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 2
  %199 = load i32, ptr %198, align 4, !tbaa !31
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %230, label %201

201:                                              ; preds = %197
  %202 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 2
  %203 = load i32, ptr %202, align 4, !tbaa !31
  %204 = icmp ugt i32 %203, 384000
  br i1 %204, label %230, label %205

205:                                              ; preds = %201
  %206 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %207 = load i16, ptr %206, align 2, !tbaa !32
  %208 = zext i16 %207 to i32
  %209 = icmp eq i32 %208, 0
  br i1 %209, label %230, label %210

210:                                              ; preds = %205
  %211 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %212 = load i16, ptr %211, align 2, !tbaa !32
  %213 = zext i16 %212 to i32
  %214 = icmp sgt i32 %213, 256
  br i1 %214, label %230, label %215

215:                                              ; preds = %210
  %216 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 5
  %217 = load i16, ptr %216, align 2, !tbaa !33
  %218 = zext i16 %217 to i32
  %219 = icmp eq i32 %218, 0
  br i1 %219, label %230, label %220

220:                                              ; preds = %215
  %221 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 5
  %222 = load i16, ptr %221, align 2, !tbaa !33
  %223 = zext i16 %222 to i32
  %224 = icmp sgt i32 %223, 64
  br i1 %224, label %230, label %225

225:                                              ; preds = %220
  %226 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 4
  %227 = load i16, ptr %226, align 4, !tbaa !34
  %228 = zext i16 %227 to i32
  %229 = icmp eq i32 %228, 0
  br i1 %229, label %230, label %231

230:                                              ; preds = %225, %220, %215, %210, %205, %201, %197
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

231:                                              ; preds = %225
  %232 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 0
  %233 = load i16, ptr %232, align 4, !tbaa !35
  store i16 %233, ptr %14, align 2, !tbaa !36
  %234 = load i16, ptr %14, align 2, !tbaa !36
  %235 = zext i16 %234 to i32
  %236 = icmp eq i32 %235, 65534
  br i1 %236, label %237, label %242

237:                                              ; preds = %231
  %238 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 9
  %239 = getelementptr inbounds [16 x i8], ptr %238, i64 0, i64 0
  %240 = getelementptr inbounds i8, ptr %239, i64 0
  %241 = call noundef zeroext i16 @_ZL19drwav__bytes_to_u16PKh(ptr noundef %240)
  store i16 %241, ptr %14, align 2, !tbaa !36
  br label %242

242:                                              ; preds = %237, %231
  store i64 0, ptr %15, align 8, !tbaa !11
  store i32 0, ptr %16, align 4, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !11
  br label %243

243:                                              ; preds = %624, %242
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.drwav, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !13
  %247 = load ptr, ptr %6, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.drwav, ptr %247, i32 0, i32 3
  %249 = load ptr, ptr %248, align 8, !tbaa !25
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.drwav, ptr %250, i32 0, i32 5
  %252 = load i32, ptr %251, align 8, !tbaa !26
  %253 = call noundef i32 @_ZL24drwav__read_chunk_headerPFmPvS_mES_15drwav_containerPmP18drwav_chunk_header(ptr noundef %246, ptr noundef %249, i32 noundef %252, ptr noundef %10, ptr noundef %26)
  store i32 %253, ptr %27, align 4, !tbaa !9
  %254 = load i32, ptr %27, align 4, !tbaa !9
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %256, label %261

256:                                              ; preds = %243
  %257 = load i32, ptr %16, align 4, !tbaa !9
  %258 = icmp ne i32 %257, 0
  br i1 %258, label %260, label %259

259:                                              ; preds = %256
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %622

260:                                              ; preds = %256
  store i32 5, ptr %19, align 4
  br label %622

261:                                              ; preds = %243
  %262 = load i32, ptr %11, align 4, !tbaa !9
  %263 = icmp ne i32 %262, 0
  br i1 %263, label %298, label %264

264:                                              ; preds = %261
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %298

267:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.drwav, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !13
  %273 = load ptr, ptr %6, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.drwav, ptr %273, i32 0, i32 2
  %275 = load ptr, ptr %274, align 8, !tbaa !30
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.drwav, ptr %276, i32 0, i32 3
  %278 = load ptr, ptr %277, align 8, !tbaa !25
  %279 = call noundef i64 %268(ptr noundef %269, ptr noundef %272, ptr noundef %275, ptr noundef %278, ptr noundef %26)
  store i64 %279, ptr %28, align 8, !tbaa !11
  %280 = load i64, ptr %28, align 8, !tbaa !11
  %281 = icmp ugt i64 %280, 0
  br i1 %281, label %282, label %294

282:                                              ; preds = %267
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.drwav, ptr %283, i32 0, i32 2
  %285 = load ptr, ptr %284, align 8, !tbaa !30
  %286 = load i64, ptr %10, align 8, !tbaa !11
  %287 = load ptr, ptr %6, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.drwav, ptr %287, i32 0, i32 3
  %289 = load ptr, ptr %288, align 8, !tbaa !25
  %290 = call noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef %285, i64 noundef %286, ptr noundef %289)
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %293, label %292

292:                                              ; preds = %282
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %295

293:                                              ; preds = %282
  br label %294

294:                                              ; preds = %293, %267
  store i32 0, ptr %19, align 4
  br label %295

295:                                              ; preds = %294, %292
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  %296 = load i32, ptr %19, align 4
  switch i32 %296, label %622 [
    i32 0, label %297
  ]

297:                                              ; preds = %295
  br label %298

298:                                              ; preds = %297, %264, %261
  %299 = load i32, ptr %16, align 4, !tbaa !9
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %305, label %301

301:                                              ; preds = %298
  %302 = load i64, ptr %10, align 8, !tbaa !11
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.drwav, ptr %303, i32 0, i32 13
  store i64 %302, ptr %304, align 8, !tbaa !37
  br label %305

305:                                              ; preds = %301, %298
  %306 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 1
  %307 = load i64, ptr %306, align 8, !tbaa !38
  store i64 %307, ptr %18, align 8, !tbaa !11
  %308 = load ptr, ptr %6, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.drwav, ptr %308, i32 0, i32 5
  %310 = load i32, ptr %309, align 8, !tbaa !26
  %311 = icmp eq i32 %310, 0
  br i1 %311, label %312, label %320

312:                                              ; preds = %305
  %313 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %314 = getelementptr inbounds [4 x i8], ptr %313, i64 0, i64 0
  %315 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %314, ptr noundef @.str.22)
  %316 = icmp ne i32 %315, 0
  br i1 %316, label %317, label %319

317:                                              ; preds = %312
  store i32 1, ptr %16, align 4, !tbaa !9
  %318 = load i64, ptr %18, align 8, !tbaa !11
  store i64 %318, ptr %17, align 8, !tbaa !11
  br label %319

319:                                              ; preds = %317, %312
  br label %328

320:                                              ; preds = %305
  %321 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %322 = getelementptr inbounds [16 x i8], ptr %321, i64 0, i64 0
  %323 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef %322, ptr noundef @_ZL18drwavGUID_W64_DATA)
  %324 = icmp ne i32 %323, 0
  br i1 %324, label %325, label %327

325:                                              ; preds = %320
  store i32 1, ptr %16, align 4, !tbaa !9
  %326 = load i64, ptr %18, align 8, !tbaa !11
  store i64 %326, ptr %17, align 8, !tbaa !11
  br label %327

327:                                              ; preds = %325, %320
  br label %328

328:                                              ; preds = %327, %319
  %329 = load i32, ptr %16, align 4, !tbaa !9
  %330 = icmp ne i32 %329, 0
  br i1 %330, label %331, label %335

331:                                              ; preds = %328
  %332 = load i32, ptr %11, align 4, !tbaa !9
  %333 = icmp ne i32 %332, 0
  br i1 %333, label %334, label %335

334:                                              ; preds = %331
  store i32 5, ptr %19, align 4
  br label %622

335:                                              ; preds = %331, %328
  %336 = load ptr, ptr %6, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.drwav, ptr %336, i32 0, i32 5
  %338 = load i32, ptr %337, align 8, !tbaa !26
  %339 = icmp eq i32 %338, 0
  br i1 %339, label %340, label %379

340:                                              ; preds = %335
  %341 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %342 = getelementptr inbounds [4 x i8], ptr %341, i64 0, i64 0
  %343 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %342, ptr noundef @.str.23)
  %344 = icmp ne i32 %343, 0
  br i1 %344, label %345, label %378

345:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %346 = load ptr, ptr %6, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.drwav, ptr %346, i32 0, i32 0
  %348 = load ptr, ptr %347, align 8, !tbaa !13
  %349 = load ptr, ptr %6, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.drwav, ptr %349, i32 0, i32 3
  %351 = load ptr, ptr %350, align 8, !tbaa !25
  %352 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %348, ptr noundef %351, ptr noundef %29, i64 noundef 4, ptr noundef %10)
  %353 = icmp ne i64 %352, 4
  br i1 %353, label %354, label %355

354:                                              ; preds = %345
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %375

355:                                              ; preds = %345
  %356 = load i64, ptr %18, align 8, !tbaa !11
  %357 = sub i64 %356, 4
  store i64 %357, ptr %18, align 8, !tbaa !11
  %358 = load i32, ptr %16, align 4, !tbaa !9
  %359 = icmp ne i32 %358, 0
  br i1 %359, label %364, label %360

360:                                              ; preds = %355
  %361 = load i64, ptr %10, align 8, !tbaa !11
  %362 = load ptr, ptr %6, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.drwav, ptr %362, i32 0, i32 13
  store i64 %361, ptr %363, align 8, !tbaa !37
  br label %364

364:                                              ; preds = %360, %355
  %365 = load ptr, ptr %6, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.drwav, ptr %365, i32 0, i32 10
  %367 = load i16, ptr %366, align 4, !tbaa !40
  %368 = zext i16 %367 to i32
  %369 = icmp eq i32 %368, 2
  br i1 %369, label %370, label %373

370:                                              ; preds = %364
  %371 = load i32, ptr %29, align 4, !tbaa !9
  %372 = zext i32 %371 to i64
  store i64 %372, ptr %15, align 8, !tbaa !11
  br label %374

373:                                              ; preds = %364
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %374

374:                                              ; preds = %373, %370
  store i32 0, ptr %19, align 4
  br label %375

375:                                              ; preds = %374, %354
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  %376 = load i32, ptr %19, align 4
  switch i32 %376, label %622 [
    i32 0, label %377
  ]

377:                                              ; preds = %375
  br label %378

378:                                              ; preds = %377, %340
  br label %405

379:                                              ; preds = %335
  %380 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %381 = getelementptr inbounds [16 x i8], ptr %380, i64 0, i64 0
  %382 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef %381, ptr noundef @_ZL18drwavGUID_W64_FACT)
  %383 = icmp ne i32 %382, 0
  br i1 %383, label %384, label %404

384:                                              ; preds = %379
  %385 = load ptr, ptr %6, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.drwav, ptr %385, i32 0, i32 0
  %387 = load ptr, ptr %386, align 8, !tbaa !13
  %388 = load ptr, ptr %6, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.drwav, ptr %388, i32 0, i32 3
  %390 = load ptr, ptr %389, align 8, !tbaa !25
  %391 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %387, ptr noundef %390, ptr noundef %15, i64 noundef 8, ptr noundef %10)
  %392 = icmp ne i64 %391, 8
  br i1 %392, label %393, label %394

393:                                              ; preds = %384
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %622

394:                                              ; preds = %384
  %395 = load i64, ptr %18, align 8, !tbaa !11
  %396 = sub i64 %395, 8
  store i64 %396, ptr %18, align 8, !tbaa !11
  %397 = load i32, ptr %16, align 4, !tbaa !9
  %398 = icmp ne i32 %397, 0
  br i1 %398, label %403, label %399

399:                                              ; preds = %394
  %400 = load i64, ptr %10, align 8, !tbaa !11
  %401 = load ptr, ptr %6, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.drwav, ptr %401, i32 0, i32 13
  store i64 %400, ptr %402, align 8, !tbaa !37
  br label %403

403:                                              ; preds = %399, %394
  br label %404

404:                                              ; preds = %403, %379
  br label %405

405:                                              ; preds = %404, %378
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.drwav, ptr %406, i32 0, i32 5
  %408 = load i32, ptr %407, align 8, !tbaa !26
  %409 = icmp eq i32 %408, 0
  br i1 %409, label %410, label %588

410:                                              ; preds = %405
  %411 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %412 = getelementptr inbounds [4 x i8], ptr %411, i64 0, i64 0
  %413 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef %412, ptr noundef @.str.24)
  %414 = icmp ne i32 %413, 0
  br i1 %414, label %415, label %587

415:                                              ; preds = %410
  call void @llvm.lifetime.start.p0(i64 36, ptr %30) #5
  %416 = load i64, ptr %18, align 8, !tbaa !11
  %417 = icmp uge i64 %416, 36
  br i1 %417, label %418, label %585

418:                                              ; preds = %415
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %419 = load ptr, ptr %6, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.drwav, ptr %419, i32 0, i32 0
  %421 = load ptr, ptr %420, align 8, !tbaa !13
  %422 = load ptr, ptr %6, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.drwav, ptr %422, i32 0, i32 3
  %424 = load ptr, ptr %423, align 8, !tbaa !25
  %425 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %426 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %421, ptr noundef %424, ptr noundef %425, i64 noundef 36, ptr noundef %10)
  store i64 %426, ptr %31, align 8, !tbaa !11
  %427 = load i64, ptr %31, align 8, !tbaa !11
  %428 = load i64, ptr %18, align 8, !tbaa !11
  %429 = sub i64 %428, %427
  store i64 %429, ptr %18, align 8, !tbaa !11
  %430 = load i64, ptr %31, align 8, !tbaa !11
  %431 = icmp eq i64 %430, 36
  br i1 %431, label %432, label %584

432:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %433 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %434 = getelementptr inbounds i8, ptr %433, i64 0
  %435 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %434)
  %436 = load ptr, ptr %6, align 8, !tbaa !5
  %437 = getelementptr inbounds %struct.drwav, ptr %436, i32 0, i32 17
  %438 = getelementptr inbounds %struct.drwav_smpl, ptr %437, i32 0, i32 0
  store i32 %435, ptr %438, align 4, !tbaa !41
  %439 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %440 = getelementptr inbounds i8, ptr %439, i64 4
  %441 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %440)
  %442 = load ptr, ptr %6, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct.drwav, ptr %442, i32 0, i32 17
  %444 = getelementptr inbounds %struct.drwav_smpl, ptr %443, i32 0, i32 1
  store i32 %441, ptr %444, align 4, !tbaa !42
  %445 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %446 = getelementptr inbounds i8, ptr %445, i64 8
  %447 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %446)
  %448 = load ptr, ptr %6, align 8, !tbaa !5
  %449 = getelementptr inbounds %struct.drwav, ptr %448, i32 0, i32 17
  %450 = getelementptr inbounds %struct.drwav_smpl, ptr %449, i32 0, i32 2
  store i32 %447, ptr %450, align 4, !tbaa !43
  %451 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %452 = getelementptr inbounds i8, ptr %451, i64 12
  %453 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %452)
  %454 = load ptr, ptr %6, align 8, !tbaa !5
  %455 = getelementptr inbounds %struct.drwav, ptr %454, i32 0, i32 17
  %456 = getelementptr inbounds %struct.drwav_smpl, ptr %455, i32 0, i32 3
  store i32 %453, ptr %456, align 4, !tbaa !44
  %457 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %458 = getelementptr inbounds i8, ptr %457, i64 16
  %459 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %458)
  %460 = load ptr, ptr %6, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.drwav, ptr %460, i32 0, i32 17
  %462 = getelementptr inbounds %struct.drwav_smpl, ptr %461, i32 0, i32 4
  store i32 %459, ptr %462, align 4, !tbaa !45
  %463 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %464 = getelementptr inbounds i8, ptr %463, i64 20
  %465 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %464)
  %466 = load ptr, ptr %6, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.drwav, ptr %466, i32 0, i32 17
  %468 = getelementptr inbounds %struct.drwav_smpl, ptr %467, i32 0, i32 5
  store i32 %465, ptr %468, align 4, !tbaa !46
  %469 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %470 = getelementptr inbounds i8, ptr %469, i64 24
  %471 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %470)
  %472 = load ptr, ptr %6, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.drwav, ptr %472, i32 0, i32 17
  %474 = getelementptr inbounds %struct.drwav_smpl, ptr %473, i32 0, i32 6
  store i32 %471, ptr %474, align 4, !tbaa !47
  %475 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %476 = getelementptr inbounds i8, ptr %475, i64 28
  %477 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %476)
  %478 = load ptr, ptr %6, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.drwav, ptr %478, i32 0, i32 17
  %480 = getelementptr inbounds %struct.drwav_smpl, ptr %479, i32 0, i32 7
  store i32 %477, ptr %480, align 4, !tbaa !48
  %481 = getelementptr inbounds [36 x i8], ptr %30, i64 0, i64 0
  %482 = getelementptr inbounds i8, ptr %481, i64 32
  %483 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %482)
  %484 = load ptr, ptr %6, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.drwav, ptr %484, i32 0, i32 17
  %486 = getelementptr inbounds %struct.drwav_smpl, ptr %485, i32 0, i32 8
  store i32 %483, ptr %486, align 4, !tbaa !49
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %487

487:                                              ; preds = %580, %432
  %488 = load i32, ptr %32, align 4, !tbaa !9
  %489 = load ptr, ptr %6, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.drwav, ptr %489, i32 0, i32 17
  %491 = getelementptr inbounds %struct.drwav_smpl, ptr %490, i32 0, i32 7
  %492 = load i32, ptr %491, align 4, !tbaa !48
  %493 = icmp ult i32 %488, %492
  br i1 %493, label %494, label %498

494:                                              ; preds = %487
  %495 = load i32, ptr %32, align 4, !tbaa !9
  %496 = zext i32 %495 to i64
  %497 = icmp ult i64 %496, 1
  br label %498

498:                                              ; preds = %494, %487
  %499 = phi i1 [ false, %487 ], [ %497, %494 ]
  br i1 %499, label %500, label %583

500:                                              ; preds = %498
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #5
  %501 = load ptr, ptr %6, align 8, !tbaa !5
  %502 = getelementptr inbounds %struct.drwav, ptr %501, i32 0, i32 0
  %503 = load ptr, ptr %502, align 8, !tbaa !13
  %504 = load ptr, ptr %6, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.drwav, ptr %504, i32 0, i32 3
  %506 = load ptr, ptr %505, align 8, !tbaa !25
  %507 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %508 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %503, ptr noundef %506, ptr noundef %507, i64 noundef 24, ptr noundef %10)
  store i64 %508, ptr %31, align 8, !tbaa !11
  %509 = load i64, ptr %31, align 8, !tbaa !11
  %510 = load i64, ptr %18, align 8, !tbaa !11
  %511 = sub i64 %510, %509
  store i64 %511, ptr %18, align 8, !tbaa !11
  %512 = load i64, ptr %31, align 8, !tbaa !11
  %513 = icmp eq i64 %512, 24
  br i1 %513, label %514, label %575

514:                                              ; preds = %500
  %515 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %516 = getelementptr inbounds i8, ptr %515, i64 0
  %517 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %516)
  %518 = load ptr, ptr %6, align 8, !tbaa !5
  %519 = getelementptr inbounds %struct.drwav, ptr %518, i32 0, i32 17
  %520 = getelementptr inbounds %struct.drwav_smpl, ptr %519, i32 0, i32 9
  %521 = load i32, ptr %32, align 4, !tbaa !9
  %522 = zext i32 %521 to i64
  %523 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %520, i64 0, i64 %522
  %524 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %523, i32 0, i32 0
  store i32 %517, ptr %524, align 4, !tbaa !50
  %525 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %526 = getelementptr inbounds i8, ptr %525, i64 4
  %527 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %526)
  %528 = load ptr, ptr %6, align 8, !tbaa !5
  %529 = getelementptr inbounds %struct.drwav, ptr %528, i32 0, i32 17
  %530 = getelementptr inbounds %struct.drwav_smpl, ptr %529, i32 0, i32 9
  %531 = load i32, ptr %32, align 4, !tbaa !9
  %532 = zext i32 %531 to i64
  %533 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %530, i64 0, i64 %532
  %534 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %533, i32 0, i32 1
  store i32 %527, ptr %534, align 4, !tbaa !52
  %535 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %536 = getelementptr inbounds i8, ptr %535, i64 8
  %537 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %536)
  %538 = load ptr, ptr %6, align 8, !tbaa !5
  %539 = getelementptr inbounds %struct.drwav, ptr %538, i32 0, i32 17
  %540 = getelementptr inbounds %struct.drwav_smpl, ptr %539, i32 0, i32 9
  %541 = load i32, ptr %32, align 4, !tbaa !9
  %542 = zext i32 %541 to i64
  %543 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %540, i64 0, i64 %542
  %544 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %543, i32 0, i32 2
  store i32 %537, ptr %544, align 4, !tbaa !53
  %545 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %546 = getelementptr inbounds i8, ptr %545, i64 12
  %547 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %546)
  %548 = load ptr, ptr %6, align 8, !tbaa !5
  %549 = getelementptr inbounds %struct.drwav, ptr %548, i32 0, i32 17
  %550 = getelementptr inbounds %struct.drwav_smpl, ptr %549, i32 0, i32 9
  %551 = load i32, ptr %32, align 4, !tbaa !9
  %552 = zext i32 %551 to i64
  %553 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %550, i64 0, i64 %552
  %554 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %553, i32 0, i32 3
  store i32 %547, ptr %554, align 4, !tbaa !54
  %555 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %556 = getelementptr inbounds i8, ptr %555, i64 16
  %557 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %556)
  %558 = load ptr, ptr %6, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.drwav, ptr %558, i32 0, i32 17
  %560 = getelementptr inbounds %struct.drwav_smpl, ptr %559, i32 0, i32 9
  %561 = load i32, ptr %32, align 4, !tbaa !9
  %562 = zext i32 %561 to i64
  %563 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %560, i64 0, i64 %562
  %564 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %563, i32 0, i32 4
  store i32 %557, ptr %564, align 4, !tbaa !55
  %565 = getelementptr inbounds [24 x i8], ptr %33, i64 0, i64 0
  %566 = getelementptr inbounds i8, ptr %565, i64 20
  %567 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef %566)
  %568 = load ptr, ptr %6, align 8, !tbaa !5
  %569 = getelementptr inbounds %struct.drwav, ptr %568, i32 0, i32 17
  %570 = getelementptr inbounds %struct.drwav_smpl, ptr %569, i32 0, i32 9
  %571 = load i32, ptr %32, align 4, !tbaa !9
  %572 = zext i32 %571 to i64
  %573 = getelementptr inbounds [1 x %struct.drwav_smpl_loop], ptr %570, i64 0, i64 %572
  %574 = getelementptr inbounds %struct.drwav_smpl_loop, ptr %573, i32 0, i32 5
  store i32 %567, ptr %574, align 4, !tbaa !56
  br label %576

575:                                              ; preds = %500
  store i32 7, ptr %19, align 4
  br label %577

576:                                              ; preds = %514
  store i32 0, ptr %19, align 4
  br label %577

577:                                              ; preds = %576, %575
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #5
  %578 = load i32, ptr %19, align 4
  switch i32 %578, label %795 [
    i32 0, label %579
    i32 7, label %583
  ]

579:                                              ; preds = %577
  br label %580

580:                                              ; preds = %579
  %581 = load i32, ptr %32, align 4, !tbaa !9
  %582 = add i32 %581, 1
  store i32 %582, ptr %32, align 4, !tbaa !9
  br label %487, !llvm.loop !57

583:                                              ; preds = %577, %498
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %584

584:                                              ; preds = %583, %418
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %586

585:                                              ; preds = %415
  br label %586

586:                                              ; preds = %585, %584
  call void @llvm.lifetime.end.p0(i64 36, ptr %30) #5
  br label %587

587:                                              ; preds = %586, %410
  br label %595

588:                                              ; preds = %405
  %589 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 0
  %590 = getelementptr inbounds [16 x i8], ptr %589, i64 0, i64 0
  %591 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef %590, ptr noundef @_ZL18drwavGUID_W64_SMPL)
  %592 = icmp ne i32 %591, 0
  br i1 %592, label %593, label %594

593:                                              ; preds = %588
  br label %594

594:                                              ; preds = %593, %588
  br label %595

595:                                              ; preds = %594, %587
  %596 = getelementptr inbounds %struct.drwav_chunk_header, ptr %26, i32 0, i32 2
  %597 = load i32, ptr %596, align 8, !tbaa !58
  %598 = zext i32 %597 to i64
  %599 = load i64, ptr %18, align 8, !tbaa !11
  %600 = add i64 %599, %598
  store i64 %600, ptr %18, align 8, !tbaa !11
  %601 = load ptr, ptr %6, align 8, !tbaa !5
  %602 = getelementptr inbounds %struct.drwav, ptr %601, i32 0, i32 2
  %603 = load ptr, ptr %602, align 8, !tbaa !30
  %604 = load i64, ptr %18, align 8, !tbaa !11
  %605 = load ptr, ptr %6, align 8, !tbaa !5
  %606 = getelementptr inbounds %struct.drwav, ptr %605, i32 0, i32 3
  %607 = load ptr, ptr %606, align 8, !tbaa !25
  %608 = call noundef i32 @_ZL19drwav__seek_forwardPFjPvi17drwav_seek_originEmS_(ptr noundef %603, i64 noundef %604, ptr noundef %607)
  %609 = icmp ne i32 %608, 0
  br i1 %609, label %611, label %610

610:                                              ; preds = %595
  store i32 5, ptr %19, align 4
  br label %622

611:                                              ; preds = %595
  %612 = load i64, ptr %18, align 8, !tbaa !11
  %613 = load i64, ptr %10, align 8, !tbaa !11
  %614 = add i64 %613, %612
  store i64 %614, ptr %10, align 8, !tbaa !11
  %615 = load i32, ptr %16, align 4, !tbaa !9
  %616 = icmp ne i32 %615, 0
  br i1 %616, label %621, label %617

617:                                              ; preds = %611
  %618 = load i64, ptr %10, align 8, !tbaa !11
  %619 = load ptr, ptr %6, align 8, !tbaa !5
  %620 = getelementptr inbounds %struct.drwav, ptr %619, i32 0, i32 13
  store i64 %618, ptr %620, align 8, !tbaa !37
  br label %621

621:                                              ; preds = %617, %611
  store i32 0, ptr %19, align 4
  br label %622

622:                                              ; preds = %621, %610, %393, %375, %334, %295, %260, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #5
  %623 = load i32, ptr %19, align 4
  switch i32 %623, label %793 [
    i32 0, label %624
    i32 5, label %625
  ]

624:                                              ; preds = %622
  br label %243, !llvm.loop !59

625:                                              ; preds = %622
  %626 = load i32, ptr %16, align 4, !tbaa !9
  %627 = icmp ne i32 %626, 0
  br i1 %627, label %629, label %628

628:                                              ; preds = %625
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

629:                                              ; preds = %625
  %630 = load i32, ptr %11, align 4, !tbaa !9
  %631 = icmp ne i32 %630, 0
  br i1 %631, label %649, label %632

632:                                              ; preds = %629
  %633 = load ptr, ptr %6, align 8, !tbaa !5
  %634 = getelementptr inbounds %struct.drwav, ptr %633, i32 0, i32 2
  %635 = load ptr, ptr %634, align 8, !tbaa !30
  %636 = load ptr, ptr %6, align 8, !tbaa !5
  %637 = getelementptr inbounds %struct.drwav, ptr %636, i32 0, i32 13
  %638 = load i64, ptr %637, align 8, !tbaa !37
  %639 = load ptr, ptr %6, align 8, !tbaa !5
  %640 = getelementptr inbounds %struct.drwav, ptr %639, i32 0, i32 3
  %641 = load ptr, ptr %640, align 8, !tbaa !25
  %642 = call noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef %635, i64 noundef %638, ptr noundef %641)
  %643 = icmp ne i32 %642, 0
  br i1 %643, label %645, label %644

644:                                              ; preds = %632
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

645:                                              ; preds = %632
  %646 = load ptr, ptr %6, align 8, !tbaa !5
  %647 = getelementptr inbounds %struct.drwav, ptr %646, i32 0, i32 13
  %648 = load i64, ptr %647, align 8, !tbaa !37
  store i64 %648, ptr %10, align 8, !tbaa !11
  br label %649

649:                                              ; preds = %645, %629
  %650 = load ptr, ptr %6, align 8, !tbaa !5
  %651 = getelementptr inbounds %struct.drwav, ptr %650, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %651, ptr align 4 %13, i64 40, i1 false), !tbaa.struct !60
  %652 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 2
  %653 = load i32, ptr %652, align 4, !tbaa !31
  %654 = load ptr, ptr %6, align 8, !tbaa !5
  %655 = getelementptr inbounds %struct.drwav, ptr %654, i32 0, i32 7
  store i32 %653, ptr %655, align 4, !tbaa !61
  %656 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %657 = load i16, ptr %656, align 2, !tbaa !32
  %658 = load ptr, ptr %6, align 8, !tbaa !5
  %659 = getelementptr inbounds %struct.drwav, ptr %658, i32 0, i32 8
  store i16 %657, ptr %659, align 8, !tbaa !62
  %660 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 5
  %661 = load i16, ptr %660, align 2, !tbaa !33
  %662 = load ptr, ptr %6, align 8, !tbaa !5
  %663 = getelementptr inbounds %struct.drwav, ptr %662, i32 0, i32 9
  store i16 %661, ptr %663, align 2, !tbaa !63
  %664 = load i64, ptr %17, align 8, !tbaa !11
  %665 = load ptr, ptr %6, align 8, !tbaa !5
  %666 = getelementptr inbounds %struct.drwav, ptr %665, i32 0, i32 14
  store i64 %664, ptr %666, align 8, !tbaa !64
  %667 = load i16, ptr %14, align 2, !tbaa !36
  %668 = load ptr, ptr %6, align 8, !tbaa !5
  %669 = getelementptr inbounds %struct.drwav, ptr %668, i32 0, i32 10
  store i16 %667, ptr %669, align 4, !tbaa !40
  %670 = load i64, ptr %17, align 8, !tbaa !11
  %671 = load ptr, ptr %6, align 8, !tbaa !5
  %672 = getelementptr inbounds %struct.drwav, ptr %671, i32 0, i32 12
  store i64 %670, ptr %672, align 8, !tbaa !65
  %673 = load i64, ptr %15, align 8, !tbaa !11
  %674 = icmp ne i64 %673, 0
  br i1 %674, label %675, label %679

675:                                              ; preds = %649
  %676 = load i64, ptr %15, align 8, !tbaa !11
  %677 = load ptr, ptr %6, align 8, !tbaa !5
  %678 = getelementptr inbounds %struct.drwav, ptr %677, i32 0, i32 11
  store i64 %676, ptr %678, align 8, !tbaa !66
  br label %772

679:                                              ; preds = %649
  %680 = load i64, ptr %17, align 8, !tbaa !11
  %681 = load ptr, ptr %6, align 8, !tbaa !5
  %682 = call noundef i32 @_ZL29drwav_get_bytes_per_pcm_frameP5drwav(ptr noundef %681)
  %683 = zext i32 %682 to i64
  %684 = udiv i64 %680, %683
  %685 = load ptr, ptr %6, align 8, !tbaa !5
  %686 = getelementptr inbounds %struct.drwav, ptr %685, i32 0, i32 11
  store i64 %684, ptr %686, align 8, !tbaa !66
  %687 = load ptr, ptr %6, align 8, !tbaa !5
  %688 = getelementptr inbounds %struct.drwav, ptr %687, i32 0, i32 10
  %689 = load i16, ptr %688, align 4, !tbaa !40
  %690 = zext i16 %689 to i32
  %691 = icmp eq i32 %690, 2
  br i1 %691, label %692, label %726

692:                                              ; preds = %679
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %693 = load i64, ptr %17, align 8, !tbaa !11
  %694 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 4
  %695 = load i16, ptr %694, align 4, !tbaa !34
  %696 = zext i16 %695 to i64
  %697 = udiv i64 %693, %696
  store i64 %697, ptr %35, align 8, !tbaa !11
  %698 = load i64, ptr %35, align 8, !tbaa !11
  %699 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 4
  %700 = load i16, ptr %699, align 4, !tbaa !34
  %701 = zext i16 %700 to i64
  %702 = mul i64 %698, %701
  %703 = load i64, ptr %17, align 8, !tbaa !11
  %704 = icmp ult i64 %702, %703
  br i1 %704, label %705, label %708

705:                                              ; preds = %692
  %706 = load i64, ptr %35, align 8, !tbaa !11
  %707 = add i64 %706, 1
  store i64 %707, ptr %35, align 8, !tbaa !11
  br label %708

708:                                              ; preds = %705, %692
  %709 = load i64, ptr %35, align 8, !tbaa !11
  %710 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %711 = load i16, ptr %710, align 2, !tbaa !32
  %712 = zext i16 %711 to i32
  %713 = mul nsw i32 6, %712
  %714 = sext i32 %713 to i64
  %715 = mul i64 %709, %714
  store i64 %715, ptr %34, align 8, !tbaa !11
  %716 = load i64, ptr %17, align 8, !tbaa !11
  %717 = load i64, ptr %34, align 8, !tbaa !11
  %718 = sub i64 %716, %717
  %719 = mul i64 %718, 2
  %720 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %721 = load i16, ptr %720, align 2, !tbaa !32
  %722 = zext i16 %721 to i64
  %723 = udiv i64 %719, %722
  %724 = load ptr, ptr %6, align 8, !tbaa !5
  %725 = getelementptr inbounds %struct.drwav, ptr %724, i32 0, i32 11
  store i64 %723, ptr %725, align 8, !tbaa !66
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  br label %726

726:                                              ; preds = %708, %679
  %727 = load ptr, ptr %6, align 8, !tbaa !5
  %728 = getelementptr inbounds %struct.drwav, ptr %727, i32 0, i32 10
  %729 = load i16, ptr %728, align 4, !tbaa !40
  %730 = zext i16 %729 to i32
  %731 = icmp eq i32 %730, 17
  br i1 %731, label %732, label %771

732:                                              ; preds = %726
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %733 = load i64, ptr %17, align 8, !tbaa !11
  %734 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 4
  %735 = load i16, ptr %734, align 4, !tbaa !34
  %736 = zext i16 %735 to i64
  %737 = udiv i64 %733, %736
  store i64 %737, ptr %37, align 8, !tbaa !11
  %738 = load i64, ptr %37, align 8, !tbaa !11
  %739 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 4
  %740 = load i16, ptr %739, align 4, !tbaa !34
  %741 = zext i16 %740 to i64
  %742 = mul i64 %738, %741
  %743 = load i64, ptr %17, align 8, !tbaa !11
  %744 = icmp ult i64 %742, %743
  br i1 %744, label %745, label %748

745:                                              ; preds = %732
  %746 = load i64, ptr %37, align 8, !tbaa !11
  %747 = add i64 %746, 1
  store i64 %747, ptr %37, align 8, !tbaa !11
  br label %748

748:                                              ; preds = %745, %732
  %749 = load i64, ptr %37, align 8, !tbaa !11
  %750 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %751 = load i16, ptr %750, align 2, !tbaa !32
  %752 = zext i16 %751 to i32
  %753 = mul nsw i32 4, %752
  %754 = sext i32 %753 to i64
  %755 = mul i64 %749, %754
  store i64 %755, ptr %36, align 8, !tbaa !11
  %756 = load i64, ptr %17, align 8, !tbaa !11
  %757 = load i64, ptr %36, align 8, !tbaa !11
  %758 = sub i64 %756, %757
  %759 = mul i64 %758, 2
  %760 = getelementptr inbounds %struct.drwav_fmt, ptr %13, i32 0, i32 1
  %761 = load i16, ptr %760, align 2, !tbaa !32
  %762 = zext i16 %761 to i64
  %763 = udiv i64 %759, %762
  %764 = load ptr, ptr %6, align 8, !tbaa !5
  %765 = getelementptr inbounds %struct.drwav, ptr %764, i32 0, i32 11
  store i64 %763, ptr %765, align 8, !tbaa !66
  %766 = load i64, ptr %37, align 8, !tbaa !11
  %767 = load ptr, ptr %6, align 8, !tbaa !5
  %768 = getelementptr inbounds %struct.drwav, ptr %767, i32 0, i32 11
  %769 = load i64, ptr %768, align 8, !tbaa !66
  %770 = add i64 %769, %766
  store i64 %770, ptr %768, align 8, !tbaa !66
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  br label %771

771:                                              ; preds = %748, %726
  br label %772

772:                                              ; preds = %771, %675
  %773 = load ptr, ptr %6, align 8, !tbaa !5
  %774 = getelementptr inbounds %struct.drwav, ptr %773, i32 0, i32 10
  %775 = load i16, ptr %774, align 4, !tbaa !40
  %776 = zext i16 %775 to i32
  %777 = icmp eq i32 %776, 2
  br i1 %777, label %784, label %778

778:                                              ; preds = %772
  %779 = load ptr, ptr %6, align 8, !tbaa !5
  %780 = getelementptr inbounds %struct.drwav, ptr %779, i32 0, i32 10
  %781 = load i16, ptr %780, align 4, !tbaa !40
  %782 = zext i16 %781 to i32
  %783 = icmp eq i32 %782, 17
  br i1 %783, label %784, label %792

784:                                              ; preds = %778, %772
  %785 = load ptr, ptr %6, align 8, !tbaa !5
  %786 = getelementptr inbounds %struct.drwav, ptr %785, i32 0, i32 8
  %787 = load i16, ptr %786, align 8, !tbaa !62
  %788 = zext i16 %787 to i32
  %789 = icmp sgt i32 %788, 2
  br i1 %789, label %790, label %791

790:                                              ; preds = %784
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

791:                                              ; preds = %784
  br label %792

792:                                              ; preds = %791, %778
  store i32 1, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %793

793:                                              ; preds = %792, %790, %644, %628, %622, %230, %196, %178, %142, %102, %99, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %794 = load i32, ptr %5, align 4
  ret i32 %794

795:                                              ; preds = %577
  unreachable
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef, ptr noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL19drwav__bytes_to_u64PKh(ptr noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15drwav__read_fmtPFmPvS_mEPFjS_i17drwav_seek_originES_15drwav_containerPmP9drwav_fmt(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL19drwav__bytes_to_u16PKh(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL24drwav__read_chunk_headerPFmPvS_mES_15drwav_containerPmP18drwav_chunk_header(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19drwav__seek_forwardPFjPvi17drwav_seek_originEmS_(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL29drwav_get_bytes_per_pcm_frameP5drwav(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline 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 #4 = { 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 #5 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS5drwav", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !16, i64 64, !17, i64 68, !10, i64 108, !18, i64 112, !18, i64 114, !18, i64 116, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !10, i64 160, !19, i64 164, !20, i64 224, !21, i64 248, !22, i64 288, !23, i64 296, !24, i64 348}
!15 = !{!"_ZTS26drwav_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTS15drwav_container", !7, i64 0}
!17 = !{!"_ZTS9drwav_fmt", !18, i64 0, !18, i64 2, !10, i64 4, !10, i64 8, !18, i64 12, !18, i64 14, !18, i64 16, !18, i64 18, !10, i64 20, !7, i64 24}
!18 = !{!"short", !7, i64 0}
!19 = !{!"_ZTS10drwav_smpl", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 36}
!20 = !{!"_ZTS20drwav__memory_stream", !6, i64 0, !12, i64 8, !12, i64 16}
!21 = !{!"_ZTS26drwav__memory_stream_write", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!22 = !{!"_ZTSN5drwavUt_E", !12, i64 0}
!23 = !{!"_ZTSN5drwavUt0_E", !10, i64 0, !7, i64 4, !7, i64 8, !7, i64 16, !10, i64 32, !7, i64 36}
!24 = !{!"_ZTSN5drwavUt1_E", !10, i64 0, !7, i64 4, !7, i64 12, !7, i64 20, !10, i64 84}
!25 = !{!14, !6, i64 24}
!26 = !{!14, !16, i64 64}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!14, !6, i64 16}
!31 = !{!17, !10, i64 4}
!32 = !{!17, !18, i64 2}
!33 = !{!17, !18, i64 14}
!34 = !{!17, !18, i64 12}
!35 = !{!17, !18, i64 0}
!36 = !{!18, !18, i64 0}
!37 = !{!14, !12, i64 136}
!38 = !{!39, !12, i64 16}
!39 = !{!"_ZTS18drwav_chunk_header", !7, i64 0, !12, i64 16, !10, i64 24}
!40 = !{!14, !18, i64 116}
!41 = !{!14, !10, i64 164}
!42 = !{!14, !10, i64 168}
!43 = !{!14, !10, i64 172}
!44 = !{!14, !10, i64 176}
!45 = !{!14, !10, i64 180}
!46 = !{!14, !10, i64 184}
!47 = !{!14, !10, i64 188}
!48 = !{!14, !10, i64 192}
!49 = !{!14, !10, i64 196}
!50 = !{!51, !10, i64 0}
!51 = !{!"_ZTS15drwav_smpl_loop", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!52 = !{!51, !10, i64 4}
!53 = !{!51, !10, i64 8}
!54 = !{!51, !10, i64 12}
!55 = !{!51, !10, i64 16}
!56 = !{!51, !10, i64 20}
!57 = distinct !{!57, !29}
!58 = !{!39, !10, i64 24}
!59 = distinct !{!59, !29}
!60 = !{i64 0, i64 2, !36, i64 2, i64 2, !36, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 2, !36, i64 14, i64 2, !36, i64 16, i64 2, !36, i64 18, i64 2, !36, i64 20, i64 4, !9, i64 24, i64 16, !27}
!61 = !{!14, !10, i64 108}
!62 = !{!14, !18, i64 112}
!63 = !{!14, !18, i64 114}
!64 = !{!14, !12, i64 144}
!65 = !{!14, !12, i64 128}
!66 = !{!14, !12, i64 120}


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

%struct.drwav_fmt = type { i16, i16, i32, i32, i16, i16, i16, i16, i32, [16 x i8] }
%struct.drwav_chunk_header = type { %union.anon.4, i64, i32 }
%union.anon.4 = type { [16 x i8] }

@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_RIFF = external hidden local_unnamed_addr constant [16 x i8], align 16
@.str.21 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_WAVE = external hidden constant [16 x i8], align 16
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_DATA = external hidden constant [16 x i8], align 16
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_FACT = external hidden constant [16 x i8], align 16
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL18drwavGUID_W64_SMPL = external hidden constant [16 x i8], align 16

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_Z20drwav_init__internalP5drwavPFmPvPFmS1_S1_mEPFjS1_i17drwav_seek_originES1_PK18drwav_chunk_headerES1_j(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca i64, align 8
  %6 = alloca [4 x i8], align 1
  %7 = alloca %struct.drwav_fmt, align 4
  %8 = alloca i64, align 8
  %9 = alloca [12 x i8], align 1
  %10 = alloca [4 x i8], align 1
  %11 = alloca [4 x i8], align 1
  %12 = alloca [8 x i8], align 1
  %13 = alloca [16 x i8], align 16
  %14 = alloca %struct.drwav_chunk_header, align 8
  %15 = alloca i32, align 4
  %16 = alloca [36 x i8], align 16
  %17 = alloca [24 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  %18 = and i32 %3, 1
  %19 = icmp ne i32 %18, 0
  %20 = load ptr, ptr %0, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load ptr, ptr %21, align 8, !tbaa !23
  %23 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %20, ptr noundef %22, ptr noundef nonnull %6, i64 noundef 4, ptr noundef nonnull %5)
  %.not = icmp eq i64 %23, 4
  br i1 %.not, label %24, label %333

24:                                               ; preds = %4
  %25 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %6, ptr noundef nonnull @.str.19)
  %.not212 = icmp eq i32 %25, 0
  br i1 %.not212, label %28, label %.thread309

.thread309:                                       ; preds = %24
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %26, align 8, !tbaa !24
  %27 = getelementptr inbounds i8, ptr %0, i64 64
  br label %73

28:                                               ; preds = %24
  %29 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %6, ptr noundef nonnull @.str.20)
  %.not213 = icmp eq i32 %29, 0
  br i1 %.not213, label %333, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  %31 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 1, ptr %31, align 8, !tbaa !24
  %32 = load ptr, ptr %0, align 8, !tbaa !9
  %33 = load ptr, ptr %21, align 8, !tbaa !23
  %34 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %32, ptr noundef %33, ptr noundef nonnull %9, i64 noundef 12, ptr noundef nonnull %5)
  %.not214 = icmp eq i64 %34, 12
  br i1 %.not214, label %.preheader.preheader, label %.critedge

.preheader.preheader:                             ; preds = %30
  %35 = load i8, ptr %9, align 1, !tbaa !25
  %36 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 4), align 4, !tbaa !25
  %.not215 = icmp eq i8 %35, %36
  br i1 %.not215, label %.preheader.1, label %.critedge

.preheader.1:                                     ; preds = %.preheader.preheader
  %37 = getelementptr inbounds i8, ptr %9, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !25
  %39 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 5), align 1, !tbaa !25
  %.not215.1 = icmp eq i8 %38, %39
  br i1 %.not215.1, label %.preheader.2, label %.critedge

.preheader.2:                                     ; preds = %.preheader.1
  %40 = getelementptr inbounds i8, ptr %9, i64 2
  %41 = load i8, ptr %40, align 1, !tbaa !25
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 6), align 2, !tbaa !25
  %.not215.2 = icmp eq i8 %41, %42
  br i1 %.not215.2, label %.preheader.3, label %.critedge

.preheader.3:                                     ; preds = %.preheader.2
  %43 = getelementptr inbounds i8, ptr %9, i64 3
  %44 = load i8, ptr %43, align 1, !tbaa !25
  %45 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 7), align 1, !tbaa !25
  %.not215.3 = icmp eq i8 %44, %45
  br i1 %.not215.3, label %.preheader.4, label %.critedge

.preheader.4:                                     ; preds = %.preheader.3
  %46 = getelementptr inbounds i8, ptr %9, i64 4
  %47 = load i8, ptr %46, align 1, !tbaa !25
  %48 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 8), align 8, !tbaa !25
  %.not215.4 = icmp eq i8 %47, %48
  br i1 %.not215.4, label %.preheader.5, label %.critedge

.preheader.5:                                     ; preds = %.preheader.4
  %49 = getelementptr inbounds i8, ptr %9, i64 5
  %50 = load i8, ptr %49, align 1, !tbaa !25
  %51 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 9), align 1, !tbaa !25
  %.not215.5 = icmp eq i8 %50, %51
  br i1 %.not215.5, label %.preheader.6, label %.critedge

.preheader.6:                                     ; preds = %.preheader.5
  %52 = getelementptr inbounds i8, ptr %9, i64 6
  %53 = load i8, ptr %52, align 1, !tbaa !25
  %54 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 10), align 2, !tbaa !25
  %.not215.6 = icmp eq i8 %53, %54
  br i1 %.not215.6, label %.preheader.7, label %.critedge

.preheader.7:                                     ; preds = %.preheader.6
  %55 = getelementptr inbounds i8, ptr %9, i64 7
  %56 = load i8, ptr %55, align 1, !tbaa !25
  %57 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 11), align 1, !tbaa !25
  %.not215.7 = icmp eq i8 %56, %57
  br i1 %.not215.7, label %.preheader.8, label %.critedge

.preheader.8:                                     ; preds = %.preheader.7
  %58 = getelementptr inbounds i8, ptr %9, i64 8
  %59 = load i8, ptr %58, align 1, !tbaa !25
  %60 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 12), align 4, !tbaa !25
  %.not215.8 = icmp eq i8 %59, %60
  br i1 %.not215.8, label %.preheader.9, label %.critedge

.preheader.9:                                     ; preds = %.preheader.8
  %61 = getelementptr inbounds i8, ptr %9, i64 9
  %62 = load i8, ptr %61, align 1, !tbaa !25
  %63 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 13), align 1, !tbaa !25
  %.not215.9 = icmp eq i8 %62, %63
  br i1 %.not215.9, label %.preheader.10, label %.critedge

.preheader.10:                                    ; preds = %.preheader.9
  %64 = getelementptr inbounds i8, ptr %9, i64 10
  %65 = load i8, ptr %64, align 1, !tbaa !25
  %66 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 14), align 2, !tbaa !25
  %.not215.10 = icmp eq i8 %65, %66
  br i1 %.not215.10, label %.preheader.11, label %.critedge

.preheader.11:                                    ; preds = %.preheader.10
  %67 = getelementptr inbounds i8, ptr %9, i64 11
  %68 = load i8, ptr %67, align 1, !tbaa !25
  %69 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL18drwavGUID_W64_RIFF, i64 15), align 1, !tbaa !25
  %.not215.11 = icmp eq i8 %68, %69
  br i1 %.not215.11, label %70, label %.critedge

70:                                               ; preds = %.preheader.11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  %.pre = load i32, ptr %31, align 8, !tbaa !24
  %71 = getelementptr inbounds i8, ptr %0, i64 64
  %72 = icmp eq i32 %.pre, 0
  br i1 %72, label %73, label %87

73:                                               ; preds = %.thread309, %70
  %74 = phi ptr [ %27, %.thread309 ], [ %71, %70 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %75 = load ptr, ptr %0, align 8, !tbaa !9
  %76 = load ptr, ptr %21, align 8, !tbaa !23
  %77 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %75, ptr noundef %76, ptr noundef nonnull %10, i64 noundef 4, ptr noundef nonnull %5)
  %.not219 = icmp eq i64 %77, 4
  br i1 %.not219, label %78, label %.critedge241

78:                                               ; preds = %73
  %79 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %10)
  %80 = icmp ult i32 %79, 36
  br i1 %80, label %.critedge241, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr %0, align 8, !tbaa !9
  %83 = load ptr, ptr %21, align 8, !tbaa !23
  %84 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %82, ptr noundef %83, ptr noundef nonnull %11, i64 noundef 4, ptr noundef nonnull %5)
  %.not220 = icmp eq i64 %84, 4
  br i1 %.not220, label %85, label %.critedge241

85:                                               ; preds = %81
  %86 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %11, ptr noundef nonnull @.str.21)
  %.not221.not = icmp eq i32 %86, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br i1 %.not221.not, label %333, label %100

87:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %88 = load ptr, ptr %0, align 8, !tbaa !9
  %89 = load ptr, ptr %21, align 8, !tbaa !23
  %90 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %88, ptr noundef %89, ptr noundef nonnull %12, i64 noundef 8, ptr noundef nonnull %5)
  %.not216 = icmp eq i64 %90, 8
  br i1 %.not216, label %91, label %.critedge244

91:                                               ; preds = %87
  %92 = call noundef i64 @_ZL19drwav__bytes_to_u64PKh(ptr noundef nonnull %12)
  %93 = icmp ult i64 %92, 80
  br i1 %93, label %.critedge244, label %94

94:                                               ; preds = %91
  %95 = load ptr, ptr %0, align 8, !tbaa !9
  %96 = load ptr, ptr %21, align 8, !tbaa !23
  %97 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %95, ptr noundef %96, ptr noundef nonnull %13, i64 noundef 16, ptr noundef nonnull %5)
  %.not217 = icmp eq i64 %97, 16
  br i1 %.not217, label %98, label %.critedge244

98:                                               ; preds = %94
  %99 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef nonnull %13, ptr noundef nonnull @_ZL18drwavGUID_W64_WAVE)
  %.not218.not = icmp eq i32 %99, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br i1 %.not218.not, label %333, label %100

100:                                              ; preds = %98, %85
  %101 = phi ptr [ %71, %98 ], [ %74, %85 ]
  %102 = load ptr, ptr %0, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %0, i64 16
  %104 = load ptr, ptr %103, align 8, !tbaa !26
  %105 = load ptr, ptr %21, align 8, !tbaa !23
  %106 = load i32, ptr %101, align 8, !tbaa !24
  %107 = call noundef i32 @_ZL15drwav__read_fmtPFmPvS_mEPFjS_i17drwav_seek_originES_15drwav_containerPmP9drwav_fmt(ptr noundef %102, ptr noundef %104, ptr noundef %105, i32 noundef %106, ptr noundef nonnull %5, ptr noundef nonnull %7)
  %.not222 = icmp eq i32 %107, 0
  br i1 %.not222, label %333, label %108

108:                                              ; preds = %100
  %109 = getelementptr inbounds i8, ptr %7, i64 4
  %110 = load i32, ptr %109, align 4
  %111 = add i32 %110, -384001
  %or.cond = icmp ult i32 %111, -384000
  %112 = getelementptr inbounds i8, ptr %7, i64 2
  %113 = load i16, ptr %112, align 2
  %114 = add i16 %113, -257
  %115 = icmp ult i16 %114, -256
  %or.cond14 = select i1 %or.cond, i1 true, i1 %115
  %116 = getelementptr inbounds i8, ptr %7, i64 14
  %117 = load i16, ptr %116, align 2
  %118 = add i16 %117, -65
  %119 = icmp ult i16 %118, -64
  %or.cond22 = select i1 %or.cond14, i1 true, i1 %119
  %120 = getelementptr inbounds i8, ptr %7, i64 12
  %121 = load i16, ptr %120, align 4
  %122 = icmp eq i16 %121, 0
  %or.cond26 = select i1 %or.cond22, i1 true, i1 %122
  br i1 %or.cond26, label %333, label %123

123:                                              ; preds = %108
  %124 = load i16, ptr %7, align 4, !tbaa !27
  %125 = icmp eq i16 %124, -2
  br i1 %125, label %126, label %129

126:                                              ; preds = %123
  %127 = getelementptr inbounds i8, ptr %7, i64 24
  %128 = call noundef zeroext i16 @_ZL19drwav__bytes_to_u16PKh(ptr noundef nonnull %127)
  br label %129

129:                                              ; preds = %126, %123
  %.0185 = phi i16 [ %128, %126 ], [ %124, %123 ]
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  %130 = load ptr, ptr %0, align 8, !tbaa !9
  %131 = load ptr, ptr %21, align 8, !tbaa !23
  %132 = load i32, ptr %101, align 8, !tbaa !24
  %133 = call noundef i32 @_ZL24drwav__read_chunk_headerPFmPvS_mES_15drwav_containerPmP18drwav_chunk_header(ptr noundef %130, ptr noundef %131, i32 noundef %132, ptr noundef nonnull %5, ptr noundef nonnull %14)
  %.not223294 = icmp eq i32 %133, 0
  br i1 %.not223294, label %.lr.ph297, label %.thread258

.lr.ph297:                                        ; preds = %129
  %134 = icmp eq i32 %18, 0
  %135 = icmp ne ptr %1, null
  %or.cond28 = and i1 %135, %134
  %136 = getelementptr inbounds i8, ptr %0, i64 136
  %137 = getelementptr inbounds i8, ptr %14, i64 16
  %138 = getelementptr inbounds i8, ptr %0, i64 116
  %139 = getelementptr inbounds i8, ptr %0, i64 164
  %140 = getelementptr inbounds i8, ptr %16, i64 4
  %141 = getelementptr inbounds i8, ptr %0, i64 168
  %142 = getelementptr inbounds i8, ptr %16, i64 8
  %143 = getelementptr inbounds i8, ptr %0, i64 172
  %144 = getelementptr inbounds i8, ptr %16, i64 12
  %145 = getelementptr inbounds i8, ptr %0, i64 176
  %146 = getelementptr inbounds i8, ptr %16, i64 16
  %147 = getelementptr inbounds i8, ptr %0, i64 180
  %148 = getelementptr inbounds i8, ptr %16, i64 20
  %149 = getelementptr inbounds i8, ptr %0, i64 184
  %150 = getelementptr inbounds i8, ptr %16, i64 24
  %151 = getelementptr inbounds i8, ptr %0, i64 188
  %152 = getelementptr inbounds i8, ptr %16, i64 28
  %153 = getelementptr inbounds i8, ptr %0, i64 192
  %154 = getelementptr inbounds i8, ptr %16, i64 32
  %155 = getelementptr inbounds i8, ptr %0, i64 196
  %156 = getelementptr inbounds i8, ptr %0, i64 200
  %157 = getelementptr inbounds i8, ptr %17, i64 4
  %158 = getelementptr inbounds i8, ptr %0, i64 204
  %159 = getelementptr inbounds i8, ptr %17, i64 8
  %160 = getelementptr inbounds i8, ptr %0, i64 208
  %161 = getelementptr inbounds i8, ptr %17, i64 12
  %162 = getelementptr inbounds i8, ptr %0, i64 212
  %163 = getelementptr inbounds i8, ptr %17, i64 16
  %164 = getelementptr inbounds i8, ptr %0, i64 216
  %165 = getelementptr inbounds i8, ptr %17, i64 20
  %166 = getelementptr inbounds i8, ptr %0, i64 220
  %167 = getelementptr inbounds i8, ptr %14, i64 24
  br label %169

._crit_edge:                                      ; preds = %268
  %168 = icmp eq i32 %spec.select251, 0
  br i1 %168, label %.thread258, label %.loopexit278.thread

.loopexit278.thread:                              ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %274

169:                                              ; preds = %.lr.ph297, %268
  %.0187296 = phi i32 [ 0, %.lr.ph297 ], [ %spec.select251, %268 ]
  %.0190295 = phi i64 [ 0, %.lr.ph297 ], [ %spec.select250, %268 ]
  br i1 %or.cond28, label %170, label %.critedge248

170:                                              ; preds = %169
  %171 = load ptr, ptr %0, align 8, !tbaa !9
  %172 = load ptr, ptr %103, align 8, !tbaa !26
  %173 = load ptr, ptr %21, align 8, !tbaa !23
  %174 = call noundef i64 %1(ptr noundef %2, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef nonnull %14)
  %.not224 = icmp eq i64 %174, 0
  br i1 %.not224, label %.critedge248, label %175

175:                                              ; preds = %170
  %176 = load ptr, ptr %103, align 8, !tbaa !26
  %177 = load i64, ptr %5, align 8, !tbaa !5
  %178 = load ptr, ptr %21, align 8, !tbaa !23
  %179 = call noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef %176, i64 noundef %177, ptr noundef %178)
  %.not225 = icmp eq i32 %179, 0
  br i1 %.not225, label %.thread258, label %.critedge248

.critedge248:                                     ; preds = %170, %175, %169
  %.not226 = icmp eq i32 %.0187296, 0
  br i1 %.not226, label %180, label %182

180:                                              ; preds = %.critedge248
  %181 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %181, ptr %136, align 8, !tbaa !28
  br label %182

182:                                              ; preds = %180, %.critedge248
  %183 = load i64, ptr %137, align 8, !tbaa !29
  %184 = load i32, ptr %101, align 8, !tbaa !24
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %188

186:                                              ; preds = %182
  %187 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %14, ptr noundef nonnull @.str.22)
  br label %190

188:                                              ; preds = %182
  %189 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef nonnull %14, ptr noundef nonnull @_ZL18drwavGUID_W64_DATA)
  br label %190

190:                                              ; preds = %188, %186
  %.sink = phi i32 [ %189, %188 ], [ %187, %186 ]
  %.not227 = icmp eq i32 %.sink, 0
  %spec.select250 = select i1 %.not227, i64 %.0190295, i64 %183
  %spec.select251 = select i1 %.not227, i32 %.0187296, i32 1
  %191 = icmp ne i32 %spec.select251, 0
  %or.cond30 = and i1 %19, %191
  br i1 %or.cond30, label %.thread274, label %192

.thread274:                                       ; preds = %190
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %283

192:                                              ; preds = %190
  %193 = load i32, ptr %101, align 8, !tbaa !24
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %195, label %210

195:                                              ; preds = %192
  %196 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %14, ptr noundef nonnull @.str.23)
  %.not231 = icmp eq i32 %196, 0
  br i1 %.not231, label %220, label %197

197:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  %198 = load ptr, ptr %0, align 8, !tbaa !9
  %199 = load ptr, ptr %21, align 8, !tbaa !23
  %200 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %198, ptr noundef %199, ptr noundef nonnull %15, i64 noundef 4, ptr noundef nonnull %5)
  %.not232 = icmp eq i64 %200, 4
  br i1 %.not232, label %201, label %209

201:                                              ; preds = %197
  %202 = add i64 %183, -4
  br i1 %191, label %.thread, label %203

203:                                              ; preds = %201
  %204 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %204, ptr %136, align 8, !tbaa !28
  br label %.thread

.thread:                                          ; preds = %201, %203
  %205 = load i16, ptr %138, align 4, !tbaa !31
  %206 = icmp eq i16 %205, 2
  %207 = load i32, ptr %15, align 4
  %208 = zext i32 %207 to i64
  %storemerge = select i1 %206, i64 %208, i64 0
  store i64 %storemerge, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %220

209:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %.thread258

210:                                              ; preds = %192
  %211 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef nonnull %14, ptr noundef nonnull @_ZL18drwavGUID_W64_FACT)
  %.not229 = icmp eq i32 %211, 0
  br i1 %.not229, label %220, label %212

212:                                              ; preds = %210
  %213 = load ptr, ptr %0, align 8, !tbaa !9
  %214 = load ptr, ptr %21, align 8, !tbaa !23
  %215 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %213, ptr noundef %214, ptr noundef nonnull %8, i64 noundef 8, ptr noundef nonnull %5)
  %.not230 = icmp eq i64 %215, 8
  br i1 %.not230, label %216, label %.thread258

216:                                              ; preds = %212
  %217 = add i64 %183, -8
  br i1 %191, label %220, label %218

218:                                              ; preds = %216
  %219 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %219, ptr %136, align 8, !tbaa !28
  br label %220

220:                                              ; preds = %.thread, %210, %218, %216, %195
  %.1202 = phi i64 [ %183, %195 ], [ %217, %216 ], [ %217, %218 ], [ %183, %210 ], [ %202, %.thread ]
  %221 = load i32, ptr %101, align 8, !tbaa !24
  %222 = icmp eq i32 %221, 0
  br i1 %222, label %223, label %255

223:                                              ; preds = %220
  %224 = call noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef nonnull %14, ptr noundef nonnull @.str.24)
  %.not233 = icmp eq i32 %224, 0
  br i1 %.not233, label %257, label %225

225:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %16) #5
  %226 = icmp ugt i64 %.1202, 35
  br i1 %226, label %227, label %.loopexit

227:                                              ; preds = %225
  %228 = load ptr, ptr %0, align 8, !tbaa !9
  %229 = load ptr, ptr %21, align 8, !tbaa !23
  %230 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %228, ptr noundef %229, ptr noundef nonnull %16, i64 noundef 36, ptr noundef nonnull %5)
  %231 = sub i64 %.1202, %230
  %232 = icmp eq i64 %230, 36
  br i1 %232, label %233, label %.loopexit

233:                                              ; preds = %227
  %234 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %16)
  store i32 %234, ptr %139, align 4, !tbaa !32
  %235 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %140)
  store i32 %235, ptr %141, align 4, !tbaa !33
  %236 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %142)
  store i32 %236, ptr %143, align 4, !tbaa !34
  %237 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %144)
  store i32 %237, ptr %145, align 4, !tbaa !35
  %238 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %146)
  store i32 %238, ptr %147, align 4, !tbaa !36
  %239 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %148)
  store i32 %239, ptr %149, align 4, !tbaa !37
  %240 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %150)
  store i32 %240, ptr %151, align 4, !tbaa !38
  %241 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %152)
  store i32 %241, ptr %153, align 4, !tbaa !39
  %242 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %154)
  store i32 %242, ptr %155, align 4, !tbaa !40
  %243 = load i32, ptr %153, align 4, !tbaa !39
  %.not300 = icmp eq i32 %243, 0
  br i1 %.not300, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %233
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #5
  %244 = load ptr, ptr %0, align 8, !tbaa !9
  %245 = load ptr, ptr %21, align 8, !tbaa !23
  %246 = call noundef i64 @_Z14drwav__on_readPFmPvS_mES_S_mPm(ptr noundef %244, ptr noundef %245, ptr noundef nonnull %17, i64 noundef 24, ptr noundef nonnull %5)
  %247 = sub i64 %231, %246
  %248 = icmp eq i64 %246, 24
  br i1 %248, label %..loopexit_crit_edge, label %.thread255

.thread255:                                       ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  br label %.loopexit

..loopexit_crit_edge:                             ; preds = %.lr.ph
  %249 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %17)
  store i32 %249, ptr %156, align 4, !tbaa !41
  %250 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %157)
  store i32 %250, ptr %158, align 4, !tbaa !43
  %251 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %159)
  store i32 %251, ptr %160, align 4, !tbaa !44
  %252 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %161)
  store i32 %252, ptr %162, align 4, !tbaa !45
  %253 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %163)
  store i32 %253, ptr %164, align 4, !tbaa !46
  %254 = call noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef nonnull %165)
  store i32 %254, ptr %166, align 4, !tbaa !47
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #5
  br label %.loopexit

.loopexit:                                        ; preds = %233, %..loopexit_crit_edge, %.thread255, %227, %225
  %.5206 = phi i64 [ %.1202, %225 ], [ %231, %227 ], [ %247, %.thread255 ], [ %247, %..loopexit_crit_edge ], [ %231, %233 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %16) #5
  br label %257

255:                                              ; preds = %220
  %256 = call noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef nonnull %14, ptr noundef nonnull @_ZL18drwavGUID_W64_SMPL)
  br label %257

257:                                              ; preds = %223, %.loopexit, %255
  %.6207 = phi i64 [ %.5206, %.loopexit ], [ %.1202, %223 ], [ %.1202, %255 ]
  %258 = load i32, ptr %167, align 8, !tbaa !48
  %259 = zext i32 %258 to i64
  %260 = add i64 %.6207, %259
  %261 = load ptr, ptr %103, align 8, !tbaa !26
  %262 = load ptr, ptr %21, align 8, !tbaa !23
  %263 = call noundef i32 @_ZL19drwav__seek_forwardPFjPvi17drwav_seek_originEmS_(ptr noundef %261, i64 noundef %260, ptr noundef %262)
  %.not234 = icmp eq i32 %263, 0
  br i1 %.not234, label %.loopexit278, label %264

264:                                              ; preds = %257
  %265 = load i64, ptr %5, align 8, !tbaa !5
  %266 = add i64 %265, %260
  store i64 %266, ptr %5, align 8, !tbaa !5
  br i1 %191, label %268, label %267

267:                                              ; preds = %264
  store i64 %266, ptr %136, align 8, !tbaa !28
  br label %268

.thread258:                                       ; preds = %175, %212, %129, %209, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br label %333

268:                                              ; preds = %264, %267
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  %269 = load ptr, ptr %0, align 8, !tbaa !9
  %270 = load ptr, ptr %21, align 8, !tbaa !23
  %271 = load i32, ptr %101, align 8, !tbaa !24
  %272 = call noundef i32 @_ZL24drwav__read_chunk_headerPFmPvS_mES_15drwav_containerPmP18drwav_chunk_header(ptr noundef %269, ptr noundef %270, i32 noundef %271, ptr noundef nonnull %5, ptr noundef nonnull %14)
  %.not223 = icmp eq i32 %272, 0
  br i1 %.not223, label %169, label %._crit_edge

.loopexit278:                                     ; preds = %257
  %273 = icmp eq i32 %spec.select251, 0
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  br i1 %273, label %333, label %274

274:                                              ; preds = %.loopexit278.thread, %.loopexit278
  br i1 %19, label %283, label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %103, align 8, !tbaa !26
  %277 = getelementptr inbounds i8, ptr %0, i64 136
  %278 = load i64, ptr %277, align 8, !tbaa !28
  %279 = load ptr, ptr %21, align 8, !tbaa !23
  %280 = call noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef %276, i64 noundef %278, ptr noundef %279)
  %.not237 = icmp eq i32 %280, 0
  br i1 %.not237, label %333, label %281

281:                                              ; preds = %275
  %282 = load i64, ptr %277, align 8, !tbaa !28
  store i64 %282, ptr %5, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %.thread274, %281, %274
  %284 = getelementptr inbounds i8, ptr %0, i64 68
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(40) %284, ptr noundef nonnull align 4 dereferenceable(40) %7, i64 40, i1 false), !tbaa.struct !49
  %285 = load i32, ptr %109, align 4, !tbaa !52
  %286 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 %285, ptr %286, align 4, !tbaa !53
  %287 = load i16, ptr %112, align 2, !tbaa !54
  %288 = getelementptr inbounds i8, ptr %0, i64 112
  store i16 %287, ptr %288, align 8, !tbaa !55
  %289 = load i16, ptr %116, align 2, !tbaa !56
  %290 = getelementptr inbounds i8, ptr %0, i64 114
  store i16 %289, ptr %290, align 2, !tbaa !57
  %291 = getelementptr inbounds i8, ptr %0, i64 144
  store i64 %spec.select250, ptr %291, align 8, !tbaa !58
  %292 = getelementptr inbounds i8, ptr %0, i64 116
  store i16 %.0185, ptr %292, align 4, !tbaa !31
  %293 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %spec.select250, ptr %293, align 8, !tbaa !59
  %294 = load i64, ptr %8, align 8, !tbaa !5
  %.not238 = icmp eq i64 %294, 0
  br i1 %.not238, label %297, label %295

295:                                              ; preds = %283
  %296 = getelementptr inbounds i8, ptr %0, i64 120
  store i64 %294, ptr %296, align 8, !tbaa !60
  br label %thread-pre-split

297:                                              ; preds = %283
  %298 = call noundef i32 @_ZL29drwav_get_bytes_per_pcm_frameP5drwav(ptr noundef nonnull %0)
  %299 = zext i32 %298 to i64
  %300 = udiv i64 %spec.select250, %299
  %301 = getelementptr inbounds i8, ptr %0, i64 120
  store i64 %300, ptr %301, align 8, !tbaa !60
  %302 = load i16, ptr %292, align 4, !tbaa !31
  switch i16 %302, label %thread-pre-split [
    i16 2, label %.thread277
    i16 17, label %314
  ]

.thread277:                                       ; preds = %297
  %303 = load i16, ptr %120, align 4, !tbaa !61
  %304 = zext i16 %303 to i64
  %305 = udiv i64 %spec.select250, %304
  %306 = mul i64 %305, %304
  %307 = icmp ult i64 %306, %spec.select250
  %308 = zext i1 %307 to i64
  %spec.select252 = add i64 %305, %308
  %309 = load i16, ptr %112, align 2, !tbaa !54
  %310 = zext i16 %309 to i64
  %.neg = mul i64 %310, 9223372036854775802
  %.neg239 = mul i64 %.neg, %spec.select252
  %311 = add i64 %.neg239, %spec.select250
  %312 = shl i64 %311, 1
  %313 = udiv i64 %312, %310
  br label %thread-pre-split.thread.sink.split

314:                                              ; preds = %297
  %315 = load i16, ptr %120, align 4, !tbaa !61
  %316 = zext i16 %315 to i64
  %317 = udiv i64 %spec.select250, %316
  %318 = mul i64 %317, %316
  %319 = icmp ult i64 %318, %spec.select250
  %320 = zext i1 %319 to i64
  %spec.select253 = add i64 %317, %320
  %321 = load i16, ptr %112, align 2, !tbaa !54
  %322 = zext i16 %321 to i64
  %323 = shl nuw nsw i64 %322, 2
  %324 = mul i64 %323, %spec.select253
  %325 = sub i64 %spec.select250, %324
  %326 = shl i64 %325, 1
  %327 = udiv i64 %326, %322
  %328 = add i64 %spec.select253, %327
  br label %thread-pre-split.thread.sink.split

thread-pre-split:                                 ; preds = %295, %297
  %329 = phi i16 [ %302, %297 ], [ %.0185, %295 ]
  switch i16 %329, label %332 [
    i16 2, label %thread-pre-split.thread
    i16 17, label %thread-pre-split.thread
  ]

thread-pre-split.thread.sink.split:               ; preds = %314, %.thread277
  %.sink323 = phi i64 [ %313, %.thread277 ], [ %328, %314 ]
  store i64 %.sink323, ptr %301, align 8, !tbaa !60
  br label %thread-pre-split.thread

thread-pre-split.thread:                          ; preds = %thread-pre-split.thread.sink.split, %thread-pre-split, %thread-pre-split
  %330 = load i16, ptr %288, align 8, !tbaa !55
  %331 = icmp ugt i16 %330, 2
  br i1 %331, label %333, label %332

332:                                              ; preds = %thread-pre-split, %thread-pre-split.thread
  br label %333

.critedge:                                        ; preds = %.preheader.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %.preheader.4, %.preheader.5, %.preheader.6, %.preheader.7, %.preheader.8, %.preheader.9, %.preheader.10, %.preheader.11, %30
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  br label %333

.critedge241:                                     ; preds = %81, %78, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %333

.critedge244:                                     ; preds = %94, %91, %87
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %333

333:                                              ; preds = %.thread258, %thread-pre-split.thread, %275, %.loopexit278, %108, %100, %.critedge244, %.critedge241, %28, %.critedge, %4, %85, %98, %332
  %.11 = phi i32 [ 1, %332 ], [ 0, %85 ], [ 0, %98 ], [ 0, %4 ], [ 0, %.critedge ], [ 0, %28 ], [ 0, %.critedge241 ], [ 0, %.critedge244 ], [ 0, %100 ], [ 0, %108 ], [ 0, %.loopexit278 ], [ 0, %275 ], [ 0, %thread-pre-split.thread ], [ 0, %.thread258 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret i32 %.11
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL19drwav__fourcc_equalPKhPKc(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL19drwav__bytes_to_u32PKh(ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL19drwav__bytes_to_u64PKh(ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17drwav__guid_equalPKhS0_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15drwav__read_fmtPFmPvS_mEPFjS_i17drwav_seek_originES_15drwav_containerPmP9drwav_fmt(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL19drwav__bytes_to_u16PKh(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL24drwav__read_chunk_headerPFmPvS_mES_15drwav_containerPmP18drwav_chunk_header(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22drwav__seek_from_startPFjPvi17drwav_seek_originEmS_(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19drwav__seek_forwardPFjPvi17drwav_seek_originEmS_(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL29drwav_get_bytes_per_pcm_frameP5drwav(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline 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 #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS5drwav", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 64, !14, i64 68, !16, i64 108, !15, i64 112, !15, i64 114, !15, i64 116, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !16, i64 160, !17, i64 164, !18, i64 224, !19, i64 248, !20, i64 288, !21, i64 296, !22, i64 348}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTS26drwav_allocation_callbacks", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!13 = !{!"_ZTS15drwav_container", !7, i64 0}
!14 = !{!"_ZTS9drwav_fmt", !15, i64 0, !15, i64 2, !16, i64 4, !16, i64 8, !15, i64 12, !15, i64 14, !15, i64 16, !15, i64 18, !16, i64 20, !7, i64 24}
!15 = !{!"short", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS10drwav_smpl", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !7, i64 36}
!18 = !{!"_ZTS20drwav__memory_stream", !11, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTS26drwav__memory_stream_write", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!20 = !{!"_ZTSN5drwavUt_E", !6, i64 0}
!21 = !{!"_ZTSN5drwavUt0_E", !16, i64 0, !7, i64 4, !7, i64 8, !7, i64 16, !16, i64 32, !7, i64 36}
!22 = !{!"_ZTSN5drwavUt1_E", !16, i64 0, !7, i64 4, !7, i64 12, !7, i64 20, !16, i64 84}
!23 = !{!10, !11, i64 24}
!24 = !{!10, !13, i64 64}
!25 = !{!7, !7, i64 0}
!26 = !{!10, !11, i64 16}
!27 = !{!14, !15, i64 0}
!28 = !{!10, !6, i64 136}
!29 = !{!30, !6, i64 16}
!30 = !{!"_ZTS18drwav_chunk_header", !7, i64 0, !6, i64 16, !16, i64 24}
!31 = !{!10, !15, i64 116}
!32 = !{!10, !16, i64 164}
!33 = !{!10, !16, i64 168}
!34 = !{!10, !16, i64 172}
!35 = !{!10, !16, i64 176}
!36 = !{!10, !16, i64 180}
!37 = !{!10, !16, i64 184}
!38 = !{!10, !16, i64 188}
!39 = !{!10, !16, i64 192}
!40 = !{!10, !16, i64 196}
!41 = !{!42, !16, i64 0}
!42 = !{!"_ZTS15drwav_smpl_loop", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20}
!43 = !{!42, !16, i64 4}
!44 = !{!42, !16, i64 8}
!45 = !{!42, !16, i64 12}
!46 = !{!42, !16, i64 16}
!47 = !{!42, !16, i64 20}
!48 = !{!30, !16, i64 24}
!49 = !{i64 0, i64 2, !50, i64 2, i64 2, !50, i64 4, i64 4, !51, i64 8, i64 4, !51, i64 12, i64 2, !50, i64 14, i64 2, !50, i64 16, i64 2, !50, i64 18, i64 2, !50, i64 20, i64 4, !51, i64 24, i64 16, !25}
!50 = !{!15, !15, i64 0}
!51 = !{!16, !16, i64 0}
!52 = !{!14, !16, i64 4}
!53 = !{!10, !16, i64 108}
!54 = !{!14, !15, i64 2}
!55 = !{!10, !15, i64 112}
!56 = !{!14, !15, i64 14}
!57 = !{!10, !15, i64 114}
!58 = !{!10, !6, i64 144}
!59 = !{!10, !6, i64 128}
!60 = !{!10, !6, i64 120}
!61 = !{!14, !15, i64 12}


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