; LLVM IR from SelfishOlex/MiniAudioO3DE :: MiniAudio/Code/Source/Clients (MiniAudioImplementation)

; 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.ma_stbvorbis = type { %struct.ma_data_source_base, ptr, ptr, ptr, ptr, %struct.ma_allocation_callbacks, i32, i32, i32, i64, ptr, i32, %struct.anon.60 }
%struct.ma_data_source_base = type { ptr, i64, i64, i64, i64, ptr, ptr, ptr, i32 }
%struct.ma_allocation_callbacks = type { ptr, ptr, ptr, ptr }
%struct.anon.60 = type { ptr, i64, i64, i32, i32, ptr }

@.str.6 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._Z17ma_stbvorbis_initPF9ma_resultPvS0_mPmEPFS_S0_x14ma_seek_originEPFS_S0_PxES0_PK26ma_decoding_backend_configPK23ma_allocation_callbacksP12ma_stbvorbis = external hidden unnamed_addr constant [163 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: mustprogress uwtable
declare dso_local void @ma_free(ptr noundef, ptr noundef) #1

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

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

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

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

31:                                               ; preds = %7
  %32 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %32, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %163

33:                                               ; preds = %7
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %39, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %36, %33
  store i32 -2, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %163

40:                                               ; preds = %36
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ma_stbvorbis, ptr %42, i32 0, i32 1
  store ptr %41, ptr %43, align 8, !tbaa !11
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %15, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ma_stbvorbis, ptr %45, i32 0, i32 2
  store ptr %44, ptr %46, align 8, !tbaa !20
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ma_stbvorbis, ptr %48, i32 0, i32 3
  store ptr %47, ptr %49, align 8, !tbaa !21
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ma_stbvorbis, ptr %51, i32 0, i32 4
  store ptr %50, ptr %52, align 8, !tbaa !22
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ma_stbvorbis, ptr %53, i32 0, i32 5
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef %54, ptr noundef %55)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %124, %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %58 = load i64, ptr %20, align 8, !tbaa !23
  %59 = add i64 %58, 4096
  store i64 %59, ptr %20, align 8, !tbaa !23
  %60 = load ptr, ptr %21, align 8, !tbaa !5
  %61 = load i64, ptr %20, align 8, !tbaa !23
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = call ptr @ma_realloc(ptr noundef %60, i64 noundef %61, ptr noundef %62)
  store ptr %63, ptr %25, align 8, !tbaa !5
  %64 = load ptr, ptr %25, align 8, !tbaa !5
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %69

66:                                               ; preds = %57
  %67 = load ptr, ptr %21, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ma_free(ptr noundef %67, ptr noundef %68)
  store i32 -4, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %124

69:                                               ; preds = %57
  %70 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %70, ptr %21, align 8, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ma_stbvorbis, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ma_stbvorbis, ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  %77 = load ptr, ptr %21, align 8, !tbaa !5
  %78 = load i64, ptr %19, align 8, !tbaa !23
  %79 = getelementptr inbounds i8, ptr %77, i64 %78
  %80 = load i64, ptr %20, align 8, !tbaa !23
  %81 = load i64, ptr %19, align 8, !tbaa !23
  %82 = sub i64 %80, %81
  %83 = call noundef i32 %73(ptr noundef %76, ptr noundef %79, i64 noundef %82, ptr noundef %24)
  store i32 %83, ptr %16, align 4, !tbaa !9
  %84 = load i64, ptr %24, align 8, !tbaa !23
  %85 = load i64, ptr %19, align 8, !tbaa !23
  %86 = add i64 %85, %84
  store i64 %86, ptr %19, align 8, !tbaa !23
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %93

89:                                               ; preds = %69
  %90 = load ptr, ptr %21, align 8, !tbaa !5
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ma_free(ptr noundef %90, ptr noundef %91)
  %92 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %92, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %124

93:                                               ; preds = %69
  %94 = load i64, ptr %19, align 8, !tbaa !23
  %95 = icmp ugt i64 %94, 2147483647
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ma_free(ptr noundef %97, ptr noundef %98)
  store i32 -11, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %124

99:                                               ; preds = %93
  %100 = load ptr, ptr %21, align 8, !tbaa !5
  %101 = load i64, ptr %19, align 8, !tbaa !23
  %102 = trunc i64 %101 to i32
  %103 = call ptr @stb_vorbis_open_pushdata(ptr noundef %100, i32 noundef %102, ptr noundef %23, ptr noundef %22, ptr noundef null)
  store ptr %103, ptr %18, align 8, !tbaa !5
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %117

106:                                              ; preds = %99
  %107 = load i32, ptr %23, align 4, !tbaa !24
  %108 = sext i32 %107 to i64
  %109 = load i64, ptr %19, align 8, !tbaa !23
  %110 = sub i64 %109, %108
  store i64 %110, ptr %19, align 8, !tbaa !23
  %111 = load ptr, ptr %21, align 8, !tbaa !5
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = load i32, ptr %23, align 4, !tbaa !24
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %112, i64 %114
  %116 = load i64, ptr %19, align 8, !tbaa !23
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %111, ptr align 1 %115, i64 %116, i1 false)
  store i32 2, ptr %17, align 4
  br label %124

117:                                              ; preds = %99
  %118 = load i32, ptr %22, align 4, !tbaa !24
  %119 = icmp eq i32 %118, 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %117
  store i32 3, ptr %17, align 4
  br label %124, !llvm.loop !25

121:                                              ; preds = %117
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ma_free(ptr noundef %122, ptr noundef %123)
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %124

124:                                              ; preds = %121, %120, %106, %96, %89, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %125 = load i32, ptr %17, align 4
  switch i32 %125, label %162 [
    i32 2, label %126
    i32 3, label %57
  ]

126:                                              ; preds = %124
  %127 = load ptr, ptr %18, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %130

129:                                              ; preds = %126
  br label %132

130:                                              ; preds = %126
  call void @__assert_fail(ptr noundef @.str.147, ptr noundef @.str.6, i32 noundef 60806, ptr noundef @__PRETTY_FUNCTION__._Z17ma_stbvorbis_initPF9ma_resultPvS0_mPmEPFS_S0_x14ma_seek_originEPFS_S0_PxES0_PK26ma_decoding_backend_configPK23ma_allocation_callbacksP12ma_stbvorbis) #6
  unreachable

131:                                              ; No predecessors!
  br label %132

132:                                              ; preds = %131, %129
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = load ptr, ptr %15, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ma_stbvorbis, ptr %134, i32 0, i32 10
  store ptr %133, ptr %135, align 8, !tbaa !27
  %136 = load ptr, ptr %21, align 8, !tbaa !5
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ma_stbvorbis, ptr %137, i32 0, i32 12
  %139 = getelementptr inbounds %struct.anon.60, ptr %138, i32 0, i32 0
  store ptr %136, ptr %139, align 8, !tbaa !28
  %140 = load i64, ptr %19, align 8, !tbaa !23
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ma_stbvorbis, ptr %141, i32 0, i32 12
  %143 = getelementptr inbounds %struct.anon.60, ptr %142, i32 0, i32 1
  store i64 %140, ptr %143, align 8, !tbaa !29
  %144 = load i64, ptr %20, align 8, !tbaa !23
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ma_stbvorbis, ptr %145, i32 0, i32 12
  %147 = getelementptr inbounds %struct.anon.60, ptr %146, i32 0, i32 2
  store i64 %144, ptr %147, align 8, !tbaa !30
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ma_stbvorbis, ptr %148, i32 0, i32 11
  store i32 1, ptr %149, align 8, !tbaa !31
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  %151 = call noundef i32 @_ZL22ma_stbvorbis_post_initP12ma_stbvorbis(ptr noundef %150)
  store i32 %151, ptr %16, align 4, !tbaa !9
  %152 = load i32, ptr %16, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %161

154:                                              ; preds = %132
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.ma_stbvorbis, ptr %155, i32 0, i32 10
  %157 = load ptr, ptr %156, align 8, !tbaa !27
  call void @stb_vorbis_close(ptr noundef %157)
  %158 = load ptr, ptr %21, align 8, !tbaa !5
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ma_free(ptr noundef %158, ptr noundef %159)
  %160 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %160, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %162

161:                                              ; preds = %132
  store i32 0, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %162

162:                                              ; preds = %161, %154, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %163

163:                                              ; preds = %162, %39, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %164 = load i32, ptr %8, align 4
  ret i32 %164
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @stb_vorbis_close(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"_ZTS9ma_result", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_ZTS12ma_stbvorbis", !13, i64 0, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !16, i64 104, !17, i64 136, !15, i64 140, !15, i64 144, !14, i64 152, !6, i64 160, !15, i64 168, !18, i64 176}
!13 = !{!"_ZTS19ma_data_source_base", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !15, i64 64}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS23ma_allocation_callbacks", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTS9ma_format", !7, i64 0}
!18 = !{!"_ZTSN12ma_stbvorbisUt_E", !6, i64 0, !19, i64 8, !19, i64 16, !15, i64 24, !15, i64 28, !6, i64 32}
!19 = !{!"long", !7, i64 0}
!20 = !{!12, !6, i64 80}
!21 = !{!12, !6, i64 88}
!22 = !{!12, !6, i64 96}
!23 = !{!19, !19, i64 0}
!24 = !{!15, !15, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !6, i64 160}
!28 = !{!12, !6, i64 176}
!29 = !{!12, !19, i64 184}
!30 = !{!12, !19, i64 192}
!31 = !{!12, !15, i64 168}


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

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17ma_stbvorbis_initPF9ma_resultPvS0_mPmEPFS_S0_x14ma_seek_originEPFS_S0_PxES0_PK26ma_decoding_backend_configPK23ma_allocation_callbacksP12ma_stbvorbis(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = tail call noundef i32 @_ZL26ma_stbvorbis_init_internalPK26ma_decoding_backend_configP12ma_stbvorbis(ptr noundef %4, ptr noundef %6)
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %61

12:                                               ; preds = %7
  %13 = icmp eq ptr %0, null
  %14 = icmp eq ptr %1, null
  %or.cond = or i1 %13, %14
  br i1 %or.cond, label %61, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %0, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr %1, ptr %17, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %6, i64 88
  store ptr %2, ptr %18, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %6, i64 96
  store ptr %3, ptr %19, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %6, i64 104
  %21 = tail call noundef i32 @_ZL33ma_allocation_callbacks_init_copyP23ma_allocation_callbacksPKS_(ptr noundef nonnull %20, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %22 = tail call ptr @ma_realloc(ptr noundef null, i64 noundef 4096, ptr noundef %5)
  %23 = icmp eq ptr %22, null
  br i1 %23, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %44, %15
  %.065.lcssa = phi ptr [ null, %15 ], [ %24, %44 ]
  call void @ma_free(ptr noundef %.065.lcssa, ptr noundef %5)
  br label %.thread

.lr.ph:                                           ; preds = %15, %44
  %24 = phi ptr [ %46, %44 ], [ %22, %15 ]
  %25 = phi i64 [ %45, %44 ], [ 4096, %15 ]
  %.068124 = phi i64 [ %32, %44 ], [ 0, %15 ]
  %26 = load ptr, ptr %16, align 8, !tbaa !5
  %27 = load ptr, ptr %19, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %24, i64 %.068124
  %29 = sub i64 %25, %.068124
  %30 = call noundef i32 %26(ptr noundef %27, ptr noundef nonnull %28, i64 noundef %29, ptr noundef nonnull %10)
  %31 = load i64, ptr %10, align 8, !tbaa !20
  %32 = add i64 %31, %.068124
  %.not83 = icmp eq i32 %30, 0
  br i1 %.not83, label %34, label %33

33:                                               ; preds = %.lr.ph
  call void @ma_free(ptr noundef nonnull %24, ptr noundef %5)
  br label %.thread

34:                                               ; preds = %.lr.ph
  %35 = icmp ugt i64 %32, 2147483647
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  call void @ma_free(ptr noundef nonnull %24, ptr noundef %5)
  br label %.thread

37:                                               ; preds = %34
  %38 = trunc nuw nsw i64 %32 to i32
  %39 = call ptr @stb_vorbis_open_pushdata(ptr noundef nonnull %24, i32 noundef %38, ptr noundef nonnull %9, ptr noundef nonnull %8, ptr noundef null)
  %.not84 = icmp eq ptr %39, null
  br i1 %.not84, label %40, label %48

40:                                               ; preds = %37
  %41 = load i32, ptr %8, align 4, !tbaa !21
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %44, label %43, !llvm.loop !22

43:                                               ; preds = %40
  call void @ma_free(ptr noundef nonnull %24, ptr noundef %5)
  br label %.thread

.thread:                                          ; preds = %._crit_edge, %33, %36, %43
  %.1.ph = phi i32 [ -1, %43 ], [ -11, %36 ], [ %30, %33 ], [ -4, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %61

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %45 = add i64 %25, 4096
  %46 = call ptr @ma_realloc(ptr noundef nonnull %24, i64 noundef %45, ptr noundef %5)
  %47 = icmp eq ptr %46, null
  br i1 %47, label %._crit_edge, label %.lr.ph

48:                                               ; preds = %37
  %49 = load i32, ptr %9, align 4, !tbaa !21
  %50 = sext i32 %49 to i64
  %51 = sub nsw i64 %32, %50
  %52 = getelementptr inbounds i8, ptr %24, i64 %50
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %24, ptr nonnull align 1 %52, i64 %51, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %53 = getelementptr inbounds i8, ptr %6, i64 160
  store ptr %39, ptr %53, align 8, !tbaa !24
  %54 = getelementptr inbounds i8, ptr %6, i64 176
  store ptr %24, ptr %54, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %6, i64 184
  store i64 %51, ptr %55, align 8, !tbaa !26
  %56 = getelementptr inbounds i8, ptr %6, i64 192
  store i64 %25, ptr %56, align 8, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %6, i64 168
  store i32 1, ptr %57, align 8, !tbaa !28
  %58 = call noundef i32 @_ZL22ma_stbvorbis_post_initP12ma_stbvorbis(ptr noundef nonnull %6)
  %.not86 = icmp eq i32 %58, 0
  br i1 %.not86, label %61, label %59

59:                                               ; preds = %48
  %60 = load ptr, ptr %53, align 8, !tbaa !24
  call void @stb_vorbis_close(ptr noundef %60)
  call void @ma_free(ptr noundef nonnull %24, ptr noundef %5)
  br label %61

61:                                               ; preds = %.thread, %59, %48, %12, %7
  %.3 = phi i32 [ %11, %7 ], [ -2, %12 ], [ %58, %59 ], [ 0, %48 ], [ %.1.ph, %.thread ]
  ret i32 %.3
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @stb_vorbis_close(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 72}
!6 = !{!"_ZTS12ma_stbvorbis", !7, i64 0, !8, i64 72, !8, i64 80, !8, i64 88, !8, i64 96, !13, i64 104, !14, i64 136, !12, i64 140, !12, i64 144, !11, i64 152, !8, i64 160, !12, i64 168, !15, i64 176}
!7 = !{!"_ZTS19ma_data_source_base", !8, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !8, i64 40, !8, i64 48, !8, i64 56, !12, i64 64}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long long", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTS23ma_allocation_callbacks", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!14 = !{!"_ZTS9ma_format", !9, i64 0}
!15 = !{!"_ZTSN12ma_stbvorbisUt_E", !8, i64 0, !16, i64 8, !16, i64 16, !12, i64 24, !12, i64 28, !8, i64 32}
!16 = !{!"long", !9, i64 0}
!17 = !{!6, !8, i64 80}
!18 = !{!6, !8, i64 88}
!19 = !{!6, !8, i64 96}
!20 = !{!16, !16, i64 0}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !8, i64 160}
!25 = !{!6, !8, i64 176}
!26 = !{!6, !16, i64 184}
!27 = !{!6, !16, i64 192}
!28 = !{!6, !12, i64 168}


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