; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/audiosource/wav (soloud_wavstream)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.SoLoud::WavStreamInstance" = type { %"class.SoLoud::AudioSourceInstance", ptr, i32, ptr, %"union.SoLoud::WavStreamInstance::codec", i32, i32, ptr }
%"class.SoLoud::AudioSourceInstance" = type { ptr, i32, i32, i32, float, [8 x float], float, float, float, float, i32, float, float, double, double, %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", %"class.SoLoud::Fader", i32, [8 x float], i32, i32, [8 x ptr], [2 x ptr], i32, i32, i32, double }
%"class.SoLoud::Fader" = type { float, float, float, double, double, double, float, i32 }
%"union.SoLoud::WavStreamInstance::codec" = type { ptr }
%"class.SoLoud::WavStream" = type <{ %"class.SoLoud::AudioSource", i32, [4 x i8], ptr, ptr, ptr, i32, [4 x i8] }>
%"class.SoLoud::AudioSource" = type { ptr, i32, float, float, i32, i32, float, float, float, i32, float, [8 x ptr], ptr, ptr, ptr, i32, double }

@_ZTVN6SoLoud17WavStreamInstanceE = external dso_local unnamed_addr constant { [9 x ptr] }, align 8

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud16drflac_seek_funcEPvi18drflac_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud15drmp3_seek_funcEPvi17drmp3_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud15drwav_seek_funcEPvi17drwav_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud17WavStreamInstanceC2EPNS_9WavStreamE(ptr noundef nonnull align 8 dereferenceable(544) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  call void @_ZN6SoLoud19AudioSourceInstanceC2Ev(ptr noundef nonnull align 8 dereferenceable(496) %10)
  store ptr getelementptr inbounds inrange(-16, 56) ({ [9 x ptr] }, ptr @_ZTVN6SoLoud17WavStreamInstanceE, i32 0, i32 0, i32 2), ptr %10, align 8, !tbaa !9
  %11 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %12 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 5
  store i32 0, ptr %12, align 8, !tbaa !11
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  store ptr %13, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 2
  store i32 0, ptr %15, align 8, !tbaa !19
  %16 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr null, ptr %16, align 8, !tbaa !20
  %17 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr null, ptr %17, align 8, !tbaa !20
  %18 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %18, align 8, !tbaa !21
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %19, i32 0, i32 4
  %21 = load ptr, ptr %20, align 8, !tbaa !22
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %57

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %24 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #7
          to label %25 unwind label %48

25:                                               ; preds = %23
  invoke void @_ZN6SoLoud10MemoryFileC1Ev(ptr noundef nonnull align 8 dereferenceable(25) %24)
          to label %26 unwind label %52

26:                                               ; preds = %25
  store ptr %24, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr %27, ptr %28, align 8, !tbaa !21
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %30, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 8
  %35 = load ptr, ptr %34, align 8
  %36 = invoke noundef ptr %35(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %37 unwind label %48

37:                                               ; preds = %26
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %41, i64 4
  %43 = load ptr, ptr %42, align 8
  %44 = invoke noundef i32 %43(ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %45 unwind label %48

45:                                               ; preds = %37
  %46 = invoke noundef i32 @_ZN6SoLoud10MemoryFile7openMemEPKhjbb(ptr noundef nonnull align 8 dereferenceable(25) %29, ptr noundef %36, i32 noundef %44, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %47 unwind label %48

47:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %106

48:                                               ; preds = %45, %37, %26, %23
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %56

52:                                               ; preds = %25
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %24, i64 noundef 32) #8
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %297

57:                                               ; preds = %2
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %58, i32 0, i32 3
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %83

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %63 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #7
          to label %64 unwind label %74

64:                                               ; preds = %62
  invoke void @_ZN6SoLoud8DiskFileC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %63)
          to label %65 unwind label %78

65:                                               ; preds = %64
  store ptr %63, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr %66, ptr %67, align 8, !tbaa !21
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = invoke noundef i32 @_ZN6SoLoud8DiskFile4openEPKc(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef %71)
          to label %73 unwind label %74

73:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %105

74:                                               ; preds = %65, %62
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %82

78:                                               ; preds = %64
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %6, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %63, i64 noundef 16) #8
  br label %82

82:                                               ; preds = %78, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %297

83:                                               ; preds = %57
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %84, i32 0, i32 5
  %86 = load ptr, ptr %85, align 8, !tbaa !26
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %103

88:                                               ; preds = %83
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %89, i32 0, i32 5
  %91 = load ptr, ptr %90, align 8, !tbaa !26
  %92 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr %91, ptr %92, align 8, !tbaa !21
  %93 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !21
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds ptr, ptr %95, i64 5
  %97 = load ptr, ptr %96, align 8
  invoke void %97(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef 0)
          to label %98 unwind label %99

98:                                               ; preds = %88
  br label %104

99:                                               ; preds = %238, %236, %201, %118, %116, %88
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  br label %297

103:                                              ; preds = %83
  br label %296

104:                                              ; preds = %98
  br label %105

105:                                              ; preds = %104, %73
  br label %106

106:                                              ; preds = %105, %47
  %107 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %108 = load ptr, ptr %107, align 8, !tbaa !21
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %296

110:                                              ; preds = %106
  %111 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 8, !tbaa !27
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %153

116:                                              ; preds = %110
  %117 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 400) #7
          to label %118 unwind label %99

118:                                              ; preds = %116
  %119 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr %117, ptr %119, align 8, !tbaa !20
  %120 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %123 = load ptr, ptr %122, align 8, !tbaa !21
  %124 = invoke i32 @drwav_init(ptr noundef %121, ptr noundef @_ZN6SoLoud15drwav_read_funcEPvS0_m, ptr noundef @_ZN6SoLoud15drwav_seek_funcEPvi17drwav_seek_origin, ptr noundef %123, ptr noundef null)
          to label %125 unwind label %99

125:                                              ; preds = %118
  %126 = icmp ne i32 %124, 0
  br i1 %126, label %152, label %127

127:                                              ; preds = %125
  %128 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !20
  %130 = icmp eq ptr %129, null
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  call void @_ZdlPvm(ptr noundef %129, i64 noundef 400) #8
  br label %132

132:                                              ; preds = %131, %127
  %133 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr null, ptr %133, align 8, !tbaa !20
  %134 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %135 = load ptr, ptr %134, align 8, !tbaa !21
  %136 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !18
  %138 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %137, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !26
  %140 = icmp ne ptr %135, %139
  br i1 %140, label %141, label %150

141:                                              ; preds = %132
  %142 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %143 = load ptr, ptr %142, align 8, !tbaa !21
  %144 = icmp eq ptr %143, null
  br i1 %144, label %149, label %145

145:                                              ; preds = %141
  %146 = load ptr, ptr %143, align 8, !tbaa !9
  %147 = getelementptr inbounds ptr, ptr %146, i64 1
  %148 = load ptr, ptr %147, align 8
  call void %148(ptr noundef nonnull align 8 dereferenceable(8) %143) #6
  br label %149

149:                                              ; preds = %145, %141
  br label %150

150:                                              ; preds = %149, %132
  %151 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %151, align 8, !tbaa !21
  br label %152

152:                                              ; preds = %150, %125
  br label %295

153:                                              ; preds = %110
  %154 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  %156 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 8, !tbaa !27
  %158 = icmp eq i32 %157, 1
  br i1 %158, label %159, label %195

159:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %160 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %161 = load ptr, ptr %160, align 8, !tbaa !21
  %162 = invoke ptr @stb_vorbis_open_file(ptr noundef %161, i32 noundef 0, ptr noundef %9, ptr noundef null)
          to label %163 unwind label %185

163:                                              ; preds = %159
  %164 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr %162, ptr %164, align 8, !tbaa !20
  %165 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !20
  %167 = icmp ne ptr %166, null
  br i1 %167, label %191, label %168

168:                                              ; preds = %163
  %169 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !21
  %171 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !18
  %173 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %172, i32 0, i32 5
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = icmp ne ptr %170, %174
  br i1 %175, label %176, label %189

176:                                              ; preds = %168
  %177 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %178 = load ptr, ptr %177, align 8, !tbaa !21
  %179 = icmp eq ptr %178, null
  br i1 %179, label %184, label %180

180:                                              ; preds = %176
  %181 = load ptr, ptr %178, align 8, !tbaa !9
  %182 = getelementptr inbounds ptr, ptr %181, i64 1
  %183 = load ptr, ptr %182, align 8
  call void %183(ptr noundef nonnull align 8 dereferenceable(8) %178) #6
  br label %184

184:                                              ; preds = %180, %176
  br label %189

185:                                              ; preds = %159
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %6, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %297

189:                                              ; preds = %184, %168
  %190 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %190, align 8, !tbaa !21
  br label %191

191:                                              ; preds = %189, %163
  %192 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 5
  store i32 0, ptr %192, align 8, !tbaa !11
  %193 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 6
  store i32 0, ptr %193, align 4, !tbaa !28
  %194 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 7
  store ptr null, ptr %194, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %294

195:                                              ; preds = %153
  %196 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %197 = load ptr, ptr %196, align 8, !tbaa !18
  %198 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %197, i32 0, i32 1
  %199 = load i32, ptr %198, align 8, !tbaa !27
  %200 = icmp eq i32 %199, 2
  br i1 %200, label %201, label %230

201:                                              ; preds = %195
  %202 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %203 = load ptr, ptr %202, align 8, !tbaa !21
  %204 = invoke ptr @drflac_open(ptr noundef @_ZN6SoLoud16drflac_read_funcEPvS0_m, ptr noundef @_ZN6SoLoud16drflac_seek_funcEPvi18drflac_seek_origin, ptr noundef %203, ptr noundef null)
          to label %205 unwind label %99

205:                                              ; preds = %201
  %206 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr %204, ptr %206, align 8, !tbaa !20
  %207 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !20
  %209 = icmp ne ptr %208, null
  br i1 %209, label %229, label %210

210:                                              ; preds = %205
  %211 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %212 = load ptr, ptr %211, align 8, !tbaa !21
  %213 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !18
  %215 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %214, i32 0, i32 5
  %216 = load ptr, ptr %215, align 8, !tbaa !26
  %217 = icmp ne ptr %212, %216
  br i1 %217, label %218, label %227

218:                                              ; preds = %210
  %219 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %220 = load ptr, ptr %219, align 8, !tbaa !21
  %221 = icmp eq ptr %220, null
  br i1 %221, label %226, label %222

222:                                              ; preds = %218
  %223 = load ptr, ptr %220, align 8, !tbaa !9
  %224 = getelementptr inbounds ptr, ptr %223, i64 1
  %225 = load ptr, ptr %224, align 8
  call void %225(ptr noundef nonnull align 8 dereferenceable(8) %220) #6
  br label %226

226:                                              ; preds = %222, %218
  br label %227

227:                                              ; preds = %226, %210
  %228 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %228, align 8, !tbaa !21
  br label %229

229:                                              ; preds = %227, %205
  br label %293

230:                                              ; preds = %195
  %231 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !18
  %233 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %232, i32 0, i32 1
  %234 = load i32, ptr %233, align 8, !tbaa !27
  %235 = icmp eq i32 %234, 3
  br i1 %235, label %236, label %273

236:                                              ; preds = %230
  %237 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16080) #7
          to label %238 unwind label %99

238:                                              ; preds = %236
  %239 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr %237, ptr %239, align 8, !tbaa !20
  %240 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %241 = load ptr, ptr %240, align 8, !tbaa !20
  %242 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %243 = load ptr, ptr %242, align 8, !tbaa !21
  %244 = invoke i32 @drmp3_init(ptr noundef %241, ptr noundef @_ZN6SoLoud15drmp3_read_funcEPvS0_m, ptr noundef @_ZN6SoLoud15drmp3_seek_funcEPvi17drmp3_seek_origin, ptr noundef %243, ptr noundef null)
          to label %245 unwind label %99

245:                                              ; preds = %238
  %246 = icmp ne i32 %244, 0
  br i1 %246, label %272, label %247

247:                                              ; preds = %245
  %248 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  %249 = load ptr, ptr %248, align 8, !tbaa !20
  %250 = icmp eq ptr %249, null
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  call void @_ZdlPvm(ptr noundef %249, i64 noundef 16080) #8
  br label %252

252:                                              ; preds = %251, %247
  %253 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 4
  store ptr null, ptr %253, align 8, !tbaa !20
  %254 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %255 = load ptr, ptr %254, align 8, !tbaa !21
  %256 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %257 = load ptr, ptr %256, align 8, !tbaa !18
  %258 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %257, i32 0, i32 5
  %259 = load ptr, ptr %258, align 8, !tbaa !26
  %260 = icmp ne ptr %255, %259
  br i1 %260, label %261, label %270

261:                                              ; preds = %252
  %262 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %263 = load ptr, ptr %262, align 8, !tbaa !21
  %264 = icmp eq ptr %263, null
  br i1 %264, label %269, label %265

265:                                              ; preds = %261
  %266 = load ptr, ptr %263, align 8, !tbaa !9
  %267 = getelementptr inbounds ptr, ptr %266, i64 1
  %268 = load ptr, ptr %267, align 8
  call void %268(ptr noundef nonnull align 8 dereferenceable(8) %263) #6
  br label %269

269:                                              ; preds = %265, %261
  br label %270

270:                                              ; preds = %269, %252
  %271 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %271, align 8, !tbaa !21
  br label %272

272:                                              ; preds = %270, %245
  br label %292

273:                                              ; preds = %230
  %274 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %275 = load ptr, ptr %274, align 8, !tbaa !21
  %276 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 1
  %277 = load ptr, ptr %276, align 8, !tbaa !18
  %278 = getelementptr inbounds %"class.SoLoud::WavStream", ptr %277, i32 0, i32 5
  %279 = load ptr, ptr %278, align 8, !tbaa !26
  %280 = icmp ne ptr %275, %279
  br i1 %280, label %281, label %290

281:                                              ; preds = %273
  %282 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  %283 = load ptr, ptr %282, align 8, !tbaa !21
  %284 = icmp eq ptr %283, null
  br i1 %284, label %289, label %285

285:                                              ; preds = %281
  %286 = load ptr, ptr %283, align 8, !tbaa !9
  %287 = getelementptr inbounds ptr, ptr %286, i64 1
  %288 = load ptr, ptr %287, align 8
  call void %288(ptr noundef nonnull align 8 dereferenceable(8) %283) #6
  br label %289

289:                                              ; preds = %285, %281
  br label %290

290:                                              ; preds = %289, %273
  %291 = getelementptr inbounds %"class.SoLoud::WavStreamInstance", ptr %10, i32 0, i32 3
  store ptr null, ptr %291, align 8, !tbaa !21
  br label %296

292:                                              ; preds = %272
  br label %293

293:                                              ; preds = %292, %229
  br label %294

294:                                              ; preds = %293, %191
  br label %295

295:                                              ; preds = %294, %152
  br label %296

296:                                              ; preds = %295, %290, %106, %103
  ret void

297:                                              ; preds = %185, %99, %82, %56
  call void @_ZN6SoLoud19AudioSourceInstanceD2Ev(ptr noundef nonnull align 8 dereferenceable(496) %10) #6
  br label %298

298:                                              ; preds = %297
  %299 = load ptr, ptr %6, align 8
  %300 = load i32, ptr %7, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302
}

declare void @_ZN6SoLoud19AudioSourceInstanceC2Ev(ptr noundef nonnull align 8 dereferenceable(496)) unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6SoLoud10MemoryFileC1Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

declare noundef i32 @_ZN6SoLoud10MemoryFile7openMemEPKhjbb(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #2

declare void @_ZN6SoLoud8DiskFileC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare noundef i32 @_ZN6SoLoud8DiskFile4openEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN6SoLoud19AudioSourceInstanceD2Ev(ptr noundef nonnull align 8 dereferenceable(496)) unnamed_addr #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 528}
!12 = !{!"_ZTSN6SoLoud17WavStreamInstanceE", !13, i64 0, !6, i64 496, !14, i64 504, !6, i64 512, !7, i64 520, !14, i64 528, !14, i64 532, !6, i64 536}
!13 = !{!"_ZTSN6SoLoud19AudioSourceInstanceE", !14, i64 8, !14, i64 12, !14, i64 16, !15, i64 20, !7, i64 24, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !14, i64 72, !15, i64 76, !15, i64 80, !16, i64 88, !16, i64 96, !17, i64 104, !17, i64 152, !17, i64 200, !17, i64 248, !17, i64 296, !14, i64 344, !7, i64 348, !14, i64 380, !14, i64 384, !7, i64 392, !7, i64 456, !14, i64 472, !14, i64 476, !14, i64 480, !16, i64 488}
!14 = !{!"int", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN6SoLoud5FaderE", !15, i64 0, !15, i64 4, !15, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !15, i64 40, !14, i64 44}
!18 = !{!12, !6, i64 496}
!19 = !{!12, !14, i64 504}
!20 = !{!7, !7, i64 0}
!21 = !{!12, !6, i64 512}
!22 = !{!23, !6, i64 168}
!23 = !{!"_ZTSN6SoLoud9WavStreamE", !24, i64 0, !14, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !14, i64 184}
!24 = !{!"_ZTSN6SoLoud11AudioSourceE", !14, i64 8, !15, i64 12, !15, i64 16, !14, i64 20, !14, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !14, i64 40, !15, i64 44, !7, i64 48, !6, i64 112, !6, i64 120, !6, i64 128, !14, i64 136, !16, i64 144}
!25 = !{!23, !6, i64 160}
!26 = !{!23, !6, i64 176}
!27 = !{!23, !14, i64 152}
!28 = !{!12, !14, i64 532}
!29 = !{!12, !6, i64 536}


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

@_ZTVN6SoLoud17WavStreamInstanceE = external dso_local unnamed_addr constant { [9 x ptr] }, align 8

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud16drflac_seek_funcEPvi18drflac_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud15drmp3_seek_funcEPvi17drmp3_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6SoLoud15drwav_seek_funcEPvi17drwav_seek_origin(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud17WavStreamInstanceC2EPNS_9WavStreamE(ptr noundef nonnull align 8 dereferenceable(544) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  tail call void @_ZN6SoLoud19AudioSourceInstanceC2Ev(ptr noundef nonnull align 8 dereferenceable(496) %0)
  store ptr getelementptr inbounds inrange(-16, 56) (i8, ptr @_ZTVN6SoLoud17WavStreamInstanceE, i64 16), ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 528
  store i32 0, ptr %4, align 8, !tbaa !8
  %5 = getelementptr inbounds i8, ptr %0, i64 496
  store ptr %1, ptr %5, align 8, !tbaa !17
  %6 = getelementptr inbounds i8, ptr %0, i64 504
  store i32 0, ptr %6, align 8, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %0, i64 520
  %8 = getelementptr inbounds i8, ptr %0, i64 512
  %9 = getelementptr inbounds i8, ptr %1, i64 168
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  %10 = load ptr, ptr %9, align 8, !tbaa !19
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %32, label %11

11:                                               ; preds = %2
  %12 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #7
          to label %13 unwind label %28

13:                                               ; preds = %11
  invoke void @_ZN6SoLoud10MemoryFileC1Ev(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %14 unwind label %30

14:                                               ; preds = %13
  store ptr %12, ptr %8, align 8, !tbaa !22
  %15 = load ptr, ptr %9, align 8, !tbaa !19
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 64
  %18 = load ptr, ptr %17, align 8
  %19 = invoke noundef ptr %18(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %20 unwind label %28

20:                                               ; preds = %14
  %21 = load ptr, ptr %9, align 8, !tbaa !19
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 32
  %24 = load ptr, ptr %23, align 8
  %25 = invoke noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %26 unwind label %28

26:                                               ; preds = %20
  %27 = invoke noundef i32 @_ZN6SoLoud10MemoryFile7openMemEPKhjbb(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef %19, i32 noundef %25, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %54 unwind label %28

28:                                               ; preds = %26, %20, %14, %11
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %140

30:                                               ; preds = %13
  %31 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 32) #8
  br label %140

32:                                               ; preds = %2
  %33 = getelementptr inbounds i8, ptr %1, i64 160
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  %.not26 = icmp eq ptr %34, null
  br i1 %.not26, label %45, label %35

35:                                               ; preds = %32
  %36 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #7
          to label %37 unwind label %41

37:                                               ; preds = %35
  invoke void @_ZN6SoLoud8DiskFileC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %38 unwind label %43

38:                                               ; preds = %37
  store ptr %36, ptr %8, align 8, !tbaa !22
  %39 = load ptr, ptr %33, align 8, !tbaa !23
  %40 = invoke noundef i32 @_ZN6SoLoud8DiskFile4openEPKc(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef %39)
          to label %54 unwind label %41

41:                                               ; preds = %38, %35
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %140

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %36, i64 noundef 16) #8
  br label %140

45:                                               ; preds = %32
  %46 = getelementptr inbounds i8, ptr %1, i64 176
  %47 = load ptr, ptr %46, align 8, !tbaa !24
  %.not27 = icmp eq ptr %47, null
  br i1 %.not27, label %139, label %48

48:                                               ; preds = %45
  store ptr %47, ptr %8, align 8, !tbaa !22
  %49 = load ptr, ptr %47, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 40
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr noundef nonnull align 8 dereferenceable(8) %47, i32 noundef 0)
          to label %54 unwind label %52

52:                                               ; preds = %113, %111, %97, %62, %60, %48
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %140

54:                                               ; preds = %38, %26, %48
  %55 = load ptr, ptr %8, align 8, !tbaa !22
  %.not31 = icmp eq ptr %55, null
  br i1 %.not31, label %139, label %56

56:                                               ; preds = %54
  %57 = load ptr, ptr %5, align 8, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %57, i64 152
  %59 = load i32, ptr %58, align 8, !tbaa !25
  switch i32 %59, label %131 [
    i32 0, label %60
    i32 1, label %80
    i32 2, label %97
    i32 3, label %111
  ]

60:                                               ; preds = %56
  %61 = invoke noalias noundef nonnull dereferenceable(400) ptr @_Znwm(i64 noundef 400) #7
          to label %62 unwind label %52

62:                                               ; preds = %60
  store ptr %61, ptr %7, align 8, !tbaa !26
  %63 = invoke i32 @drwav_init(ptr noundef nonnull %61, ptr noundef nonnull @_ZN6SoLoud15drwav_read_funcEPvS0_m, ptr noundef nonnull @_ZN6SoLoud15drwav_seek_funcEPvi17drwav_seek_origin, ptr noundef nonnull %55, ptr noundef null)
          to label %64 unwind label %52

64:                                               ; preds = %62
  %.not41 = icmp eq i32 %63, 0
  br i1 %.not41, label %65, label %139

65:                                               ; preds = %64
  %66 = load ptr, ptr %7, align 8, !tbaa !26
  %67 = icmp eq ptr %66, null
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  tail call void @_ZdlPvm(ptr noundef nonnull %66, i64 noundef 400) #8
  br label %69

69:                                               ; preds = %68, %65
  store ptr null, ptr %7, align 8, !tbaa !26
  %70 = load ptr, ptr %8, align 8, !tbaa !22
  %71 = load ptr, ptr %5, align 8, !tbaa !17
  %72 = getelementptr inbounds i8, ptr %71, i64 176
  %73 = load ptr, ptr %72, align 8, !tbaa !24
  %.not42 = icmp eq ptr %70, %73
  %74 = icmp eq ptr %70, null
  %or.cond = or i1 %74, %.not42
  br i1 %or.cond, label %79, label %75

75:                                               ; preds = %69
  %76 = load ptr, ptr %70, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  %78 = load ptr, ptr %77, align 8
  tail call void %78(ptr noundef nonnull align 8 dereferenceable(8) %70) #9
  br label %79

79:                                               ; preds = %75, %69
  store ptr null, ptr %8, align 8, !tbaa !22
  br label %139

80:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %81 = invoke ptr @stb_vorbis_open_file(ptr noundef nonnull %55, i32 noundef 0, ptr noundef nonnull %3, ptr noundef null)
          to label %82 unwind label %93

82:                                               ; preds = %80
  store ptr %81, ptr %7, align 8, !tbaa !26
  %.not37 = icmp eq ptr %81, null
  br i1 %.not37, label %83, label %96

83:                                               ; preds = %82
  %84 = load ptr, ptr %8, align 8, !tbaa !22
  %85 = load ptr, ptr %5, align 8, !tbaa !17
  %86 = getelementptr inbounds i8, ptr %85, i64 176
  %87 = load ptr, ptr %86, align 8, !tbaa !24
  %.not38 = icmp eq ptr %84, %87
  %88 = icmp eq ptr %84, null
  %or.cond43 = or i1 %88, %.not38
  br i1 %or.cond43, label %95, label %89

89:                                               ; preds = %83
  %90 = load ptr, ptr %84, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = load ptr, ptr %91, align 8
  call void %92(ptr noundef nonnull align 8 dereferenceable(8) %84) #9
  br label %95

93:                                               ; preds = %80
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %140

95:                                               ; preds = %89, %83
  store ptr null, ptr %8, align 8, !tbaa !22
  br label %96

96:                                               ; preds = %95, %82
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  br label %139

97:                                               ; preds = %56
  %98 = invoke ptr @drflac_open(ptr noundef nonnull @_ZN6SoLoud16drflac_read_funcEPvS0_m, ptr noundef nonnull @_ZN6SoLoud16drflac_seek_funcEPvi18drflac_seek_origin, ptr noundef nonnull %55, ptr noundef null)
          to label %99 unwind label %52

99:                                               ; preds = %97
  store ptr %98, ptr %7, align 8, !tbaa !26
  %.not35 = icmp eq ptr %98, null
  br i1 %.not35, label %100, label %139

100:                                              ; preds = %99
  %101 = load ptr, ptr %8, align 8, !tbaa !22
  %102 = load ptr, ptr %5, align 8, !tbaa !17
  %103 = getelementptr inbounds i8, ptr %102, i64 176
  %104 = load ptr, ptr %103, align 8, !tbaa !24
  %.not36 = icmp eq ptr %101, %104
  %105 = icmp eq ptr %101, null
  %or.cond44 = or i1 %105, %.not36
  br i1 %or.cond44, label %110, label %106

106:                                              ; preds = %100
  %107 = load ptr, ptr %101, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  %109 = load ptr, ptr %108, align 8
  tail call void %109(ptr noundef nonnull align 8 dereferenceable(8) %101) #9
  br label %110

110:                                              ; preds = %106, %100
  store ptr null, ptr %8, align 8, !tbaa !22
  br label %139

111:                                              ; preds = %56
  %112 = invoke noalias noundef nonnull dereferenceable(16080) ptr @_Znwm(i64 noundef 16080) #7
          to label %113 unwind label %52

113:                                              ; preds = %111
  store ptr %112, ptr %7, align 8, !tbaa !26
  %114 = invoke i32 @drmp3_init(ptr noundef nonnull %112, ptr noundef nonnull @_ZN6SoLoud15drmp3_read_funcEPvS0_m, ptr noundef nonnull @_ZN6SoLoud15drmp3_seek_funcEPvi17drmp3_seek_origin, ptr noundef nonnull %55, ptr noundef null)
          to label %115 unwind label %52

115:                                              ; preds = %113
  %.not33 = icmp eq i32 %114, 0
  br i1 %.not33, label %116, label %139

116:                                              ; preds = %115
  %117 = load ptr, ptr %7, align 8, !tbaa !26
  %118 = icmp eq ptr %117, null
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  tail call void @_ZdlPvm(ptr noundef nonnull %117, i64 noundef 16080) #8
  br label %120

120:                                              ; preds = %119, %116
  store ptr null, ptr %7, align 8, !tbaa !26
  %121 = load ptr, ptr %8, align 8, !tbaa !22
  %122 = load ptr, ptr %5, align 8, !tbaa !17
  %123 = getelementptr inbounds i8, ptr %122, i64 176
  %124 = load ptr, ptr %123, align 8, !tbaa !24
  %.not34 = icmp eq ptr %121, %124
  %125 = icmp eq ptr %121, null
  %or.cond45 = or i1 %125, %.not34
  br i1 %or.cond45, label %130, label %126

126:                                              ; preds = %120
  %127 = load ptr, ptr %121, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 8
  %129 = load ptr, ptr %128, align 8
  tail call void %129(ptr noundef nonnull align 8 dereferenceable(8) %121) #9
  br label %130

130:                                              ; preds = %126, %120
  store ptr null, ptr %8, align 8, !tbaa !22
  br label %139

131:                                              ; preds = %56
  %132 = getelementptr inbounds i8, ptr %57, i64 176
  %133 = load ptr, ptr %132, align 8, !tbaa !24
  %.not32 = icmp eq ptr %55, %133
  br i1 %.not32, label %138, label %134

134:                                              ; preds = %131
  %135 = load ptr, ptr %55, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  %137 = load ptr, ptr %136, align 8
  tail call void %137(ptr noundef nonnull align 8 dereferenceable(8) %55) #9
  br label %138

138:                                              ; preds = %134, %131
  store ptr null, ptr %8, align 8, !tbaa !22
  br label %139

139:                                              ; preds = %79, %64, %110, %99, %115, %130, %96, %45, %138, %54
  ret void

140:                                              ; preds = %41, %43, %28, %30, %93, %52
  %.pn39 = phi { ptr, i32 } [ %53, %52 ], [ %94, %93 ], [ %29, %28 ], [ %31, %30 ], [ %42, %41 ], [ %44, %43 ]
  call void @_ZN6SoLoud19AudioSourceInstanceD2Ev(ptr noundef nonnull align 8 dereferenceable(496) %0) #9
  resume { ptr, i32 } %.pn39
}

declare void @_ZN6SoLoud19AudioSourceInstanceC2Ev(ptr noundef nonnull align 8 dereferenceable(496)) unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6SoLoud10MemoryFileC1Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN6SoLoud10MemoryFile7openMemEPKhjbb(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN6SoLoud8DiskFileC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare noundef i32 @_ZN6SoLoud8DiskFile4openEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2

declare i32 @drwav_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @stb_vorbis_open_file(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @drflac_open(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @drmp3_init(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN6SoLoud19AudioSourceInstanceD2Ev(ptr noundef nonnull align 8 dereferenceable(496)) unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 528}
!9 = !{!"_ZTSN6SoLoud17WavStreamInstanceE", !10, i64 0, !16, i64 496, !11, i64 504, !16, i64 512, !12, i64 520, !11, i64 528, !11, i64 532, !16, i64 536}
!10 = !{!"_ZTSN6SoLoud19AudioSourceInstanceE", !11, i64 8, !11, i64 12, !11, i64 16, !13, i64 20, !12, i64 24, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !11, i64 72, !13, i64 76, !13, i64 80, !14, i64 88, !14, i64 96, !15, i64 104, !15, i64 152, !15, i64 200, !15, i64 248, !15, i64 296, !11, i64 344, !12, i64 348, !11, i64 380, !11, i64 384, !12, i64 392, !12, i64 456, !11, i64 472, !11, i64 476, !11, i64 480, !14, i64 488}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"float", !12, i64 0}
!14 = !{!"double", !12, i64 0}
!15 = !{!"_ZTSN6SoLoud5FaderE", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !13, i64 40, !11, i64 44}
!16 = !{!"any pointer", !12, i64 0}
!17 = !{!9, !16, i64 496}
!18 = !{!9, !11, i64 504}
!19 = !{!20, !16, i64 168}
!20 = !{!"_ZTSN6SoLoud9WavStreamE", !21, i64 0, !11, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !11, i64 184}
!21 = !{!"_ZTSN6SoLoud11AudioSourceE", !11, i64 8, !13, i64 12, !13, i64 16, !11, i64 20, !11, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !11, i64 40, !13, i64 44, !12, i64 48, !16, i64 112, !16, i64 120, !16, i64 128, !11, i64 136, !14, i64 144}
!22 = !{!9, !16, i64 512}
!23 = !{!20, !16, i64 160}
!24 = !{!20, !16, i64 176}
!25 = !{!20, !11, i64 152}
!26 = !{!12, !12, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass