; 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.drmp3_src = type { %struct.drmp3_src_config, ptr, ptr, [256 x float], %struct.drmp3_src_cache, %union.anon }
%struct.drmp3_src_config = type { i32, i32, i32, i32, i32 }
%struct.drmp3_src_cache = type { ptr, [1024 x float], i32, i32 }
%union.anon = type { %struct.anon }
%struct.anon = type { double, i8 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj = external hidden unnamed_addr constant [91 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj(ptr noundef %0, i64 noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %4
  br label %27

25:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2638, ptr noundef @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #4
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = icmp ugt i64 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  br label %33

31:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 2639, ptr noundef @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #4
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  br label %39

37:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 2640, ptr noundef @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #4
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.drmp3_src, ptr %40, i32 0, i32 5
  %42 = getelementptr inbounds %struct.anon, ptr %41, i32 0, i32 1
  %43 = load i8, ptr %42, align 8
  %44 = and i8 %43, 1
  %45 = zext i8 %44 to i32
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %67, label %47

47:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.drmp3_src, ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.drmp3_src, ptr %50, i32 0, i32 3
  %52 = getelementptr inbounds [256 x float], ptr %51, i64 0, i64 0
  %53 = call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef %49, i64 noundef 1, ptr noundef %52)
  store i64 %53, ptr %12, align 8, !tbaa !9
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = icmp eq i64 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %47
  store i64 0, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %64

57:                                               ; preds = %47
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.drmp3_src, ptr %58, i32 0, i32 5
  %60 = getelementptr inbounds %struct.anon, ptr %59, i32 0, i32 1
  %61 = load i8, ptr %60, align 8
  %62 = and i8 %61, -2
  %63 = or i8 %62, 1
  store i8 %63, ptr %60, align 8
  store i32 0, ptr %13, align 4
  br label %64

64:                                               ; preds = %57, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %65 = load i32, ptr %13, align 4
  switch i32 %65, label %286 [
    i32 0, label %66
  ]

66:                                               ; preds = %64
  br label %67

67:                                               ; preds = %66, %39
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.drmp3_src, ptr %68, i32 0, i32 5
  %70 = getelementptr inbounds %struct.anon, ptr %69, i32 0, i32 1
  %71 = load i8, ptr %70, align 8
  %72 = lshr i8 %71, 1
  %73 = and i8 %72, 1
  %74 = zext i8 %73 to i32
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %102, label %76

76:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.drmp3_src, ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.drmp3_src, ptr %79, i32 0, i32 3
  %81 = getelementptr inbounds [256 x float], ptr %80, i64 0, i64 0
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.drmp3_src, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.drmp3_src_config, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !13
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds float, ptr %81, i64 %86
  %88 = call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef %78, i64 noundef 1, ptr noundef %87)
  store i64 %88, ptr %14, align 8, !tbaa !9
  %89 = load i64, ptr %14, align 8, !tbaa !9
  %90 = icmp eq i64 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %76
  store i64 0, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %99

92:                                               ; preds = %76
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.drmp3_src, ptr %93, i32 0, i32 5
  %95 = getelementptr inbounds %struct.anon, ptr %94, i32 0, i32 1
  %96 = load i8, ptr %95, align 8
  %97 = and i8 %96, -3
  %98 = or i8 %97, 2
  store i8 %98, ptr %95, align 8
  store i32 0, ptr %13, align 4
  br label %99

99:                                               ; preds = %92, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %100 = load i32, ptr %13, align 4
  switch i32 %100, label %286 [
    i32 0, label %101
  ]

101:                                              ; preds = %99
  br label %102

102:                                              ; preds = %101, %67
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.drmp3_src, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.drmp3_src_config, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !18
  %107 = uitofp i32 %106 to double
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.drmp3_src, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.drmp3_src_config, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !19
  %112 = uitofp i32 %111 to double
  %113 = fdiv double %107, %112
  store double %113, ptr %10, align 8, !tbaa !20
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %283, %102
  %115 = load i64, ptr %7, align 8, !tbaa !9
  %116 = icmp ugt i64 %115, 0
  br i1 %116, label %117, label %284

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.drmp3_src, ptr %118, i32 0, i32 3
  %120 = getelementptr inbounds [256 x float], ptr %119, i64 0, i64 0
  store ptr %120, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.drmp3_src, ptr %121, i32 0, i32 3
  %123 = getelementptr inbounds [256 x float], ptr %122, i64 0, i64 0
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.drmp3_src, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.drmp3_src_config, ptr %125, i32 0, i32 2
  %127 = load i32, ptr %126, align 8, !tbaa !13
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %123, i64 %128
  store ptr %129, ptr %18, align 8, !tbaa !5
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load ptr, ptr %17, align 8, !tbaa !5
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.drmp3_src, ptr %133, i32 0, i32 5
  %135 = getelementptr inbounds %struct.anon, ptr %134, i32 0, i32 0
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = fptrunc double %136 to float
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.drmp3_src, ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds %struct.drmp3_src_config, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 8, !tbaa !13
  call void @_ZL15drmp3_blend_f32PfS_S_fj(ptr noundef %130, ptr noundef %131, ptr noundef %132, float noundef %137, i32 noundef %141)
  %142 = load double, ptr %10, align 8, !tbaa !20
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.drmp3_src, ptr %143, i32 0, i32 5
  %145 = getelementptr inbounds %struct.anon, ptr %144, i32 0, i32 0
  %146 = load double, ptr %145, align 8, !tbaa !22
  %147 = fadd double %146, %142
  store double %147, ptr %145, align 8, !tbaa !22
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.drmp3_src, ptr %148, i32 0, i32 5
  %150 = getelementptr inbounds %struct.anon, ptr %149, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !22
  %152 = fptoui double %151 to i32
  store i32 %152, ptr %16, align 4, !tbaa !11
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.drmp3_src, ptr %153, i32 0, i32 5
  %155 = getelementptr inbounds %struct.anon, ptr %154, i32 0, i32 0
  %156 = load double, ptr %155, align 8, !tbaa !22
  %157 = load i32, ptr %16, align 4, !tbaa !11
  %158 = uitofp i32 %157 to double
  %159 = fsub double %156, %158
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.drmp3_src, ptr %160, i32 0, i32 5
  %162 = getelementptr inbounds %struct.anon, ptr %161, i32 0, i32 0
  store double %159, ptr %162, align 8, !tbaa !22
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %163

163:                                              ; preds = %243, %117
  %164 = load i32, ptr %15, align 4, !tbaa !11
  %165 = load i32, ptr %16, align 4, !tbaa !11
  %166 = icmp ult i32 %164, %165
  br i1 %166, label %167, label %246

167:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %168

168:                                              ; preds = %185, %167
  %169 = load i32, ptr %20, align 4, !tbaa !11
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.drmp3_src, ptr %170, i32 0, i32 0
  %172 = getelementptr inbounds %struct.drmp3_src_config, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %172, align 8, !tbaa !13
  %174 = icmp ult i32 %169, %173
  br i1 %174, label %175, label %188

175:                                              ; preds = %168
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = load i32, ptr %20, align 4, !tbaa !11
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds float, ptr %176, i64 %178
  %180 = load float, ptr %179, align 4, !tbaa !23
  %181 = load ptr, ptr %17, align 8, !tbaa !5
  %182 = load i32, ptr %20, align 4, !tbaa !11
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds float, ptr %181, i64 %183
  store float %180, ptr %184, align 4, !tbaa !23
  br label %185

185:                                              ; preds = %175
  %186 = load i32, ptr %20, align 4, !tbaa !11
  %187 = add i32 %186, 1
  store i32 %187, ptr %20, align 4, !tbaa !11
  br label %168, !llvm.loop !25

188:                                              ; preds = %168
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.drmp3_src, ptr %189, i32 0, i32 4
  %191 = load ptr, ptr %18, align 8, !tbaa !5
  %192 = call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef %190, i64 noundef 1, ptr noundef %191)
  store i64 %192, ptr %19, align 8, !tbaa !9
  %193 = load i64, ptr %19, align 8, !tbaa !9
  %194 = icmp eq i64 %193, 0
  br i1 %194, label %195, label %239

195:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %196

196:                                              ; preds = %208, %195
  %197 = load i32, ptr %21, align 4, !tbaa !11
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.drmp3_src, ptr %198, i32 0, i32 0
  %200 = getelementptr inbounds %struct.drmp3_src_config, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !13
  %202 = icmp ult i32 %197, %201
  br i1 %202, label %203, label %211

203:                                              ; preds = %196
  %204 = load ptr, ptr %18, align 8, !tbaa !5
  %205 = load i32, ptr %21, align 4, !tbaa !11
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds float, ptr %204, i64 %206
  store float 0.000000e+00, ptr %207, align 4, !tbaa !23
  br label %208

208:                                              ; preds = %203
  %209 = load i32, ptr %21, align 4, !tbaa !11
  %210 = add i32 %209, 1
  store i32 %210, ptr %21, align 4, !tbaa !11
  br label %196, !llvm.loop !27

211:                                              ; preds = %196
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.drmp3_src, ptr %212, i32 0, i32 5
  %214 = getelementptr inbounds %struct.anon, ptr %213, i32 0, i32 1
  %215 = load i8, ptr %214, align 8
  %216 = lshr i8 %215, 1
  %217 = and i8 %216, 1
  %218 = zext i8 %217 to i32
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %220, label %227

220:                                              ; preds = %211
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.drmp3_src, ptr %221, i32 0, i32 5
  %223 = getelementptr inbounds %struct.anon, ptr %222, i32 0, i32 1
  %224 = load i8, ptr %223, align 8
  %225 = and i8 %224, -3
  %226 = or i8 %225, 0
  store i8 %226, ptr %223, align 8
  br label %238

227:                                              ; preds = %211
  %228 = load i32, ptr %9, align 4, !tbaa !11
  %229 = icmp ne i32 %228, 0
  br i1 %229, label %230, label %237

230:                                              ; preds = %227
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.drmp3_src, ptr %231, i32 0, i32 5
  %233 = getelementptr inbounds %struct.anon, ptr %232, i32 0, i32 1
  %234 = load i8, ptr %233, align 8
  %235 = and i8 %234, -2
  %236 = or i8 %235, 0
  store i8 %236, ptr %233, align 8
  br label %237

237:                                              ; preds = %230, %227
  br label %238

238:                                              ; preds = %237, %220
  store i32 4, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %240

239:                                              ; preds = %188
  store i32 0, ptr %13, align 4
  br label %240

240:                                              ; preds = %239, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  %241 = load i32, ptr %13, align 4
  switch i32 %241, label %288 [
    i32 0, label %242
    i32 4, label %246
  ]

242:                                              ; preds = %240
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %15, align 4, !tbaa !11
  %245 = add i32 %244, 1
  store i32 %245, ptr %15, align 4, !tbaa !11
  br label %163, !llvm.loop !28

246:                                              ; preds = %240, %163
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.drmp3_src, ptr %248, i32 0, i32 0
  %250 = getelementptr inbounds %struct.drmp3_src_config, ptr %249, i32 0, i32 2
  %251 = load i32, ptr %250, align 8, !tbaa !13
  %252 = mul i32 1, %251
  %253 = zext i32 %252 to i64
  %254 = mul i64 %253, 4
  %255 = getelementptr inbounds i8, ptr %247, i64 %254
  store ptr %255, ptr %8, align 8, !tbaa !5
  %256 = load i64, ptr %7, align 8, !tbaa !9
  %257 = sub i64 %256, 1
  store i64 %257, ptr %7, align 8, !tbaa !9
  %258 = load i64, ptr %11, align 8, !tbaa !9
  %259 = add i64 %258, 1
  store i64 %259, ptr %11, align 8, !tbaa !9
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.drmp3_src, ptr %260, i32 0, i32 5
  %262 = getelementptr inbounds %struct.anon, ptr %261, i32 0, i32 1
  %263 = load i8, ptr %262, align 8
  %264 = lshr i8 %263, 1
  %265 = and i8 %264, 1
  %266 = zext i8 %265 to i32
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %280, label %268

268:                                              ; preds = %246
  %269 = load i32, ptr %9, align 4, !tbaa !11
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %279

271:                                              ; preds = %268
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.drmp3_src, ptr %272, i32 0, i32 5
  %274 = getelementptr inbounds %struct.anon, ptr %273, i32 0, i32 1
  %275 = load i8, ptr %274, align 8
  %276 = and i8 %275, 1
  %277 = zext i8 %276 to i32
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %280, label %279

279:                                              ; preds = %271, %268
  store i32 3, ptr %13, align 4
  br label %281

280:                                              ; preds = %271, %246
  store i32 0, ptr %13, align 4
  br label %281

281:                                              ; preds = %280, %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %282 = load i32, ptr %13, align 4
  switch i32 %282, label %288 [
    i32 0, label %283
    i32 3, label %284
  ]

283:                                              ; preds = %281
  br label %114, !llvm.loop !29

284:                                              ; preds = %281, %114
  %285 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %285, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %286

286:                                              ; preds = %284, %99, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %287 = load i64, ptr %5, align 8
  ret i64 %287

288:                                              ; preds = %281, %240
  unreachable
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS9drmp3_src", !15, i64 0, !6, i64 24, !6, i64 32, !7, i64 40, !17, i64 1064, !7, i64 5176}
!15 = !{!"_ZTS16drmp3_src_config", !12, i64 0, !12, i64 4, !12, i64 8, !16, i64 12, !12, i64 16}
!16 = !{!"_ZTS19drmp3_src_algorithm", !7, i64 0}
!17 = !{!"_ZTS15drmp3_src_cache", !6, i64 0, !7, i64 8, !12, i64 4104, !12, i64 4108}
!18 = !{!14, !12, i64 0}
!19 = !{!14, !12, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


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

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj = external hidden unnamed_addr constant [91 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj(ptr noundef %0, i64 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 2638, ptr noundef nonnull @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #3
  unreachable

6:                                                ; preds = %4
  %.not80 = icmp eq i64 %1, 0
  br i1 %.not80, label %7, label %8

7:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 2639, ptr noundef nonnull @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #3
  unreachable

8:                                                ; preds = %6
  %.not81 = icmp eq ptr %2, null
  br i1 %.not81, label %9, label %10

9:                                                ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 2640, ptr noundef nonnull @__PRETTY_FUNCTION__._Z28drmp3_src_read_frames_linearP9drmp3_srcmPvj) #3
  unreachable

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 5176
  %12 = getelementptr inbounds i8, ptr %0, i64 5184
  %13 = load i8, ptr %12, align 8
  %14 = and i8 %13, 1
  %.not82 = icmp eq i8 %14, 0
  br i1 %.not82, label %15, label %22

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %0, i64 1064
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = tail call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef nonnull %16, i64 noundef 1, ptr noundef nonnull %17)
  %.not83 = icmp eq i64 %18, 0
  br i1 %.not83, label %.critedge, label %19

19:                                               ; preds = %15
  %20 = load i8, ptr %12, align 8
  %21 = or i8 %20, 1
  store i8 %21, ptr %12, align 8
  br label %22

22:                                               ; preds = %19, %10
  %23 = phi i8 [ %21, %19 ], [ %13, %10 ]
  %24 = and i8 %23, 2
  %.not84 = icmp eq i8 %24, 0
  br i1 %.not84, label %25, label %36

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 1064
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds float, ptr %27, i64 %30
  %32 = tail call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef nonnull %26, i64 noundef 1, ptr noundef nonnull %31)
  %.not85 = icmp eq i64 %32, 0
  br i1 %.not85, label %.critedge, label %33

33:                                               ; preds = %25
  %34 = load i8, ptr %12, align 8
  %35 = or i8 %34, 2
  store i8 %35, ptr %12, align 8
  br label %36

36:                                               ; preds = %33, %22
  %37 = load i32, ptr %0, align 8, !tbaa !14
  %38 = uitofp i32 %37 to double
  %39 = getelementptr inbounds i8, ptr %0, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = uitofp i32 %40 to double
  %42 = fdiv double %38, %41
  %43 = getelementptr inbounds i8, ptr %0, i64 40
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = getelementptr inbounds i8, ptr %0, i64 1064
  %.not88 = icmp eq i32 %3, 0
  %.pre = load i32, ptr %44, align 8, !tbaa !5
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %36
  %46 = phi i32 [ %.pre, %36 ], [ %75, %.backedge.backedge ]
  %.068109 = phi i64 [ %1, %36 ], [ %79, %.backedge.backedge ]
  %.069108 = phi ptr [ %2, %36 ], [ %78, %.backedge.backedge ]
  %.070107 = phi i64 [ 0, %36 ], [ %80, %.backedge.backedge ]
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds float, ptr %43, i64 %47
  %49 = load double, ptr %11, align 8, !tbaa !16
  %50 = fptrunc double %49 to float
  tail call void @_ZL15drmp3_blend_f32PfS_S_fj(ptr noundef %.069108, ptr noundef nonnull %43, ptr noundef nonnull %48, float noundef %50, i32 noundef %46)
  %51 = load double, ptr %11, align 8, !tbaa !16
  %52 = fadd double %42, %51
  %53 = fptoui double %52 to i32
  %54 = uitofp i32 %53 to double
  %55 = fsub double %52, %54
  store double %55, ptr %11, align 8, !tbaa !16
  %.not111 = icmp eq i32 %53, 0
  br i1 %.not111, label %.thread, label %.preheader

56:                                               ; preds = %._crit_edge
  %57 = add nuw i32 %.072103, 1
  %exitcond115.not = icmp eq i32 %57, %53
  br i1 %exitcond115.not, label %.thread, label %.preheader, !llvm.loop !17

.preheader:                                       ; preds = %.backedge, %56
  %.072103 = phi i32 [ %57, %56 ], [ 0, %.backedge ]
  %58 = load i32, ptr %44, align 8, !tbaa !5
  %.not112 = icmp eq i32 %58, 0
  br i1 %.not112, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext i32 %58 to i64
  %min.iters.check = icmp ult i32 %58, 8
  br i1 %min.iters.check, label %.lr.ph.preheader121, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %59 = getelementptr inbounds float, ptr %48, i64 %index
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load = load <4 x float>, ptr %59, align 4, !tbaa !19
  %wide.load120 = load <4 x float>, ptr %60, align 4, !tbaa !19
  %61 = getelementptr inbounds float, ptr %43, i64 %index
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store <4 x float> %wide.load, ptr %61, align 4, !tbaa !19
  store <4 x float> %wide.load120, ptr %62, align 4, !tbaa !19
  %index.next = add nuw i64 %index, 8
  %63 = icmp eq i64 %index.next, %n.vec
  br i1 %63, label %middle.block, label %vector.body, !llvm.loop !21

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

.lr.ph.preheader121:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader121, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader121 ]
  %64 = getelementptr inbounds float, ptr %48, i64 %indvars.iv
  %65 = load float, ptr %64, align 4, !tbaa !19
  %66 = getelementptr inbounds float, ptr %43, i64 %indvars.iv
  store float %65, ptr %66, align 4, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.preheader
  %67 = tail call noundef i64 @_Z27drmp3_src_cache_read_framesP15drmp3_src_cachemPf(ptr noundef nonnull %45, i64 noundef 1, ptr noundef nonnull %48)
  %68 = icmp eq i64 %67, 0
  br i1 %68, label %.preheader101, label %56

.preheader101:                                    ; preds = %._crit_edge
  %69 = load i32, ptr %44, align 8, !tbaa !5
  %.not113 = icmp eq i32 %69, 0
  br i1 %.not113, label %._crit_edge106, label %.lr.ph105.preheader

.lr.ph105.preheader:                              ; preds = %.preheader101
  %70 = zext i32 %69 to i64
  %71 = shl nuw nsw i64 %70, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %48, i8 0, i64 %71, i1 false), !tbaa !19
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %.lr.ph105.preheader, %.preheader101
  %72 = load i8, ptr %12, align 8
  %73 = and i8 %72, 2
  %.not87 = icmp eq i8 %73, 0
  %brmerge.not = and i1 %.not87, %.not88
  br i1 %brmerge.not, label %.thread, label %.thread.sink.split

.thread.sink.split:                               ; preds = %._crit_edge106
  %.mux = select i1 %.not87, i8 -4, i8 -3
  %74 = and i8 %72, %.mux
  store i8 %74, ptr %12, align 8
  br label %.thread

.thread:                                          ; preds = %56, %._crit_edge106, %.thread.sink.split, %.backedge
  %75 = load i32, ptr %44, align 8, !tbaa !5
  %76 = zext i32 %75 to i64
  %77 = shl nuw nsw i64 %76, 2
  %78 = getelementptr inbounds i8, ptr %.069108, i64 %77
  %79 = add i64 %.068109, -1
  %80 = add i64 %.070107, 1
  %81 = load i8, ptr %12, align 8
  %82 = and i8 %81, 2
  %.not89 = icmp eq i8 %82, 0
  br i1 %.not89, label %83, label %85

83:                                               ; preds = %.thread
  %84 = and i8 %81, 1
  %.not91 = icmp eq i8 %84, 0
  %or.cond = or i1 %.not88, %.not91
  %.not86 = icmp eq i64 %79, 0
  %or.cond110 = select i1 %or.cond, i1 true, i1 %.not86
  br i1 %or.cond110, label %.critedge, label %.backedge.backedge

85:                                               ; preds = %.thread
  %.not86.old = icmp eq i64 %79, 0
  br i1 %.not86.old, label %.critedge, label %.backedge.backedge

.backedge.backedge:                               ; preds = %85, %83
  br label %.backedge

.critedge:                                        ; preds = %83, %85, %25, %15
  %.3 = phi i64 [ 0, %15 ], [ 0, %25 ], [ %80, %85 ], [ %80, %83 ]
  ret i64 %.3
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15drmp3_blend_f32PfS_S_fj(ptr noundef, ptr noundef, ptr noundef, float noundef, i32 noundef) local_unnamed_addr #1

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

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { noreturn 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, !8, i64 8}
!6 = !{!"_ZTS9drmp3_src", !7, i64 0, !12, i64 24, !12, i64 32, !9, i64 40, !13, i64 1064, !9, i64 5176}
!7 = !{!"_ZTS16drmp3_src_config", !8, i64 0, !8, i64 4, !8, i64 8, !11, i64 12, !8, i64 16}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS19drmp3_src_algorithm", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"_ZTS15drmp3_src_cache", !12, i64 0, !9, i64 8, !8, i64 4104, !8, i64 4108}
!14 = !{!6, !8, i64 0}
!15 = !{!6, !8, i64 4}
!16 = !{!9, !9, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !9, i64 0}
!21 = distinct !{!21, !18, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !18, !23, !22}


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